SharePoint Experts, Information Architects, Expert Witness

SICG provides a broad array of business and technology consulting from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. We focus on the "How", not just the possible. Contact me direct: or call 704-873-8846 x704.

Search This Blog

Friday, July 15, 2011

Annoyances in PowerShell

So you are trying to run a PowerShell and keep getting:

Suggestion [3,General]: The command <script file> was not found, but does exist in the current location. Windows PowerShell doesn't load commands from the current location by default. If you trust this command, instead type ".\<script>.ps1". See "get-help about_Command_Precedence" for more details.

This generic error is pretty much what you will see for anything, even if the file does not exist. One of my clients was trying to run Invoke-AlertFixup in SharePoint and kept getting this error even when correctly opening it as:


The fix is quite simple - simply enter:

$env:PATH = $env:PATH + "."

then enter the .\<script>.ps1 - Viola!
Post a Comment