Discussion:
get-wmiobject - access denied
(too old to reply)
Frank
2007-12-12 00:03:02 UTC
Permalink
Hi,

When doing a:

gwmi -namespace root\mscluster -computer servername -class
mscluster_resource|%{$_.type}|sort

I get: Get-WmiObject : Access denied

The event log has:

Access to the root\mscluster namespace was denied. The namespace is marked
with RequiresEncryption but the client connection was attempted with an
authentication level below Pkt_Privacy. Re try the connection using
Pkt_Privacy authentication level.

Does anyone know how to get around this w/o modifying the servers config?

Thanks in advance,
Jon
2007-12-12 00:27:11 UTC
Permalink
Post by Frank
Hi,
gwmi -namespace root\mscluster -computer servername -class
mscluster_resource|%{$_.type}|sort
I get: Get-WmiObject : Access denied
Access to the root\mscluster namespace was denied. The namespace is marked
with RequiresEncryption but the client connection was attempted with an
authentication level below Pkt_Privacy. Re try the connection using
Pkt_Privacy authentication level.
Does anyone know how to get around this w/o modifying the servers config?
Thanks in advance,
Version 2 CTP has a -Authentication parameter, so you could potentially use
....

gwmi ..... -Authentication PacketPrivacy ......
--
Jon
Marco Shaw [MVP]
2007-12-12 02:12:26 UTC
Permalink
Post by Frank
Hi,
gwmi -namespace root\mscluster -computer servername -class
mscluster_resource|%{$_.type}|sort
I get: Get-WmiObject : Access denied
Access to the root\mscluster namespace was denied. The namespace is marked
with RequiresEncryption but the client connection was attempted with an
authentication level below Pkt_Privacy. Re try the connection using
Pkt_Privacy authentication level.
Does anyone know how to get around this w/o modifying the servers config?
I'm assuming you need to do this remotely? I believe there's also a COM
interface to mscluster.

I don't know how easy it might be (if possible) to use DCOM to connect
to a remote system. It might also have encryption issues.

Marco
--
Microsoft MVP - Windows PowerShell
http://www.microsoft.com/mvp

PowerGadgets MVP
http://www.powergadgets.com/mvp

Blog:
http://marcoshaw.blogspot.com
Shay Levi
2007-12-12 07:37:03 UTC
Permalink
Hi Frank,

Can you try this?



$server="server"
$wmi = [WmiSearcher] "Select * From IIsApplicationPool"
$wmi.scope.path = "\\$server\root\mscluster"
$wmi.scope.options.authentication = [System.Management.AuthenticationLevel]::PacketPrivacy
$wmi.scope.options.enableprivileges=$true;

# specify alternate credentials
#$wmi.scope.options.username="domain\user"
#$wmi.scope.options.password="yourPassword"

$resource = $wmi.Get()
$resource | foreach { $_.type}




-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
Post by Frank
Hi,
gwmi -namespace root\mscluster -computer servername -class
mscluster_resource|%{$_.type}|sort
I get: Get-WmiObject : Access denied
Access to the root\mscluster namespace was denied. The namespace is
marked with RequiresEncryption but the client connection was
attempted with an authentication level below Pkt_Privacy. Re try the
connection using Pkt_Privacy authentication level.
Does anyone know how to get around this w/o modifying the servers config?
Thanks in advance,
Shay Levi
2007-12-12 07:39:59 UTC
Permalink
Sorry, this line:
$wmi = [WmiSearcher] "Select * From IIsApplicationPool"

Should be:
$wmi = [WmiSearcher] "Select * From mscluster_resource"



-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
Post by Shay Levi
Hi Frank,
Can you try this?
$server="server"
$wmi = [WmiSearcher] "Select * From IIsApplicationPool"
$wmi.scope.path = "\\$server\root\mscluster"
$wmi.scope.options.authentication =
[System.Management.AuthenticationLevel]::PacketPrivacy
$wmi.scope.options.enableprivileges=$true;
# specify alternate credentials
#$wmi.scope.options.username="domain\user"
#$wmi.scope.options.password="yourPassword"
$resource = $wmi.Get() $resource | foreach { $_.type}
-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com
Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
Post by Frank
Hi,
gwmi -namespace root\mscluster -computer servername -class
mscluster_resource|%{$_.type}|sort
I get: Get-WmiObject : Access denied
Access to the root\mscluster namespace was denied. The namespace is
marked with RequiresEncryption but the client connection was
attempted with an authentication level below Pkt_Privacy. Re try the
connection using Pkt_Privacy authentication level.
Does anyone know how to get around this w/o modifying the servers config?
Thanks in advance,
Loading...