Last active
February 19, 2016 20:26
-
-
Save tomtorggler/5bf93f8297d7bab17db9 to your computer and use it in GitHub Desktop.
PowerShell examples used in my blog post: https://www.ntsystems.it/post/Hyper-Convergence-with-Nano-Server-Part-1.aspx
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
# Set Location to my working directory and import helper module for Nano Server image generation | |
Set-Location C:\Nano | |
Import-Module .\NanoServerImageGenerator.psm1 | |
# Harvest four domain join blobs for the Nano Servers. | |
# Servernames will be n01 through n04 | |
1..4 | ForEach-Object { | |
djoin /Provision /Domain vdi.local /Machine n0$_ /SaveFile n0$_.txt | |
} | |
# Create Nano Server VHD files using the above imported module and the domain join blobs. | |
$NanoPass = (ConvertTo-SecureString -AsPlainText -Force -String "P@ssw0rd") | |
1..4 | ForEach-Object { | |
$params = @{ | |
BasePath = "C:\nanotemp"; | |
TargetPath = "C:\Nano\Nano_compute_n0$_.vhd"; | |
DriversPath = "C:\nano\vmdrivers"; | |
DomainBlobPath = ".\n0$_.txt"; | |
Language = "en-us"; | |
AdministratorPassword = $NanoPass | |
} | |
New-NanoServerImage @params -Compute -Storage -Clustering -OEMDrivers | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment