InstallModule.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ModuleName = "InstallModuleFromGitHub" $ModulePath = "C:\Program Files\WindowsPowerShell\Modules" $TargetPath = "$($ModulePath)\$($ModuleName)" if(!(Test-Path $TargetPath)) { md $TargetPath | out-null} $targetFiles = echo ` *.psm1 ` *.psd1 ` License.txt ` ls $targetFiles | ForEach { Copy-Item -Verbose -Path $_.FullName -Destination "$($TargetPath)\$($_.name)" } |