Access denied error during script Execution when Converting Windows VM to GCP for ContentStore Upload

Article ID: 80244

Article Type: Troubleshooting

Last Modified:

You receive access denied errors during PowerShell script execution.

Symptoms

During script execution, you received one of the following errors:

Get-ItemProperty : Requested registry access is not allowed.
At C:\regEdit.ps1:13 char:30
+    $temp = (Get-ItemProperty -Path $Key).$Value
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo             : PermissionDenied: (HKEY_LOCAL_MACH...8.inf oem19.inf:String) [Get-ItemProperty], SecurityException
    + FullyQualifiedErrorId    : System.Security.SecurityException.Microsoft.PowerShell.Commands.GetItemPropertyCommand

Causes

PowerShell execution is restricted or certain registry keys lack administrator access.

Resolution

  1. Make sure that the PowerShell execution policy is set to "unrestricted." You can run this command to set the execution policy to unrestricted:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
  1. Grant administrator privileges to the following registry keys:
 HKLM\SYSTEM\DriverDatabase\DriverPackages\vioscsi.inf_amd64....
   HKLM\SYSTEM\DriverDatabase\DriverInfFiles\oem...
   HKLM\SYSTEM\DriverDatabase\DeviceIds\PCI\\...
   HKLM\System\CurrentControlSet\Services\vioscsi
1 Commvault Way, Tinton Falls, NJ 07724 Sitemap | Legal Notices | Trademarks | Privacy Policy
Copyright © 2022 Commvault | All Rights Reserved.