Data Management Troubleshooting

When setting up the import script for automation, you may encounter the following errors.

PowerShell Script is Blocked

Error Message

File C:\Path\To\File\Script.ps1 cannot be loaded. The file is not digitally signed.

Solution

Use the Unblock-File cmdlet to unblock the script:

  1. Open PowerShell 7 as an administrator.

  2. Run the following command:

    Unblock-File -Path "C:\Path\To\File\Script.ps1"
  3. Try running the script again.

Invalid Stored Credential

Error Message

Write-Error: Error refreshing token - invalid_grant

Solution

Delete the existing credentials file and generate a new one:

  1. Navigate to the script directory.

  2. Delete the credentials.json file.

  3. Run the script again to create a new credentials.json file with valid credentials.