Extend partition windows powershell

Posted by user128364 on Super User See other posts from Super User or by user128364
Published on 2013-11-01T15:43:19Z Indexed on 2013/11/01 16:00 UTC
Read the original article Hit count: 304

Filed under:
|

I want to create a Windows Powershell script to extend my partition through WMI (remotely), IP Address of my host id 10.10.10.10

$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}

Do we have any method with use of Invoke-Wmimethod

© Super User or respective owner

Related posts about Windows

Related posts about powershell