gwmi -class win32_computersystem

远程脚本签名

PS C:\WINDOWS\system32> Get-ExecutionPolicy

Unrestricted

PS C:\WINDOWS\system32> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Enter-session DC50=è相当于remote到dc50上去了

clip_image001

clip_image002

-prefix指定前缀

远程端口5985/5986

PS C:\WINDOWS\system32> Get-HotFix

PSWA:power shell web access

Enter-pssession win2014

Get-windowsfeature windwspowershellwebaccess| install-windowsFeature –verbose

clip_image003

创建pswa的权限:

clip_image004

clip_image006

clip_image008