Where should I keep profile script to be accessed by other admins

Hi ALl,
I’ve been reading that we have 6 different profile possibilities
Current user current host console
Current user all hosts
all users Current host console
all users all hosts
current user current host ISE
All users current host ISE

I’ve a AD mgmt server where multiple admins login to work on user accounts ect.
I’m owner of a powershell script that takes care of the offboarding part of a given user.
how can I use an powershell profile so that all different admins work with the same profile that I’m using?
or do I simply initiate at the start of the script to load the profile that I’ve created for this specific purpose? and which one of the above profile possibilities do I use to accomplish that.
I think at least that the profile should be saved somewhere in the public folder so that it’s accessible for everyone?
thanks for your ideas on this matter

 

Paul

all users current host does this mean that this profile is being used by either the console or ISE or is that going to be that all users on that machine work with the same profile?

Having profile script in a remote location effects performance and is error prone. Why would you want all admins to use same profile and what is in your profile script, if you can share it will be good for folks to understand the use case a lil bit more.

kvprasoon,
at this moment it’s just exploring to see if this would be a solution.
currently I have a powershell script that is taking care of the complete offboarding procedure, in order to make it work for every admin they need to install for example the azureAd module, but if there are 5 admins assigned to this region I currently would need to install it seperately for each admin which is time consuming to get it all setup.
My goal is to install everything in such a way on the mgmt-server that it’s being accessible for each admin on their user profile.
that’s also the reason that I store my powershell and csv files in the public document folder so the script will copy the required files from there to the given location under the users profile.

Paul

 

If its only modules you’re worried about, just logon to your host server and install the azuread module as a local admin, it should then be available for all users that subsequently login to the machine.

Secondly I would just do a simple check for the required modules at the beginning of the script. Something like:

$modules = get-module | select -expand name

if ($modules -contains "Azuread")
{
#do nothing, module already loaded
}
else
{
import-module azuread
}