eATM

PowerShell常用命令

下载文件:

(new-object System.Net.WebClient).DownloadFile( ‘https://www.abc.com/wac.msi’,’c:\wac.msi’)

 

开启远程桌面:

(gwmi -class win32_terminalservicesetting -namespace “root\cimv2\terminalservices”).setallowtsconnections(1)

Get-NetFirewallRule -Name RemoteDesktop* | select DisplayName,Direction,Enabled

Get-NetFirewallRule -Name RemoteDesktop* | Set-NetFirewallRule -Enabled true

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注