#ImportPowerTimeScheme <Uid> <FileScheme> $PowerTimes = Get-BrokerPowerTimeScheme Foreach ($PowerTime in $PowerTimes) { $file=”path” $file+=$PowerTime.Uid $file+=”.txt” $Content=Get-Content $file Set-BrokerPowerTimeScheme $PowerTime.uid -PoolSize $Content Write-Host -ForegroundColor Green “Enter your txt here”
Category: PowerShell for XD
Apr 08
Export Power-time schemes for all desktop groups
#Export Powertime scheme $PowerTimes = Get-BrokerPowerTimeScheme new-item -Path “path” -ItemType directory Foreach ($PowerTime in $PowerTimes) { $file= “path” $file+=$PowerTime.Uid $file+=”.txt” echo $PowerTime.PoolSize | Out-file $file }
Feb 05
Listing the properties of a site
#Version 1.0 #———————————————————————————————– #Provide the following values before executing: #The FQDN and port (if not the default of 80) of the DDC #Eg: ‘ddc01.domain.com:80’ $ddcAddress = ” #End of variables #****************************************************************** asnp Citrix.* Get-BrokerSite -AdminAddress $ddcAddress :))
Feb 05
Scheduling a Power Action to Turn on a Desktop
# ————————————————————————————————— #PowerShell sample script to create a power action to turn on a XenDesktop 5.x desktop # #Note: One or more required values must be specified below before executing the script. # #Version 1.0 #———————————————————————————————– #Provide the following values before executing: #The FQDN and port (if not the default of 80) of the DDC …
Feb 05
Listing all Desktops in a Specific State
#————————————————————————————————— #PowerShell sample script to list XenDesktop 5.x VDAs in a specific state (as noted below), sorted by name # VDAs that are: # – powered on, # – available, # – do not have a pending power action, and # – are set to shutdown after use # #Note: One or more required values …
Feb 05
Getting the Service Status of a DDC
# ————————————————————————————————— #PowerShell sample script to display the service statuses on a XenDesktop 5.x DDC # #Note: One or more required values must be specified below before executing the script. # # #Version 1.0 #———————————————————————————————– #Provide the following values before executing: #The FQDN and port (if not the default of 80) of the DDC #Eg: …
Feb 05
Delete a DesktopGroup
# ————————————————————————————————— #PowerShell sample script to delete a desktop group and related objects from a XenDesktop 5.x site # #Note: One or more required values must be specified below before executing the script. # # # #Version 1.0 #———————————————————————————————– #Provide the following values before executing: #The FQDN for the DDC and XML port, if not …
Feb 05
Create a DesktopGroup for XD5.6
#————————————————————————————————— #PowerShell sample script to create a new shared XenDesktop 5.x desktop group # #Note: One or more required values must be specified below before executing the script. # # # #Version 1.0 #———————————————————————————————–