扩展分区窗口powershell


1

我想创建一个Windows Powershell脚本,通过WMI(远程)扩展我的分区,我的主机ID 10.10.10.10的IP地址

$pass = convertto-securestring "abc123#" -asplaintext -force

$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist "10.10.10.10\Administrator",$pass

Invoke-Command -ComputerName 10.10.10.10 -Credential $myCred -ScriptBlock {"rescan","select volume 2","extend" | diskpart}

我们有任何使用Invoke-Wmimethod的方法吗?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.