powershell日常积累
1.常用命令(*-Item处理"文件夹",*-ItemProperty处理"文件")Get-ItemGet-ItemPropertySet-ItemSet-ItemPropertyNew-ItemNew-ItemPropertyCopy-ItemCopy-ItemPropertyRename—ItemRename-ItemPropertyRemove-ItemRemove-ItemProperty
1.cmdletget-command-CommandTypecmdlet查看所有cmdlet公共参数:-Verbose,-Debug,-ErrorAction,-ErrorVariable,and-OutVariable.这些参数大多用于一些脚本调试等.get-helpget-commd-------------------------------------------------------
Stop-Computer停止(关闭)本地和远程计算机-AsJob-Authentication例子$j = stop-computer -computername Server01, Server02 -asjob$results = $j | receive-job$resultsRestore-Computer在本地计算机上启动系统还原restore-computer -RestorePoi
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号