Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Cant run powershell script with .PS1 extension

Posted on 2007-10-15
4
Medium Priority
?
1,881 Views
Last Modified: 2012-06-27
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?
0
Comment
Question by:tolinrome
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:bsharath
ID: 20082734
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
 
LVL 7

Author Comment

by:tolinrome
ID: 20082770
I set it to unrestricted but I'm getting the same error!!!
0
 
LVL 11

Accepted Solution

by:
bsharath earned 2000 total points
ID: 20082791
Just try using it like this...

.\filename.ps1
Change the "Filename" to your filename
Where is the file locate
0
 
LVL 7

Author Comment

by:tolinrome
ID: 20082828
thanks!!!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses
Course of the Month20 days, 17 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question