This topic contains 3 replies, has 2 voices, and was last updated by
June 30, 2014 at 12:28 pm #16682
Hello, I was wondering if anyone knows of a good way to deploy a default PowerShell profile to a group of machines. I have tried to create a profile on a few remote machines using a PowerShell start up script through group policy. Unfortunately it seems that UAC is preventing this file from being created. The reason I would like to create a default profile is for a group of our technicians. In this profile I can point a network path for the modules and drop in some custom modules and functions that could save them some time while they are out in the field.
Thanks for any help!
June 30, 2014 at 2:12 pm #16683KeymasterPoints: 1Rank: Member
There are four PowerShell profile scripts: Two for each host (console and ISE). For each host, one script is "current user" and the other is "all users."
It should just be a file copy operation, especially the "all users" scripts, as they aren't in a user's home folder.
However, that's not the right way to point a network path for modules. You should do that by modifying the PSModulePath environment variable in Windows – such as in a GPO. For example, modify it to include a UNC path for your network, and to include C:\Program Files\WindowsPowerShell\Modules (that is included already in v4+). Any custom local modules should be deployed to that Program Files location for offline availability – they don't need to go in a profile.
July 2, 2014 at 10:04 am #16725
Thank you very much! I will take a look at this. Trying to copy a default profile over to each machine via logon script was tending to produce results.
July 2, 2014 at 2:08 pm #16740
Found a very easy way to do this through group policy.
- Open Group Policy Management
- Navigate to the desired Organizational Unit
- Create or edit the desired group policy
- Navigate to "User Configuration" -> "Preferences" -> "Windows Settings" -> "Environment"
- Right Click in the UI Area
- Set Action to : Update
- Select the "System Variable" radio button
- Set Value to your desired path (This can be a network path)
Hope this helps some people in the future!
The topic ‘Deploying a PowerShell Profile?’ is closed to new replies.