This file contains hidden or 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
$Servers="ALNode1","ALNode2" | |
$UserName="Administrator" | |
$Password="LS1setup!" | |
$SecuredPassword = ConvertTo-SecureString $password -AsPlainText -Force | |
$Credentials= New-Object System.Management.Automation.PSCredential ($UserName,$SecuredPassword) | |
#configure trusted hosts to be able to communicate with servers | |
$TrustedHosts=@() | |
$TrustedHosts+=$Servers | |
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $($TrustedHosts -join ',') -Force |
This file contains hidden or 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
$AsHCIOUName="OU=ALClus01,DC=Corp,DC=contoso,DC=com" | |
$LCMUserName="ALClus01-LCMUser" | |
$LCMPassword="LS1setup!LS1setup!" | |
#Create LCM credentials | |
$SecuredPassword = ConvertTo-SecureString $LCMPassword -AsPlainText -Force | |
$LCMCredentials= New-Object System.Management.Automation.PSCredential ($LCMUserName,$SecuredPassword) | |
#create objects in Active Directory | |
#install posh module for prestaging Active Directory | |
Install-PackageProvider -Name NuGet -Force |
This file contains hidden or 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
$ResourceGroupName="ALClus01-RG" | |
$Location="eastus" | |
#login to azure | |
#download Azure module | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
if (!(Get-InstalledModule -Name az.accounts -ErrorAction Ignore)){ | |
Install-Module -Name Az.Accounts -Force | |
} | |
#login using device authentication |