What is recommended setting for execution of scripts

Jan 26, 2009 at 6:47 AM
I get this error

File C:\Users\dcohn\Documents\WindowsPowerShell\profile.ps1 cannot be loaded because the execution of scripts is disabl
ed on this system. Please see "get-help about_signing" for more details.
At line:1 char:2
+ .  <<<< 'C:\Users\dcohn\Documents\WindowsPowerShell\profile.ps1'

So I start x86 PS with runas administrator and run Set-ExecutionPolicy RemoteSigned

Is that correct?

Once I do that and restart PS as administrator it starts and brings me to a 1> prompt

Now what?  <BG>
Jan 26, 2009 at 7:19 AM
Sorry 

The now what refers to  the prompt I am getting.  if I run as administrator I get 1#,  2#,  3#  as user I get 1>, 2>  each new line the number updates.

What is the purpose of this.  None of your examples show it...

Sorry  I am new to PS and confused a bit.

I love the capabilities it seems to have...
Coordinator
Feb 10, 2009 at 3:15 PM
The numbers in the prompt indicate that command lines number in history so if I execute this:

3# get-date

Tuesday, February 10, 2009 9:13:03 AM

I can then easily re-invoke that command line history item like so using the aliases 'r' or 'ihy' (invoke-history):

4# ihy 3
get-date

Tuesday, February 10, 2009 9:13:16 AM

5# r 3
get-date

Tuesday, February 10, 2009 9:13:18 AM

Note that the # indicates you are running as admin.  In a non-admin shell, your prompt would look like:

6> invoke-history 3