This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string[]] $vmdetail) | |
#Fetch the automation service principal credentials | |
$global:spCred = Get-AutomationPSCredential -Name 'Creds' | |
#Fetch tenantID from Automation variables | |
$global:tenantid = Get-AutomationVariable -Name 'TenantID' | |
#Fetch tenantID from Automation variables | |
$global:vnet = Get-AutomationVariable -Name 'vNet' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Creds = Get-AutomationPSCredential -Name 'Creds' | |
$TenantID = Get-AutomationVariable -Name 'TenantID' | |
Connect-AzAccount -ServicePrincipal -Credential $Creds -Tenant $TenantID | |
$vResourceGroupname = "atcsl" | |
$vAutomationAccountName = "atcslautomation" | |
$vaStorageAccount = Get-AutomationVariable -Name "StorageAccount" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This function creates an Azure AD Service Principal | |
function CreateServicePrincipal { | |
param($username, $password) | |
$credproperties = @{ | |
StartDate = Get-Date | |
EndDate = Get-Date -Year 2024 | |
Password = $password | |
} | |
$cred= New-Object Microsoft.Azure.Commands.ActiveDirectory.PSADPasswordCredential -Property $credproperties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "2015-08-01", | |
"name": "[variables('webSiteName')]", | |
"type": "Microsoft.Web/sites", | |
"location": "[resourceGroup().location]", | |
"tags": { | |
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]":"Resource", | |
"displayName": "Website" | |
}, | |
"dependsOn": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Uninstall the IoT Edge module from the Windows device | |
. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; Uninstall-IoTEdge -Force | |
#Deploy the IoT Edge Runtime module to the Windows device | |
. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; Deploy-IoTEdge -ContainerOs Windows | |
# Define Variables for the configuration of the edge device using DPS with X509 Certificates | |
# Note that only .cert and .pem extensions are supported | |
# The names of the certificates mentioned here are the one's created using the microsoft provided scipt on github. | |
# The link to the github repossitory is https://github.com/Azure/iotedge/tree/master/tools/CACertificates | |
$X509IdentityChainCertPath = "<path to the device identity chain cert>\certs\iot-edge-device-identity-<name>-full-chain.cert.pem" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration WebServer | |
{ | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $NodeNames = "localhost", | |
[string] $AcctKey = "4PJREBT6kPMh9ejQwIhoU+vmOWdd7WYCVIhDEbttPPZVln8HerqOCQR+PTXlSMd0AZd4tVdRPIy/TEfos4aU9Q==" | |
) | |
Import-DscResource -ModuleName PsDesiredStateConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################### | |
#Author:Neeraj Kumar | |
#Description:This script intakes the parameters for email creation and processes the request. It also created a user in Azure AD | |
#Date: 03/10/2022 | |
############################################### | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $EmailIDtobeProvisioned, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory=$false)] | |
[string] $TeamName = 'Test Team', | |
[Parameter(Mandatory=$false)] | |
[string] $TeamDescription = 'New MS Team', | |
[Parameter(Mandatory=$false)] | |
[string] $Visibility = 'Private', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################### | |
#Author:Neeraj Kumar | |
#Description:This script intakes the parameters from incoming ServiceNow Requests for setting the email size limit | |
#Date: 01/19/2023 | |
####. ########################################### | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $ServiceRequestNumber, |
OlderNewer