Created
February 1, 2013 16:41
-
-
Save ddhahn/4692474 to your computer and use it in GitHub Desktop.
Uses a CSV of locations and gateways to help generate a bootstrap.ini file
This file contains hidden or 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
##generate bootstrap.ini settings | |
$csv = Import-Csv -Path c:\temp\import.csv | |
del c:\temp\defaultgateway-out.txt | |
del c:\temp\defaultgateway-out1.txt | |
for ($i=0;$i -le $csv.count;$i++) { | |
##output assignments for [defaultgateway] string | |
$outstring = $csv[$i]."Default Gateway for Workstations (used to target deployroot)" + "=" + $csv[$i]."office name" | |
Out-File -InputObject $outstring -FilePath "c:\temp\defaultgateway-out.txt" -Encoding ASCII -Append | |
$outstring = "[" + $csv[$i]."office name" + "]" | |
Out-File -InputObject $outstring -FilePath "c:\temp\defaultgateway-out1.txt" -Encoding ASCII -Append | |
$outstring = "deployroot=\\" + $csv[$i]."server name" + "\" + $csv[$i]."share" | |
Out-File -InputObject $outstring -FilePath "c:\temp\defaultgateway-out1.txt" -Encoding ASCII -Append | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment