天天看点

XenDesktop 之powershell 使用

1、禁止pvs类型桌面注销自动关机

set-brokerdesktopgroup -name "desktop group name" -shutdowndesktopsafteruse $false

2、调整交付组默认开启计算机百分比,可用通配符“*”

set-brokerdesktopgroup "desktop group name"-peakbuffersizepercent 100 

3、为添加好的托管主机添加网络

get-item xdhyp:\hostingunits\desktop02   获取托管主机信息以及相应配置格式参数

为托管主机添加网加网络

 add-hyphostingunitnetwork -networkpathxdhyp:\connections\xs-cluster02\【desktop02.network这里是要添加的网络】 -literalpath xdhyp:\hostingunits\desktop02

 add-hyphostingunitnetwork -literalpath xdhyp:\hostingunits\ctx-pvs(连接)\ -networkpath xdhyp:\connections\bjvcsa\bj-datacenter.datacenter\vdi-pool.cluster\vlan1015.network

4、添加删除托管主机存储

   默认存储类型为 osstorage  ,pvd存储类型为:personalvdiskstorage

添加存储:add-hyphostingunitstorage -literalpath xdhyp:\hostingunits\desktop01 -storagepath xdhyp:\hostingunits\desktop01\lun01.storage

删除存储:

remove-hyphostingunitstorage -literalpath xdhyp:\hostingunits\desktop01 -storagepath xdhyp:\hostingunits\desktoop\01\lun01.storage

删除pvd类型存储:

remove-hyphostingunitstorage -literalpath xdhyp:\hostingunits\desktop01 -storagetype personalvdiskstorage -storagepath xdhyp:\hostingunits\desktoop\01\lun01.storage

删除临时类型存储

remove-hyphostingunitstorage -literalpath xdhyp:\hostingunits\ctx-mcs -storagetype temporarystorage -storagepath xdhyp:\hostingunits\ctx-mcs\lun01-8tb.storage

继续阅读