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


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 win32_volume | Where-object {$_.DriveType -eq 3 -and $_.Label -ne “System


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

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



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


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:


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 263 other subscribers

Translate this blog!



December 2020
« Nov    

View Post by Categories

%d bloggers like this: