Last active
August 29, 2015 14:02
-
-
Save Dan1el42/206b58c7af0eedd536c5 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
Script WindowsDeploymentServicesInitializeServer | |
{ | |
TestScript = { | |
$WdsServer = (New-Object -ComObject WdsMgmt.WdsManager).GetWdsServer("localhost") | |
return ($WdsServer.SetupManager.InitialSetupComplete) | |
} | |
SetScript = { | |
Start-Process -Wait -FilePath "C:\Windows\System32\wdsutil.exe" -ArgumentList "/Initialize-Server", "/REMINST:D:\Deployment" | |
} | |
GetScript = { | |
return @{ | |
GetScript = $GetScript | |
SetScript = $SetScript | |
TestScript = $TestScript | |
Credential = $Credential | |
Result = (Invoke-Expression -Command $TestScript) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment