Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-WMIObject -Authentication Parameter

$
0
0

I am just curious as to what this actually does. I have a bunch of functions that use Get-WMIObject, to get inforamtion on IIS and restart application pools. So for instance I have the following code:

Get-WmiObject -Authentication PacketPrivacy -Impersonation Impersonate -ComputerName $serverName `
			-Namespace "root\WebAdministration" -Class "ApplicationPool" | Where-Object { $_.Name -eq "$applicationPool" }

Everytime I run any of my functions, the server has an Application Event with a level of Error and source of WMI which states the following:

Log Name:      Application
Source:        Microsoft-Windows-WMI
Date:          12/9/2013 8:43:35 AM
Event ID:      5605
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Description:
Access to the root\WebAdministration namespace was denied because the namespace is marked with RequiresEncryption but the script or application attempted to connect to this namespace with an authentication level below Pkt_Privacy. Change the authentication level to Pkt_Privacy and run the script or application again.

Even though I receive these error events, the script runs fine without any issues. Does any one know why I receive these events, even though the Authentication Level is set to PacketPrivacy?  

If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.

Don't Retire Technet


Viewing all articles
Browse latest Browse all 21975

Trending Articles