Created
April 27, 2017 17:34
-
-
Save dfranciscus/f6bb86f5c12c37fefcaffbce492f2ce7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-PSSnapin Microsoft.BDD.PSSnapIn | |
New-PSDrive -Name "MDT" -PSProvider "MDTProvider" -Root "E:\MDT" | |
$NuGetServer = 'nugetserver' | |
$NuGetPackages = choco list --source=$NuGetServer -r | |
ForEach ($NugetPkg in $NuGetPackages) | |
{ | |
$PackageName = $NugetPkg.Split('|')[0] | |
$Version = $NugetPkg.Split('|')[1] | |
Import-MDTApplication -Path 'MDT:\Applications\test' -Name $PackageName -NoSource -Commandline "choco install $PackageName --source=$NuGetServer -y" -Shortname $PackageName -Version $Version -Enable "True" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment