Skip to content

Instantly share code, notes, and snippets.

@OmerMicrosoft
OmerMicrosoft / WVD_AssignTenantCreatorRoleAndCreatingWVDTenant.ps1
Last active April 29, 2019 09:07
Initialize the setup of Windows Virtual Desktop in Azure by assigning the 'TenantCreator' role to a selected user and creating the WVD tenant
<#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.
@OmerMicrosoft
OmerMicrosoft / WVD_AddRdsUsers.ps1
Created April 23, 2019 10:06
Display the RDS users of a specific hostpool in a Windows Virtual Desktop tenant. Let you add additional RDS users to a hostpool if required.
#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 {