# Loads the profile for all users. $locationOfScriptsToLoad = "\\YourCorporateServer\PowerShell\" $files = (ls -path $locationOfScriptsToLoad -recurse | where { $_.attributes -ne "directory" }) foreach($file in $files) { # Load the contents of the into the profile $fileContents = [string]::join([environment]::newline, (get-content -path $file.fullname)) invoke-expression $fileContents }