NetBackup™ Self Service Installation Guide

Last Published:
Product(s): NetBackup (10.0)

About PowerShell execution policy

The PowerShell execution policy determines if PowerShell can run scripts. The installer sets the execution policy to Remote Signed which allows scripts to run. Problems are encountered if this step of the installer fails or the execution policy is changed after install. This appendix describes diagnosing and solving execution policy issues.

Diagnosis
  • Log on to the website

  • Click the Location tab.

  • Click the Check Connectivity icon

Figure: Check connectivity

Check connectivity

If you receive the error message shown, there may be an execution policy issue. If Check Connectivity does not generate an error, the execution policy is set correctly.

Figure: Import failed pop-up box

Import failed pop-up box

To confirm there is an execution policy issue, navigate to the error log. Select Admin > Support > Error Log and examine the errors. An example of an execution policy issue is shown.

"CreateRequest failed with error: 
File C:\Temp\NetBackupAdapter\NetBackupAdapterServices\PowerShellScripts\
ValidationHook\Initial.p s1 cannot be loaded because running scripts is 
disabled on this system. For more information, see about_Execution_Policies 
at http://go.microsoft.com/fwlink/?LinkID=135170. File C:\Temp
\NetBackupAdapter\NetBackupAdapterServices\PowerShellScripts\ValidationHook\
Initial.p s1 cannot be loaded because running scripts is disabled on this 
system. For more information, see about_Execution_Policies at 
http://go.microsoft.com/fwlink/?LinkID=135170."
Solution
  1. Log on to the web server
  2. Open a PowerShell command prompt as administrator.
  3. Type: Get-ExecutionPolicy - List

    The list of the current execution policies is shown

  4. If the Local Machine Scope is not set to Remote Signed, type the command:

    Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned

Execution policy scope treats items higher up the list as higher priority, overriding those lower in the list. If the scope MachinePolicy is set to Restricted, then even though LocalMachine is set to RemoteSigned you are still unable to run scripts. This Stack Overflow post describes how to solve such problems.

http://stackoverflow.com/a/27755459