Cant run powershell script with .PS1 extension

At work I ran a script with a .PS1 extension perfectly in Powershell. I get home and install powershell on my computer and I cant run the same exact script that I ran at work. It's saves as a .PS1 extension but I get the generic error that: "The term filename.ps1 is not recognized as a cmdlet, function etc....
What gives?
LVL 7
tolinromeAsked:
Who is Participating?
 
bsharathConnect With a Mentor Commented:
Just try using it like this...

.\filename.ps1
Change the "Filename" to your filename
Where is the file locate
0
 
bsharathCommented:
Hi,

This is the Powershell security that restricts runnings on any machine just like that...

Please go through this link...

http://www.windowsecurity.com/articles/PowerShell-Security.html

"ExecutionPolicy"
0
 
tolinromeAuthor Commented:
I set it to unrestricted but I'm getting the same error!!!
0
 
tolinromeAuthor Commented:
thanks!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.