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
<#Script Summary: | |
This PowerShell script initialize the setup of Windows Virtual Desktop in Azure. | |
The script include: | |
1.Assign the “TenantCreator” role to a user account. | |
2.Create a Windows Virtual Desktop tenant. | |
Before running this script, you should allow the Windows Virtual Desktop service to access Azure AD on the following link: https://rdweb.wvd.microsoft.com/ | |
#> | |
###Install and import Required Modules### | |
#Install-Module Az,AzureAD,Microsoft.RDInfra.RDPowerShell -AllowClobber -Force #Remove remark if the required modules have not been installed yet. |
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
#Get Azure admin credentials | |
Write-Host "Getting Azure credentials... " | |
$Credentials = Get-Credential -Message "Enter your Azure admin credentials" | |
#Add RDS Account in order to be able to change WVD configuration | |
$BrokerURL = "https://rdbroker.wvd.microsoft.com" | |
Write-Host "Adding the RDS account... " -NoNewline | |
Try { | |
Add-RdsAccount -DeploymentUrl $BrokerURL -Credential $Credentials -ErrorAction Stop | Out-Null | |
} | |
Catch { |
OlderNewer