Reputation: 11
I'm running the following PowerShell command:
$colDisks = get-wmiobject Win32_LogicalDisk
-ComputerName $strComputer
-Filter "DriveType = 3"
But I'm not having enough privileges to run this command for remote servers.
How can I add an authentification to this command to have more privileges?
Upvotes: 0
Views: 188
Reputation: 60938
try
$colDisks = get-wmiobject Win32_LogicalDisk
-ComputeNname $strComputer
-Filter "DriveType = 3"
-Credential (get-credential)
Upvotes: 2