LCCPowerShellGUI: Errors

8/20/2008 You recevied the error "cannot be loaded because the execution of scripts is disabled on this system" When executing scripts, you need to change the default security policy of PowerShell.

To do this, execute the following command:
Set-ExecutionPolicy -executionPolicy AllSigned

8/20/2008 Running script manually returns "The term '...' is not recognized as a cmdlet..." This means PowerShell can not locate your script. PowerShell wants absolute paths, not relative. Unlike a regular Command Prompt, where you can change to the directory and type a filename to use, PowerShell wants you to enter the full-path.

In a regular command prompt, you could:
+ cd c:\lccps
+ myScript.ps1

In PowerShell, you must enter the full path:
+ cd c:\lccps
+ c:\lccps\myScript.ps1 -or- .\myScript.ps1

8/20/2008 How do I debug script execution issues? You can run scripts manually at a PowerShell Command Prompt to see if they work.

For example, to run the BIOS script manually, type the command using the following format:

  • [script location]\[script prepend]BIOS.ps1 -scriptsLocation [script location] -lccPCName [computer name]

    Example: C:\lccps\lccScriptBIOS.ps1 -scriptsLocation C:\lccps -lccPCName "localhost";

      [script location] = where the scripts are located
      [script prepend] = what text is prepended to the script name
      [computer name] = the computer name you want to query

8/20/2008 LCCPowerShellGUI runs, shows scripts, but the results are blank. A good chance is that the PowerShell foundation is not authorizing the scripts to run. These things are required for scripts to run through the LCCPowerShell GUI.
  1. all scripts must be signed. If any change is made to one, it must be re-signed
  2. at least one script must have been launched manually from the PowerShell Command Prompt so that you can answer 'A' (Always) to the "Trust This Certificate" prompt. This prompt will only happen once per certificate (not per script).
  3. the PowerShell Command Prompt must have been launched at least once to answer 'A' (Always) to the "Trust Microsoft" question.
8/20/2008 Unhandled exception: Could not load file or assembly
This error occurs if the requirements have not been installed. To run LCCPowerShellGUI, you will need to install the requirements listed in the Whitepaper.