Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Paramters
- $tenantname = "" # Can be found with get-rdstenant
- $hostpoolname = "" # can be found with get-rdshostpool -tenantname $tenantname
- ### Check or install Module
- $module = get-module -Name Microsoft.RDInfra.RDPowerShell
- if(!$module) {
- Install-Module -Name Microsoft.RDInfra.RDPowerShell -scope CurrentUser -Confirm:$false -force
- }
- ### Import Module
- Import-Module -Name Microsoft.RDInfra.RDPowerShell
- ### Sign into WVD Tenant
- Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com"
- ### Get all current users
- get-rdsusersession -TenantName $tenantname -HostPoolName $hostpoolname
- ### Send message to user
- Send-RdsUserSessionMessage -TenantName $tenantname -HostPoolName $hostpoolname -SessionHostName $SessionHostName -SessionId $SessionId -MessageTitle "Message from Administrator" -MessageBody "Message"
- ### logoff user
- Invoke-RdsUserSessionLogoff -TenantName $tenantname -HostPoolName $hostpoolname -SessionHostName $SessionHostName -SessionId $SessionId -NoUserPrompt
- ### Add User to App Group
- Add-RdsAppGroupUser -TenantName $tenantname -HostPoolName $hostpoolname -appgroupname "App group name" -UserPrincipalName "UPN"
- ### New RDS App Group
- New-RdsAppGroup -TenantName $tenantname -HostPoolName $hostpoolname -Name "App group name"
- ### Search start menu for apps
- Get-RdsStartMenuApp -TenantName $tenantname -HostPoolName $hostpoolname -appgroupname "App group name"
- ### New App
- New-RdsRemoteApp -TenantName $tenantname -HostPoolName $hostpoolname -appgroupname "App group name" -Name "App friendly name" -AppAlias "App alias"
- ### Remove App Group
- Remove-RdsAppGroup -TenantName $tenantname -HostPoolName $hostpoolname -Name "App group name"
- ### Remove user from app group
- Remove-RdsAppGroupUser -TenantName $tenantname -HostPoolName $hostpoolname -AppGroupName "App group name" -UserPrincipalName "UPN"
- ### Remove RDS app
- Remove-RdsRemoteApp -TenantName $tenantname -HostPoolName $hostpoolname -AppGroupName "App group name" -Name "AppName"
Advertisement
Add Comment
Please, Sign In to add comment