Skip to content

Instantly share code, notes, and snippets.

@Dan1el42
Last active August 29, 2015 14:02
Show Gist options
  • Save Dan1el42/206b58c7af0eedd536c5 to your computer and use it in GitHub Desktop.
Save Dan1el42/206b58c7af0eedd536c5 to your computer and use it in GitHub Desktop.
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