Deploying a PowerShell Profile?

This topic contains 3 replies, has 2 voices, and was last updated by  Nicholas Richardson 4 years ago.

  • Author
  • #16682

    Nicholas Richardson

    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!

  • #16683

    Don Jones

    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.

  • #16725

    Nicholas Richardson

    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.

  • #16740

    Nicholas Richardson

    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)
  • [/ol]

    Hope this helps some people in the future!


You must be logged in to reply to this topic.