New answers tagged

1

I could not solve the original problem with the CimInstance adding the value "". However, I did manage to get this to work by switching to an WmiObject: # Get Wmi object $smtpInstance = Get-WmiObject -Namespace root\MicrosoftIISv2 -ComputerName localhost -Query "Select * From IisSmtpServerSetting" # Set relay IP of 127.0.0.1 $relayIPs = @( 24, 0, 0, 128, ...


0

I found that querying root/MsCluster requires additional privileges. This privileges may be granted using Grant-ClusterAccess (https://technet.microsoft.com/en-us/library/ee460969.aspx). Also querying root/virtualization/v2 requires user to be added to 'Hyper-V Administrators' local group


0

You asked for the entire class to be instantiated. Looking at the class enumerator on msdn I'm not surprised it failed needing administrator access. You could try querying the specific properties you need and see if you trigger an exception, but most will require admin access. Here's the msdn page for the class you're using: ...



Top 50 recent answers are included