Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using powershell on a shared system

3 views
Skip to first unread message

OldDog

unread,
Nov 6, 2009, 4:57:15 PM11/6/09
to
Anyone have any experience with Using powershell on a shared system?
How do you set up individuale profiles?
And is there a way to set it up so that you don't get asked if it's OK
to run the script?

currently ExecutionPolicy is set to unrestricted.

Would RemoteSigned fix this?


OldDog

Larry__Weiss

unread,
Nov 6, 2009, 5:11:35 PM11/6/09
to
from:
http://msdn.microsoft.com/en-us/library/bb613488%28VS.85%29.aspx

You can have four different profiles in Windows PowerShell.
The profiles are listed in load order.
The most specific profiles have precedence over less specific profiles where
they apply.

all users:

* %windir%\system32\WindowsPowerShell\v1.0\profile.ps1
This profile applies to all users and all shells.

* %windir%\system32\WindowsPowerShell\v1.0\ Microsoft.PowerShell_profile.ps1
This profile applies to all users, but only to the Microsoft.PowerShell shell.

current user (one of each for each user):

* %UserProfile%\My Documents\WindowsPowerShell\profile.ps1
This profile applies only to the current user, but affects all shells.

* %UserProfile%\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
This profile applies only to the current user and the Microsoft.PowerShell
shell.

- Larry

Larry__Weiss

unread,
Nov 6, 2009, 5:21:20 PM11/6/09
to
My system doesn't ask permission to run a script.
What exactly does it ask you?

"unrestricted" is as liberal as it gets, and the system will trust all scripts
if that is what you see for

Get-ExecutionPolicy

- Larry

Larry__Weiss

unread,
Nov 6, 2009, 5:25:05 PM11/6/09
to
from: help set-executionpolicy -full

However, if the "Turn on Script Execution" Group Policy is enabled for
the computer or user, the user preference is written to the registry,
but it is not effective, and Windows PowerShell displays a message
explaining the conflict. You cannot use Set-ExecutionPolicy to override
a group policy, even if the user preference is more restrictive than
the policy.

Perhaps you have a group policy overriding your user setting?

- Larry

0 new messages