functions/module/Initialize-PSModulePath.ps1
1 2 3 4 5 6 7 |
function Initialize-PSModulePath { $documentsDir = [Environment]::GetFolderPath("MyDocuments") $currUserPSModulePath = "$documentsDir\WindowsPowerShell\Modules" New-Item $currUserPSModulePath -ItemType Directory -Force | Out-Null Add-PSModulePath -Path $currUserPSModulePath } |