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.
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.