Nov
19
2012

Powershell Connection Error: A security package specific error occurred. (Exception from HRESULT: 0x80070721)

Condition:

When you are trying to execute any WMI command against a computer, it is resulting in following error,

————-

PS C:\Users\testuser\desktop> Get-WmiObject -computer xxxxxxx win32_volume

Get-WmiObject : A security package specific error occurred. (Exception from HRESULT: 0x80070721)

At line:1 char:14

+ Get-WmiObject <<<< -computer 162.53.32.223 win32_volume | Where-object {$_.DriveType -eq 3 -and $_.Label -ne “System

Reserved”}

+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException

+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

————-

Error:

Get-WmiObject: A security package specific error occurred. (Exception from HRESULT: 0x80070721)

Solution:

In my case the issue is with DCOM configuration access settings, here is how to fix it,

  1. From the Start menu, click Run and type Dcomcnfg.exe.
  2. In Component Services, click Console root, expand Component Services, expand Computers, and then click My Computer. On the Action menu, click Properties.
  3. In the My Computer Properties dialog box, on the COM Security tab, in the Access Permissions section, click Edit Default.
  4. In the Group or user names dialog box, check if Local Administrator is present or not, or the group you need access to, if not present then click Add.
  5. In the Select User, Computers, or Groups dialog box, in the Enter the object names to select (examples): box, type Administrator and click OK (Note: In From This Location: click Locations and select the local computer instead of domain)
  6. In the Permissions for Administrators section, select the check box to allow Local Access.
  7. Click OK twice, and then close Computer Management.

Try to run WMI again, it should work fine, if not, then try to give remote access to administrators. In case everything looks perfect then troubleshoot further.

References and help:

http://technet.microsoft.com/en-us/library/bb633148.aspx

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/64e272b6-597d-4a71-9435-88b4c6744e71/

http://blogs.msdn.com/b/asiatech/archive/2012/10/19/troubleshoot-client-calls-to-dcom-amp-nbsp-server-failed-with-amp-quot-a-security-package-specific-error-occurred-exception-from-hresult-0x80070721.aspx

 

Download PDF

About the Author: Nitin G

Indian born, trekker, biker, photographer, lover of monsoons. I've been working full time with SQL Server since year 2005 and blogs to post the content aquired during my research on new topics or fixing issues faced by me as a DBA while working in different kind of projects, hope some of my posts may helps others in SQLDBA community. Everything you read on my blog is my own personal opinion and any code is provided "AS-IS" with no warranties!

Leave a comment

Subscribe to this blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 195 other subscribers

Translate this blog!

EnglishFrenchGermanItalianPortugueseRussianSpanish

Calender

August 2019
M T W T F S S
« Nov    
 1234
567891011
12131415161718
19202122232425
262728293031  

View Post by Categories

%d bloggers like this: