Promote a 2012 DC using PowerShell 3.0 workflow hangs on Install-ADDSForest

Hi,
seeing the value in PowerShell 3.0 workflow for machine / classroom installation I am trying to automate the entire installation of a SharePoint 2013 machine. First steps include making the server a domain controller.
To promote the domain controller  I make use of the ADDSDeployment module / Install-ADDSForest command. When used in a normal, non-workflow, PowerShell session the command works just fine. However, when running this command in a workflow that continues
after a reboot the command seems to hang. I also found that debugging a workflow, well, is rather difficult :)
First, my sample script configures the computer name. Next it reboots. The workflow will be continueing with the installion of the AD-Domain-Services feature. Right after that I call Install-ADDSForest. You can find the full script below.
For getting the workflow to auto-continue after the reboot I have used two approaches. I have tried to use the RunOnce registry key to fire up PowerShell. This would be my preferred approach as you can see the PowerShell window running before the Explorer
shell loads. The second approach involves the scheduled task trigger as described on Technet in the PowerShell workflow section. Either way, the promotion command is stuck. I have left it running overnight, after which the workflow still wasn't done.
Here's my awesomeness:
workflow Install-Wingtip {
InlineScript {
$Computer = Get-WmiObject Win32_ComputerSystem
$Computer.Rename("WingtipDC") | Out-Null
#Get ready for reboot
#Either use the RunOnce key combined with auto-login
#Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce" `-Name "ConfigureServer" -Value "powershell -executionPolicy Unrestricted -Command Import-Module PSWorkflow; Get-Job | Resume-Job -Wait; Get-Job | Wait-Job"
#Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "DefaultUserName" -Value "Administrator"
#Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "DefaultPassword" -Value "pass@word1"
#Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "AutoAdminLogon" -Value "1"
#Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "AutoLogonCount" -Value "1"
# Or use a -AtStartup trigger
$Trigger = New-ScheduledTaskTrigger -AtStartup
Register-ScheduledJob -Name ResumeWorkflow -Trigger $Trigger -ScriptBlock { Import-Module PSWorkflow; Get-Job -State Suspended | Resume-Job }
Restart-Computer -Wait
InlineScript {
Import-Module ServerManager
Install-WindowsFeature AD-Domain-Services
InlineScript {
Import-Module ADDSDeployment
Install-ADDSForest `
-DomainName "Wingtip.com" `
-DomainNetbiosName "Wingtip" `
-SafeModeAdministratorPassword (ConvertTo-SecureString -String "pass@word1" -AsPlainText -Force) `
-NoDnsOnNetwork `
-InstallDns `
-DomainMode Win2008R2 `
-ForestMode Win2008R2 `
-NoRebootOnCompletion `
-Confirm:$false
Write-Output -InputObject "Done creating domain controller"
Perhaps anyone has tried something similar? I cannot be the only one looking at promoting a DC through workflow I guess!
Thanks,
Wouter

Hi Diana,
during the setup there is no dcpromo.log present in the folder you mention. I have a dcpromoui.log and a dfsr000001.log as well as a netsetup.log. Fun stuff, if I read the dcpromoui.log correctly it should have created a domain controller and a new forest.
However, my machine is still member of a workgroup after reboot, so it isn't in the state you'd expect.
DCPROMOUI LOG
dcpromoui 3A0.9F0 0196 23:41:22.366         Enter CheckDomainDnsNormalization Wingtip.com
dcpromoui 3A0.9F0 0197 23:41:22.366           Enter ValidateDnsNameNormalization Wingtip.com
dcpromoui 3A0.9F0 0198 23:41:22.366             The canonical form is wingtip.com.
dcpromoui 3A0.9F0 0199 23:41:22.366             result = true
dcpromoui 3A0.9F0 019A 23:41:22.366         Enter State::SetNewDomainDNSName Wingtip.com
dcpromoui 3A0.9F0 019B 23:41:22.366       performed state 9, next state 18
dcpromoui 3A0.9F0 019C 23:41:22.366       Enter NetbiosNameFunct
dcpromoui 3A0.9F0 019D 23:41:22.366         Enter GetAnswerFileOption DomainNetbiosName
dcpromoui 3A0.9F0 019E 23:41:22.366           Enter AnswerFile::GetOption DomainNetbiosName
dcpromoui 3A0.9F0 019F 23:41:22.366             using value from cmdline
dcpromoui 3A0.9F0 01A0 23:41:22.366             Wingtip
dcpromoui 3A0.9F0 01A1 23:41:22.366         Enter NetbiosNameFunctInternal
dcpromoui 3A0.9F0 01A2 23:41:22.366           Enter ValidateDomainNetbiosName Wingtip
dcpromoui 3A0.9F0 01A3 23:41:22.366             Enter Dns::HostnameToNetbiosName Wingtip
dcpromoui 3A0.9F0 01A4 23:41:22.366               WINGTIP
dcpromoui 3A0.9F0 01A5 23:41:22.366             Enter ValidateNetbiosDomainName WINGTIP
dcpromoui 3A0.9F0 01A6 23:41:22.366               Enter NetbiosValidationHelper
dcpromoui 3A0.9F0 01A7 23:41:22.366                 Calling NetpwNameValidate
dcpromoui 3A0.9F0 01A8 23:41:22.366                 valid name
dcpromoui 3A0.9F0 01A9 23:41:22.366             Enter MyNetValidateName
dcpromoui 3A0.9F0 01AA 23:41:22.366               Calling NetValidateName
dcpromoui 3A0.9F0 01AB 23:41:22.366               lpServer   : (null)
dcpromoui 3A0.9F0 01AC 23:41:22.366               lpName     : Wingtip
dcpromoui 3A0.9F0 01AD 23:41:22.366               lpAccount  : (null)
dcpromoui 3A0.9F0 01AE 23:41:22.366               lpPassword : (null)
dcpromoui 3A0.9F0 01AF 23:41:22.366               NameType   : NetSetupNonExistentDomain
dcpromoui 3A0.9F0 01B0 23:41:22.366               Using the same thread : true
dcpromoui 3A0.9F0 01B1 23:41:27.788               HRESULT = 0x00000000
dcpromoui 3A0.9F0 01B2 23:41:27.788           ValidateDomainNetbiosName returned 0
dcpromoui 3A0.9F0 01B3 23:41:27.788           Enter State::SetNewDomainNetbiosName Wingtip
dcpromoui 3A0.9F0 01B4 23:41:27.788           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01B5 23:41:27.788       performed state 18, next state 19
dcpromoui 3A0.9F0 01B6 23:41:27.788       Enter ForestFunctionalLevelFunct
dcpromoui 3A0.9F0 01B7 23:41:27.788         Enter GetAnswerFileOption ForestLevel
dcpromoui 3A0.9F0 01B8 23:41:27.788           Enter AnswerFile::GetOption ForestLevel
dcpromoui 3A0.9F0 01B9 23:41:27.788             using value from cmdline
dcpromoui 3A0.9F0 01BA 23:41:27.788             4
dcpromoui 3A0.9F0 01BB 23:41:27.788         Enter State::SetForestFunctionalLevel
dcpromoui 3A0.9F0 01BC 23:41:27.788           forest functional level: 4
dcpromoui 3A0.9F0 01BD 23:41:27.788       performed state 19, next state 20
dcpromoui 3A0.9F0 01BE 23:41:27.788       Enter DomainFunctionalLevelFunct
dcpromoui 3A0.9F0 01BF 23:41:27.788         Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01C0 23:41:27.788         Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01C1 23:41:27.788         Enter State::GetForestFunctionalLevel
dcpromoui 3A0.9F0 01C2 23:41:27.788           forest functional level: 4
dcpromoui 3A0.9F0 01C3 23:41:27.788         Enter GetAnswerFileOption DomainLevel
dcpromoui 3A0.9F0 01C4 23:41:27.788           Enter AnswerFile::GetOption DomainLevel
dcpromoui 3A0.9F0 01C5 23:41:27.788             using value from cmdline
dcpromoui 3A0.9F0 01C6 23:41:27.788             4
dcpromoui 3A0.9F0 01C7 23:41:27.788         Enter State::SetDomainFunctionalLevel
dcpromoui 3A0.9F0 01C8 23:41:27.788           domain functional level: 4
dcpromoui 3A0.9F0 01C9 23:41:27.788       performed state 20, next state 14
dcpromoui 3A0.9F0 01CA 23:41:27.788       Enter SiteSelectionFunct
dcpromoui 3A0.9F0 01CB 23:41:27.788         Enter GetAnswerFileOption SiteName
dcpromoui 3A0.9F0 01CC 23:41:27.788           Enter AnswerFile::GetOption SiteName
dcpromoui 3A0.9F0 01CD 23:41:27.788            
dcpromoui 3A0.9F0 01CE 23:41:27.788         Enter SiteSelectionFunctInternal
dcpromoui 3A0.9F0 01CF 23:41:27.788           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01D0 23:41:27.788           Enter ValidateSiteName
dcpromoui 3A0.9F0 01D1 23:41:27.788             Enter DoLabelValidation
dcpromoui 3A0.9F0 01D2 23:41:27.788               Enter Dns::ValidateDnsLabelSyntax Default-First-Site-Name
dcpromoui 3A0.9F0 01D3 23:41:27.788                 Enter DoDnsValidation s: Default-First-Site-Name, max len unicode: 63, max len utf8: 63
dcpromoui 3A0.9F0 01D4 23:41:27.788                   name is 23 utf-8 bytes
dcpromoui 3A0.9F0 01D5 23:41:27.788                   Enter MyDnsValidateName Default-First-Site-Name
dcpromoui 3A0.9F0 01D6 23:41:27.788                     Calling DnsValidateName
dcpromoui 3A0.9F0 01D7 23:41:27.788                     pszName : Default-First-Site-Name
dcpromoui 3A0.9F0 01D8 23:41:27.788                     Format  : 3
dcpromoui 3A0.9F0 01D9 23:41:27.788                     status 0x0
dcpromoui 3A0.9F0 01DA 23:41:27.788                     ERROR_SUCCESS
dcpromoui 3A0.9F0 01DB 23:41:27.788             Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01DC 23:41:27.788           Enter State::SetSiteName Default-First-Site-Name
dcpromoui 3A0.9F0 01DD 23:41:27.788       performed state 14, next state 15
dcpromoui 3A0.9F0 01DE 23:41:27.788       Enter AdditionalDcRolesFunct
dcpromoui 3A0.9F0 01DF 23:41:27.788         Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01E0 23:41:27.788         Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 01E1 23:41:27.788         Enter State::GetInstallDnsUserOption
dcpromoui 3A0.9F0 01E2 23:41:27.788           Enter GetAnswerFileOption InstallDNS
dcpromoui 3A0.9F0 01E3 23:41:27.788             Enter AnswerFile::GetOption InstallDNS
dcpromoui 3A0.9F0 01E4 23:41:27.788              
dcpromoui 3A0.9F0 01E5 23:41:27.788           Enter GetAnswerFileOption AutoConfigDNS
dcpromoui 3A0.9F0 01E6 23:41:27.788             Enter AnswerFile::GetOption AutoConfigDNS
dcpromoui 3A0.9F0 01E7 23:41:27.788              
dcpromoui 3A0.9F0 01E8 23:41:27.788         Enter AdditionalDcRolesFunctCheckDnsConfig
dcpromoui 3A0.9F0 01E9 23:41:27.788           Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 01EA 23:41:27.788           Enter State::IsDNSOnNetwork false
dcpromoui 3A0.9F0 01EB 23:41:27.788           Enter GetDefaultChoiceForDnsInstallation
dcpromoui 3A0.9F0 01EC 23:41:27.788             Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01ED 23:41:27.788             Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 01EE 23:41:27.788             Enter Dns::IsServiceInstalled
dcpromoui 3A0.9F0 01EF 23:41:27.788               Enter NTService::IsInstalled dns
dcpromoui 3A0.9F0 01F0 23:41:27.788                 Enter MyOpenService
dcpromoui 3A0.9F0 01F1 23:41:27.788                   Enter Win::OpenSCManager
dcpromoui 3A0.9F0 01F2 23:41:27.788                   Enter Win::OpenService dns
dcpromoui 3A0.9F0 01F3 23:41:27.788                   HRESULT = 0x80070424
dcpromoui 3A0.9F0 01F4 23:41:27.788               service is not installed.
dcpromoui 3A0.9F0 01F5 23:41:27.788             Enter State::SetDnsServerAlreadyInstalled
dcpromoui 3A0.9F0 01F6 23:41:27.788               b = false
dcpromoui 3A0.9F0 01F7 23:41:27.788             Enter State::IsDnsServerAlreadyInstalled
dcpromoui 3A0.9F0 01F8 23:41:27.788               bDnsServerAlreadyInstalled = false
dcpromoui 3A0.9F0 01F9 23:41:27.788           Enter State::SetAutoConfigureDNS true
dcpromoui 3A0.9F0 01FA 23:41:27.788           Enter TxtCheckCreateDnsDelegationOptions
dcpromoui 3A0.9F0 01FB 23:41:27.788             Enter State::GetDnsDelegationUserOption
dcpromoui 3A0.9F0 01FC 23:41:27.788               Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 01FD 23:41:27.788               Enter GetAnswerFileOption CreateDNSDelegation
dcpromoui 3A0.9F0 01FE 23:41:27.788                 Enter AnswerFile::GetOption CreateDNSDelegation
dcpromoui 3A0.9F0 01FF 23:41:27.788                  
dcpromoui 3A0.9F0 0200 23:41:27.788             Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 0201 23:41:27.788             bResult = true
dcpromoui 3A0.9F0 0202 23:41:27.788           Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 0203 23:41:27.788           Do install DNS server
dcpromoui 3A0.9F0 0204 23:41:27.788         Enter GetAnswerFileOption ConfirmGc
dcpromoui 3A0.9F0 0205 23:41:27.788           Enter AnswerFile::GetOption ConfirmGc
dcpromoui 3A0.9F0 0206 23:41:27.788            
dcpromoui 3A0.9F0 0207 23:41:27.788         Enter State::SetGlobalCatalogOption true
dcpromoui 3A0.9F0 0208 23:41:27.788         Enter State::GetGlobalCatalogOption true
dcpromoui 3A0.9F0 0209 23:41:27.788         This DC will be a GC
dcpromoui 3A0.9F0 020A 23:41:27.788         Enter GetAnswerFileOption ReplicaOrNewDomain
dcpromoui 3A0.9F0 020B 23:41:27.788           Enter AnswerFile::GetOption ReplicaOrNewDomain
dcpromoui 3A0.9F0 020C 23:41:27.788             using value from cmdline
dcpromoui 3A0.9F0 020D 23:41:27.788             Domain
dcpromoui 3A0.9F0 020E 23:41:27.788         Enter State::IsReadOnlyReplica false
dcpromoui 3A0.9F0 020F 23:41:27.788         Enter TxtCheckConflictingDcAccount
dcpromoui 3A0.9F0 0210 23:41:27.788           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0211 23:41:27.788           Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 0212 23:41:27.788           bResult = true
dcpromoui 3A0.9F0 0213 23:41:27.788         Enter TxtCheckRidMasterOnlineRequirement
dcpromoui 3A0.9F0 0214 23:41:27.788           Enter ValidateRidMasterOnlineRequirement
dcpromoui 3A0.9F0 0215 23:41:27.788             Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0216 23:41:27.788             Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 0217 23:41:27.788             bResult = true
dcpromoui 3A0.9F0 0218 23:41:27.788           bResult = true
dcpromoui 3A0.9F0 0219 23:41:27.788         Enter State::IsReadOnlyReplica false
dcpromoui 3A0.9F0 021A 23:41:27.788         Enter State::IsReadOnlyReplica false
dcpromoui 3A0.9F0 021B 23:41:27.788         Enter TxtCheckTransferIMRoleOptions
dcpromoui 3A0.9F0 021C 23:41:27.788           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 021D 23:41:27.788           bResult = true
dcpromoui 3A0.9F0 021E 23:41:27.788         Enter TxtCheckIMGCCompatibility
dcpromoui 3A0.9F0 021F 23:41:27.788           Enter State::SetNeedToTransferIMRole
dcpromoui 3A0.9F0 0220 23:41:27.788             b = false
dcpromoui 3A0.9F0 0221 23:41:27.788           Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 0222 23:41:27.788           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0223 23:41:27.788         Enter State::IsDnsServerAlreadyInstalled
dcpromoui 3A0.9F0 0224 23:41:27.788           bDnsServerAlreadyInstalled = false
dcpromoui 3A0.9F0 0225 23:41:27.788         Enter AdditionalDcRolesFunctDnsRegistrationTest
dcpromoui 3A0.9F0 0226 23:41:27.788           Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 0227 23:41:27.788           Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 0228 23:41:27.788           Enter TxtIsReadyForDnsInstallation
dcpromoui 3A0.9F0 0229 23:41:27.788             Enter VerifyStaticIpPresent
dcpromoui 3A0.9F0 022A 23:41:27.788               Adapter name: {11492924-E5D4-4AE7-B958-9E9E8CC9DAB0}
dcpromoui 3A0.9F0 022B 23:41:27.788               Examining the IP address 0
dcpromoui 3A0.9F0 022C 23:41:27.788               Not a global IPv6 address. No need to check it.
dcpromoui 3A0.9F0 022D 23:41:27.788               Examining the IP address 1
dcpromoui 3A0.9F0 022E 23:41:27.788               Found a static IPv4 address
dcpromoui 3A0.9F0 022F 23:41:27.788               Adapter name: {6F0E278D-D6F9-11E1-93E4-806E6F6E6963}
dcpromoui 3A0.9F0 0230 23:41:27.788               The adapter does not have a physical connector.
dcpromoui 3A0.9F0 0231 23:41:27.788               Adapter name: {EBA06FBF-9547-4E40-A37A-0FE83A6AF676}
dcpromoui 3A0.9F0 0232 23:41:27.788               The adapter does not have a physical connector.
dcpromoui 3A0.9F0 0233 23:41:27.788               HRESULT = 0x00000000
dcpromoui 3A0.9F0 0234 23:41:27.788           Enter TxtRunDnsRegistrationTest
dcpromoui 3A0.9F0 0235 23:41:27.788             Enter NeedToDiagnoseDnsRegistration
dcpromoui 3A0.9F0 0236 23:41:27.788               Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0237 23:41:27.788               bRunDnsRegistrationTest = true
dcpromoui 3A0.9F0 0238 23:41:27.788             Enter DnsRegistrationTest
dcpromoui 3A0.9F0 0239 23:41:27.788               Enter GetServerAndDomainForDnsDiagnosis
dcpromoui 3A0.9F0 023A 23:41:27.788                 Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 023B 23:41:27.788                 Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 023C 23:41:27.788                 Enter State::GetNewDomainDNSName Wingtip.com
dcpromoui 3A0.9F0 023D 23:41:27.788               Enter DiagnoseDnsRegistration
dcpromoui 3A0.9F0 023E 23:41:27.788                 Enter FindAuthoritativeServer _ldap._tcp.dc._msdcs.Wingtip.com
dcpromoui 3A0.9F0 023F 23:41:27.788                   Enter FullyQualifyDnsName _ldap._tcp.dc._msdcs.Wingtip.com
dcpromoui 3A0.9F0 0240 23:41:27.788                   Enter MyDnsQuery _ldap._tcp.dc._msdcs.Wingtip.com.
dcpromoui 3A0.9F0 0241 23:41:27.788                     Calling DnsQuery_W
dcpromoui 3A0.9F0 0242 23:41:27.788                     lpstrName : _ldap._tcp.dc._msdcs.Wingtip.com.
dcpromoui 3A0.9F0 0243 23:41:27.788                     wType     : 6
dcpromoui 3A0.9F0 0244 23:41:27.788                     fOptions  : 8
dcpromoui 3A0.9F0 0245 23:41:27.788                     status = 000005B4
dcpromoui 3A0.9F0 0246 23:41:27.788                     ERROR_TIMEOUT
dcpromoui 3A0.9F0 0247 23:41:27.788                   failed to find autoritative server.
dcpromoui 3A0.9F0 0248 23:41:27.788                   result = 000005B4
dcpromoui 3A0.9F0 0249 23:41:27.788                   authZone            =
dcpromoui 3A0.9F0 024A 23:41:27.788                   authServer          =
dcpromoui 3A0.9F0 024B 23:41:27.788                   authServerIpAddress =
dcpromoui 3A0.9F0 024C 23:41:27.788                 timeout
dcpromoui 3A0.9F0 024D 23:41:27.788                 DiagnosticCode = b
dcpromoui 3A0.9F0 024E 23:41:27.788               Enter State::SetParentZoneName
dcpromoui 3A0.9F0 024F 23:41:27.788               server name:            _ldap._tcp.dc._msdcs.Wingtip.com
dcpromoui 3A0.9F0 0250 23:41:27.788               error code:             1460
dcpromoui 3A0.9F0 0251 23:41:27.788               Auth zone:             
dcpromoui 3A0.9F0 0252 23:41:27.788               Auth server:           
dcpromoui 3A0.9F0 0253 23:41:27.788               Auth server IP address:
dcpromoui 3A0.9F0 0254 23:41:27.788               diagnosticResultCode:   11
dcpromoui 3A0.9F0 0255 23:41:27.804               Enter GetErrorMessage 800705B4
dcpromoui 3A0.9F0 0256 23:41:27.804             Enter State::SetDnsRegistrationTestSucceeded
dcpromoui 3A0.9F0 0257 23:41:27.804               b = false
dcpromoui 3A0.9F0 0258 23:41:27.804             Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0259 23:41:27.804             Enter NeedToCreateDelegationOrShowDnsRegistrationDiagnosis
dcpromoui 3A0.9F0 025A 23:41:27.804               Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 025B 23:41:27.804               Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 025C 23:41:27.804               Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 025D 23:41:27.804             Enter State::SetCreateDnsDelegation false
dcpromoui 3A0.9F0 025E 23:41:27.804             Enter State::SetDnsDelegationOptionChangeable false
dcpromoui 3A0.9F0 025F 23:41:27.804             Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0260 23:41:27.804             Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0261 23:41:27.804             Enter State::GetNewDomainDNSName Wingtip.com
dcpromoui 3A0.9F0 0262 23:41:27.804             Warning: A delegation for this DNS server cannot be created because the authoritative parent zone cannot be found or it does not run Windows DNS server.
If you are integrating with an existing DNS infrastructure, you should manually create a delegation to this DNS server in the parent zone to ensure reliable name resolution from outside the domain "Wingtip.com". Otherwise, no action is required.
dcpromoui 3A0.9F0 0263 23:41:27.804             Enter State::AddFinishMessage A delegation for this DNS server cannot be created because the authoritative parent zone cannot be found or it does not
run Windows DNS server. If you are integrating with an existing DNS infrastructure, you should manually create a delegation to this DNS server in the parent zone to ensure reliable name resolution from outside the domain "Wingtip.com". Otherwise, no action
is required.
dcpromoui 3A0.9F0 0264 23:41:27.804             DNS delegation will not be created due to DNS diagnostics failure.
dcpromoui 3A0.9F0 0265 23:41:27.804         Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 0266 23:41:27.804       performed state 15, next state 16
dcpromoui 3A0.9F0 0267 23:41:27.804       Enter DnsDelegationFunct
dcpromoui 3A0.9F0 0268 23:41:27.804         Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 0269 23:41:27.804         Enter State::GetDnsDelegationUserOption
dcpromoui 3A0.9F0 026A 23:41:27.804           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 026B 23:41:27.804           Enter GetAnswerFileOption CreateDNSDelegation
dcpromoui 3A0.9F0 026C 23:41:27.804             Enter AnswerFile::GetOption CreateDNSDelegation
dcpromoui 3A0.9F0 026D 23:41:27.804              
dcpromoui 3A0.9F0 026E 23:41:27.804         Enter State::GetDnsDelegationOptionChangeable false
dcpromoui 3A0.9F0 026F 23:41:27.804         Enter State::GetCreateDnsDelegation false
dcpromoui 3A0.9F0 0270 23:41:27.804         Enter State::GetCreateDnsDelegation false
dcpromoui 3A0.9F0 0271 23:41:27.804         Enter State::GetCreateDnsDelegation false
dcpromoui 3A0.9F0 0272 23:41:27.804         Enter State::GetDnsRegistrationTestSucceeded
dcpromoui 3A0.9F0 0273 23:41:27.804           m_bDnsRegistrationTestSucceeded = false
dcpromoui 3A0.9F0 0274 23:41:27.804         Enter State::SetHadNonCriticalFailures
dcpromoui 3A0.9F0 0275 23:41:27.804           b = true
dcpromoui 3A0.9F0 0276 23:41:27.804       performed state 16, next state 25
dcpromoui 3A0.9F0 0277 23:41:27.804       Enter PathsFunct
dcpromoui 3A0.9F0 0278 23:41:27.804         Enter GetAnswerFileOption DatabasePath
dcpromoui 3A0.9F0 0279 23:41:27.804           Enter AnswerFile::GetOption DatabasePath
dcpromoui 3A0.9F0 027A 23:41:27.804            
dcpromoui 3A0.9F0 027B 23:41:27.804         Enter GetAnswerFileOption LogPath
dcpromoui 3A0.9F0 027C 23:41:27.804           Enter AnswerFile::GetOption LogPath
dcpromoui 3A0.9F0 027D 23:41:27.804            
dcpromoui 3A0.9F0 027E 23:41:27.804         Enter GetAnswerFileOption SYSVOLPath
dcpromoui 3A0.9F0 027F 23:41:27.804           Enter AnswerFile::GetOption SYSVOLPath
dcpromoui 3A0.9F0 0280 23:41:27.804            
dcpromoui 3A0.9F0 0281 23:41:27.804         Enter DetermineDefaultSysvolPath
dcpromoui 3A0.9F0 0282 23:41:27.804           Enter FS::GetFileSystemType
dcpromoui 3A0.9F0 0283 23:41:27.804             Enter FS::GetRootFolder C:\Windows
dcpromoui 3A0.9F0 0284 23:41:27.804               Enter FS::GetPathSyntax C:\Windows
dcpromoui 3A0.9F0 0285 23:41:27.804             HRESULT = 0x00000000
dcpromoui 3A0.9F0 0286 23:41:27.804           C:\Windows\
dcpromoui 3A0.9F0 0287 23:41:27.804         dbPath=C:\Windows\NTDS, logPath=C:\Windows\NTDS
dcpromoui 3A0.9F0 0288 23:41:27.804         sysvol path C:\Windows\SYSVOL
dcpromoui 3A0.9F0 0289 23:41:27.804         Enter FS::NormalizePath C:\Windows\NTDS
dcpromoui 3A0.9F0 028A 23:41:27.804         Enter FS::NormalizePath C:\Windows\NTDS
dcpromoui 3A0.9F0 028B 23:41:27.804         Enter FS::NormalizePath C:\Windows\SYSVOL
dcpromoui 3A0.9F0 028C 23:41:27.804         Enter TxtValidateDcInstallPath
dcpromoui 3A0.9F0 028D 23:41:27.804           Enter ValidateDcInstallPath
dcpromoui 3A0.9F0 028E 23:41:27.804             Enter FS::GetPathSyntax C:\Windows\NTDS
dcpromoui 3A0.9F0 028F 23:41:27.804             Enter PathHasNonAsciiCharacters C:\Windows\NTDS
dcpromoui 3A0.9F0 0290 23:41:27.804               result = false
dcpromoui 3A0.9F0 0291 23:41:27.804             Enter CheckDriveType
dcpromoui 3A0.9F0 0292 23:41:27.804               Enter IsSupportedDriveType
dcpromoui 3A0.9F0 0293 23:41:27.804         Enter FS::GetRootFolder C:\Windows\NTDS
dcpromoui 3A0.9F0 0294 23:41:27.804           Enter FS::GetPathSyntax C:\Windows\NTDS
dcpromoui 3A0.9F0 0295 23:41:27.804         Enter FS::GetRootFolder C:\Windows\NTDS
dcpromoui 3A0.9F0 0296 23:41:27.804           Enter FS::GetPathSyntax C:\Windows\NTDS
dcpromoui 3A0.9F0 0297 23:41:27.804         Enter checkDiskSpace
dcpromoui 3A0.9F0 0298 23:41:27.804           Enter FS::GetRootFolder C:\
dcpromoui 3A0.9F0 0299 23:41:27.804             Enter FS::GetPathSyntax C:\
dcpromoui 3A0.9F0 029A 23:41:27.804           Enter FS::GetAvailableSpace C:\
dcpromoui 3A0.9F0 029B 23:41:27.804         Enter State::SetDatabasePath C:\Windows\NTDS
dcpromoui 3A0.9F0 029C 23:41:27.804         Enter State::SetLogPath C:\Windows\NTDS
dcpromoui 3A0.9F0 029D 23:41:27.804         Enter TxtValidateDcInstallPath
dcpromoui 3A0.9F0 029E 23:41:27.804           Enter ValidateDcInstallPath
dcpromoui 3A0.9F0 029F 23:41:27.804             Enter FS::GetPathSyntax C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02A0 23:41:27.804             Enter CheckDriveType
dcpromoui 3A0.9F0 02A1 23:41:27.804               Enter IsSupportedDriveType
dcpromoui 3A0.9F0 02A2 23:41:27.804             Enter FS::GetFileSystemType
dcpromoui 3A0.9F0 02A3 23:41:27.804               Enter FS::GetRootFolder C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02A4 23:41:27.804                 Enter FS::GetPathSyntax C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02A5 23:41:27.804               HRESULT = 0x00000000
dcpromoui 3A0.9F0 02A6 23:41:27.804         Enter TxtValidateSYSVOLPath
dcpromoui 3A0.9F0 02A7 23:41:27.804           Enter validateSysvolPath
dcpromoui 3A0.9F0 02A8 23:41:27.804             Enter State::GetDatabasePath C:\Windows\NTDS
dcpromoui 3A0.9F0 02A9 23:41:27.804             Enter State::GetLogPath C:\Windows\NTDS
dcpromoui 3A0.9F0 02AA 23:41:27.804             Enter FS::IsParentFolder
dcpromoui 3A0.9F0 02AB 23:41:27.804             Enter FS::IsParentFolder
dcpromoui 3A0.9F0 02AC 23:41:27.804             Enter State::ReplicateFromMedia false
dcpromoui 3A0.9F0 02AD 23:41:27.804             Enter checkDiskSpace
dcpromoui 3A0.9F0 02AE 23:41:27.804               Enter FS::GetRootFolder C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02AF 23:41:27.804                 Enter FS::GetPathSyntax C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02B0 23:41:27.804               Enter FS::GetAvailableSpace C:\
dcpromoui 3A0.9F0 02B1 23:41:27.804           validStatus = 0x0
dcpromoui 3A0.9F0 02B2 23:41:27.804           Enter State::GetDatabasePath C:\Windows\NTDS
dcpromoui 3A0.9F0 02B3 23:41:27.804           Enter State::GetLogPath C:\Windows\NTDS
dcpromoui 3A0.9F0 02B4 23:41:27.804           true
dcpromoui 3A0.9F0 02B5 23:41:27.804         Enter State::SetSYSVOLPath C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02B6 23:41:27.804       performed state 25, next state 26
dcpromoui 3A0.9F0 02B7 23:41:27.804       Enter SafeModePasswordFunct
dcpromoui 3A0.9F0 02B8 23:41:27.804         Enter GetEncryptedAnswerFileOption SafeModeAdminPassword
dcpromoui 3A0.9F0 02B9 23:41:27.804           Enter AnswerFile::GetEncryptedOption SafeModeAdminPassword
dcpromoui 3A0.9F0 02BA 23:41:27.804         Enter SafeModePasswordFunctInternal
dcpromoui 3A0.9F0 02BB 23:41:27.804           Enter TxtIsValidPassword
dcpromoui 3A0.9F0 02BC 23:41:27.804             Enter IsValidPassword
dcpromoui 3A0.9F0 02BD 23:41:27.804               Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 02BE 23:41:27.804               Enter ValidatePasswordAgainstPolicy
dcpromoui 3A0.9F0 02BF 23:41:27.804                 Using current user context ...
dcpromoui 3A0.9F0 02C0 23:41:27.851                 HRESULT = 0x00000000
dcpromoui 3A0.9F0 02C1 23:41:27.851           Enter State::SetSafeModeAdminPassword
dcpromoui 3A0.9F0 02C2 23:41:27.851       performed state 26, next state 28
dcpromoui 3A0.9F0 02C3 23:41:27.851       Enter ConfirmFunct
dcpromoui 3A0.9F0 02C4 23:41:27.851         Enter GetMessage
dcpromoui 3A0.9F0 02C5 23:41:27.851           Enter State::GetNewDomainNetbiosName Wingtip
dcpromoui 3A0.9F0 02C6 23:41:27.851           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 02C7 23:41:27.851           Enter State::GetNewDomainDNSName Wingtip.com
dcpromoui 3A0.9F0 02C8 23:41:27.851         Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 02C9 23:41:27.851         Enter State::GetMode NORMAL
dcpromoui 3A0.9F0 02CA 23:41:27.866         Enter State::GetForestFunctionalLevel
dcpromoui 3A0.9F0 02CB 23:41:27.866           forest functional level: 4
dcpromoui 3A0.9F0 02CC 23:41:27.866         Enter State::GetDomainFunctionalLevel
dcpromoui 3A0.9F0 02CD 23:41:27.866           domain functional level: 4
dcpromoui 3A0.9F0 02CE 23:41:27.866         Enter State::IsRepair false
dcpromoui 3A0.9F0 02CF 23:41:27.866         Enter State::GetSiteName Default-First-Site-Name
dcpromoui 3A0.9F0 02D0 23:41:27.866         Enter State::IsReadOnlyReplica false
dcpromoui 3A0.9F0 02D1 23:41:27.866         Enter State::GetGlobalCatalogOption true
dcpromoui 3A0.9F0 02D2 23:41:27.866         Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 02D3 23:41:27.866         Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 02D4 23:41:27.866         Enter State::GetCreateDnsDelegation false
dcpromoui 3A0.9F0 02D5 23:41:27.866         Enter State::IsReadOnlyReplica false
dcpromoui 3A0.9F0 02D6 23:41:27.866         Enter State::GetSYSVOLPath C:\Windows\SYSVOL
dcpromoui 3A0.9F0 02D7 23:41:27.866         Enter State::GetLogPath C:\Windows\NTDS
dcpromoui 3A0.9F0 02D8 23:41:27.866         Enter State::GetDatabasePath C:\Windows\NTDS
dcpromoui 3A0.9F0 02D9 23:41:27.866         Enter State::AutoConfigureDNS true
dcpromoui 3A0.9F0 02DA 23:41:27.866         Enter State::IsDnsServerAlreadyInstalled
dcpromoui 3A0.9F0 02DB 23:41:27.866           bDnsServerAlreadyInstalled = false
dcpromoui 3A0.9F0 02DC 23:41:27.866         Enter State::GetSkipAutoconfigureDns false
dcpromoui 3A0.9F0 02DD 23:41:27.866         Enter State::ShouldConfigDnsClient
dcpromoui 3A0.9F0 02DE 23:41:27.866           shouldConfigDnsClient = true
dcpromoui 3A0.9F0 02DF 23:41:27.866         Enter State::GetNeedToTransferIMRole
dcpromoui 3A0.9F0 02E0 23:41:27.866           bNeedToTransferIMRole = false
dcpromoui 3A0.9F0 02E1 23:47:28.212         Info:
dcpromoui 3A0.9F0 02E2 23:47:28.212         Info: ----------------------------------------
dcpromoui 3A0.9F0 02E3 23:47:28.212         Info: The following actions will be performed:
dcpromoui 3A0.9F0 02E4 23:47:28.212         Info: Configure this server as the first Active Directory domain controller in a new forest.
The new domain name is "Wingtip.com". This is also the name of the new forest.
The NetBIOS name of the domain is "Wingtip".
Forest Functional Level: Windows Server 2008 R2
Domain Functional Level: Windows Server 2008 R2
Site: Default-First-Site-Name
Additional Options:
  Read-only domain controller: "No"
  Global catalog: Yes
  DNS Server: Yes
Create DNS Delegation: No
Database folder: C:\Windows\NTDS
Log file folder: C:\Windows\NTDS
SYSVOL folder: C:\Windows\SYSVOL
The DNS Server service will be installed on this computer.
The DNS Server service will be configured on this computer.
This computer will be configured to use this DNS server as its preferred DNS server.
The password of the new domain Administrator will be the same as the password of the local Administrator of this computer.
dcpromoui 3A0.9F0 02E5 23:47:28.212         Info: ----------------------------------------
dcpromoui 3A0.9F0 02E6 23:47:28.212         Enter State::GetOperation FOREST
dcpromoui 3A0.4C4 02E7 23:47:28.228 Enter PromoteThreadProc
dcpromoui 3A0.4C4 02E8 23:47:28.228   Set locale for console
dcpromoui 3A0.4C4 02E9 23:47:28.228   Enter State::GetMode NORMAL
dcpromoui 3A0.4C4 02EA 23:47:28.228   top of retry loop
dcpromoui 3A0.4C4 02EB 23:47:28.228   Enter disableConsoleLocking
dcpromoui 3A0.4C4 02EC 23:47:28.228     Enter RegistryKey::Create SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
dcpromoui 3A0.4C4 02ED 23:47:28.228     Enter RegistryKey::SetValue-DWORD DisableLockWorkstation
dcpromoui 3A0.4C4 02EE 23:47:28.228   Enter State::SetOperationResultsMessage
dcpromoui 3A0.4C4 02EF 23:47:28.228   Enter State::SetOperationResultsFlags 0x0
dcpromoui 3A0.4C4 02F0 23:47:28.228   Enter State::SetOperationResults result SUCCESS
dcpromoui 3A0.9F0 02F1 23:47:28.228         Enter State::GetOperationResultsCode SUCCESS
dcpromoui 3A0.9F0 02F2 23:47:28.228         OPERATION SUCCESSFUL
dcpromoui 3A0.9F0 02F3 23:47:28.228         Enter State::GetOperationResultsCode SUCCESS
dcpromoui 3A0.9F0 02F4 23:47:28.228         Enter State::IsOperationRetryAllowed
dcpromoui 3A0.9F0 02F5 23:47:28.228           true
dcpromoui 3A0.9F0 02F6 23:47:28.228         Info:
dcpromoui 3A0.9F0 02F7 23:47:28.228       performed state 28, next state 29
dcpromoui 3A0.9F0 02F8 23:47:28.228       Enter FailedFunct
dcpromoui 3A0.9F0 02F9 23:47:28.228         Enter State::GetOperationResultsCode SUCCESS
dcpromoui 3A0.9F0 02FA 23:47:28.228         SUCCESS
dcpromoui 3A0.9F0 02FB 23:47:28.228       performed state 29, next state 30
dcpromoui 3A0.9F0 02FC 23:47:28.228       Enter FinishFunct
dcpromoui 3A0.9F0 02FD 23:47:28.228         Enter getCompletionMessage
dcpromoui 3A0.9F0 02FE 23:47:28.228           Enter State::GetOperation FOREST
dcpromoui 3A0.9F0 02FF 23:47:28.290         Info:
dcpromoui 3A0.9F0 0300 23:47:28.290       performed state 30, next state 31
dcpromoui 3A0.9F0 0301 23:47:28.290       Enter RebootFunct
dcpromoui 3A0.9F0 0302 23:47:28.290         Enter State::GetNeedsReboot false
dcpromoui 3A0.9F0 0303 23:47:28.290         reboot not necessary
dcpromoui 3A0.9F0 0304 23:47:28.290       performed state 31, next state 38
dcpromoui 3A0.9F0 0305 23:47:28.290       Enter State::GetHadNonCriticalFailures
dcpromoui 3A0.9F0 0306 23:47:28.290         bHadNonCriticalFailures = true
dcpromoui 3A0.9F0 0307 23:47:28.290     Enter State::UnbindFromReplicationPartnetDC
dcpromoui 3A0.9F0 0308 23:47:28.290     Exit code is 3
dcpromoui 3A0.9F0 0309 23:47:28.290   Exit code is 3
dcpromoui 3A0.3AC 030A 23:47:28.384 closing log

Similar Messages

  • How do i install mysql on windows server 2012 r2 using powershell(automate)??

    i have a requirement of installing the mysql server with one click deployment using power shell by passing the parameters needed into the mysql console. can i achieve that ?
    can  anyone help me in doing that?
    thanks in advance.
    Suresh Gaddam

    Hi Suresh,
    This forum is for SCOM related questions, it seems like that you are asking for powershell script to install Mysql. From my point of view, I don't think that using powershell to install Mysql is an easy way, as it is hard to say whether Powershell can get
    information from Mysql install console with some API.
    In addition, for further assistance, please contact MySQL forum and Powershell forum.
    Thanks for your understanding!
    Regards,
    Yan Li
    Regards, Yan Li

  • Error using Powershell inside a Workflow

    Hello,
    I have the following scenario: I want to change the Status of every Incident that is created to "Neu". This is a custom Status we created. So my first tought was to use the Authoring Tool with a Workflow. I created a Workflow wich will trigger
    whenever a Incident is created (simple) and then I used the Windows PowerShell Script Activity, with the following code:
    My First Question Is, I need the ID of the Incident, so I create a new Script Property and as a Value I select
    Use a class property -> Incident -> ID, is this way correct?
    Then I insert this value in my Code via $id = "$IncidentID";, there is also my question is that correct?
    I have tested the Code, it works. If I insert a Incident ID manually it changes the status.
    So after I created the Workflow, I saved the MP and copied the .dll to my SM Folder and importet my MP. But if create a new Incident the Status is "Active" and it says the Workflow failed. I looked into the log and found an Error Message, after
    some research I found a solution that said I had to modify my MonitoringHost.exe.config
    (the error Message had something to with a PowerShell Module/Assembly missing) so I added the follwoing lines:
    <dependentAssembly>
    <assemblyIdentity name="Microsoft.EnterpriseManagement.Moduls.PowerShell" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="6.0.4900.0" newVersion="7.0.5000.0" />
    But now I get the following Message:
    Can somebody help me?

    I made a mistake while editing the xml.

  • Using PowerShell Remoting with Workflows and Functions

    Hello,
    I have an existing set of scripts with a mixture of Modules containing the functions, Workflows that call the functions and Main script that invokes the workflows.
    Step 1: The Main script picks up the list of servers from a custom db and invokes the relevant workflow for further operation
    Step 2: The workflow runs as foreach parallel and calls a function by passing the server name as a parameter
    Step 3. The function in the module does the real job
    All of this runs, from a central location. 90% of the server are geo dispersed. This seems to be a bit of a concern in terms of turnaround time is too high. 
    Hence, I would like to use WinRM (PowerShell Remoting). I have configured WinRM on all the Server with Firewall Exception.
    My Queries:
    1. Apart from using Enter-PSSession or Invoke-Command, are there any other CMDLet's?
    2. Say for example; I plan to use Enter-PSSession, should I embed the code with Workflow?
    3. How will it retrieve the output?
    Please advice, Thanks
    Rajiv

    You cannot use Enter-PSSession in a script.  
    It's only intended to be used interactively from the console. If you try to use it in a script, the script will run the subsequent commands on the local system, not in the remote session.
    You'll need to use Invoke-Command, and you'll have to include the function definitions in the invoked script block, since those functions will not exist in the remote sessions.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Install SQL server using powershell

    Hi Team,
    Greetings!!!
    I want to install SQL server using powershell.
    Please guide me how can I install SQL server using powershell.
    I am trying to install using the command :  " Invoke-Item SQLIPAK /AS /QFE:11.0.3393 //SQLADMIN:REDMOND\PSITADM /CLEANMSDB /NOLOGCOPY /AUTOTEMPFILES /PREVIEW"
    But it is throwing error as:
    Invoke-Item : A positional parameter cannot be found that accepts argument '/AS'.
    At line:1 char:1
    + Invoke-Item SQLIPAK.exe /AS /QFE:11.0.3393 //SQLADMIN:REDMOND\PSITADM /CLEANMSDB ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Invoke-Item], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeItemCommand

    Hello,
    Ref to links
    http://msdn.microsoft.com/en-us/library/ms144259.aspx
    http://www.mssqltips.com/sqlservertip/2707/installing-sql-server-2012-on-windows-server-core-using-powershell/
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Download Reports from SCCM 2012 Using PowerShell

    Hi,
    I Wants to Download reports from SCCM 2012 using powershell but couldn't find a way.
    I used Invoke-Cmreport but it says no reporting Service point on site code XYZ and server ABC
    But Reporting Service is enabled and works fine as i can check/download report manually
    Thanks 

    Hi,
    You could have a look at the script in the blog below.
    How to Download All Your SSRS Report Definitions(RDL files) Using PowerShell.
    http://www.sqlmusings.com/2011/03/28/how-to-download-all-your-ssrs-report-definitions-rdl-files-using-powershell/
    Note: Microsoft provides third-party contact information
    to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Best Regards,
    Joyce

  • Install Windows server 2012 using powershell

    Hi Folks,
    How to Install Windows server 2012 using powershell.
    Thanks,

    Hi,
    According to your post, my understanding is that you want to install Windows server 2012 via PowerShell.
    Per the previous thread, we could not install Windows server 2012 directly via PowerShell.
    https://social.technet.microsoft.com/Forums/en-US/53f82989-4b9c-4197-9ff1-03e96c852eb7/how-to-install-windows-server-2012-directly-in-vhd-file-using-powershell?forum=winserver8setup
    As this is the forum for SharePoint server on-premise, I’m not familiar with the Windows server, for this issue, I recommend you can post a new question in the forum for Windows server.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=winserver8setup
    More experts will assist you, then you will get more information relation to Windows server.
    Thank you for your understanding and support.
    More reference:
    http://vegibit.com/install-and-configure-windows-server-2012-with-windows-powershell/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Installing SQL Server 2012 remotely via Powershell using Invoke-Command

    I am trying to perform a SQL Server 2012 command line installation using Powershell Invoke-Command on Windows 2012 Datacenter.
    The code I am using is as follows:
     $ret = Invoke-Command -ComputerName $COMPUTER -ArgumentList $MEDIA,$ACTION,$FEATURES,$INSTALLDIR,$INSTANCEID,$INSTANCENAME,$SQLDATADRIVE,$SQLLOGDRIVE,$DOMAIN,$SQLSERVERSERVICEUSER,$SQLSERVICEPASSWORD,$PRODUCTKEY,$SQLSERVERSA,$username,$ADMINPASSWD
    -Credential $cred -ScriptBlock {
      param($MEDIA,
         $ACTION,
         $FEATURES,
         $INSTALLDIR,
         $INSTANCEID,
         $INSTANCENAME,
         $SQLDATADRIVE,
         $SQLLOGDRIVE,
         $DOMAIN,
         $SQLSERVERSERVICEUSER,
         $SQLSERVICEPASSWORD,
         $PRODUCTKEY,
         $SQLSERVERSA,
         $USERNAME,
         $PASSWD)
      Set-Location $MEDIA
      Import-Module ServerManager
      if (-not [IO.Directory]::Exists($MEDIA)){
       $hn = hostname
       return 0,"Failed to find SQL Server Installer at $MEDIA on $hn"
      $tran = ""
      Try{
       & $MEDIA\setup.exe /ACTION=$ACTION /Q /FEATURES=$FEATURES /IACCEPTSQLSERVERLICENSETERMS /UPDATEENABLED=False /INSTALLSHAREDDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /INSTALLSHAREDWOWDIR="$INSTALLDIR\Program Files
    (x86)\Microsoft SQL Server" /RSINSTALLMODE="FilesOnlyMode" /INSTANCEID="$INSTANCEID" /INSTANCENAME="$INSTANCENAME" /INSTANCEDIR="$INSTALLDIR\Program Files\Microsoft SQL Server" /ENU="True" /AGTSVCSTARTUPTYPE="Automatic"
    /SQLSVCSTARTUPTYPE="Automatic" /NPENABLED=1 /TCPENABLED=1 /RSSVCStartupType="Automatic" /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS /INSTALLSQLDATADIR="$SQLDATADRIVE\DATA" /SQLUSERDBDIR="$SQLDATADRIVE\DATA" /SQLUSERDBLOGDIR="$SQLLOGDRIVE\LOG"
    /ASDATADIR="$SQLDATADRIVE\OLAP\DATA" /ASLOGDIR="$SQLLOGDRIVE\OLAP\Log" \ASBACKUPDIR="$SQLDATADRIVE\OLAP\Backup" \ASTEMPDIR="$SQLDATADRIVE\OLAP\Temp" /ASCONFIGDIR="$SQLDATADRIVE\OLAP\Config" /ASCOLLATION="Latin1_General_CI_AS"
    /SQLCOLLATION="SQL_Latin1_General_CP1_CS_AS" /SQLSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /SQLSVCPASSWORD="$SQLSERVICEPASSWORD" /AGTSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /AGTSVCPASSWORD="$SQLSERVICEPASSWORD"
    /ASSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /ASSVCPASSWORD="$SQLSERVICEPASSWORD" /RSSVCACCOUNT="$DOMAIN\$SQLSERVERSERVICEUSER" /RSSVCPASSWORD="$SQLSERVICEPASSWORD" /FTSVCACCOUNT="NT AUTHORITY\LOCAL SERVICE"
    /INDICATEPROGRESS > $out
      } Catch [System.Exception] {
       return 0,$_.Exception.ToString()
      if ($tran -ne ""){
       $out += $tran
      return 1,$out
    The media resides on the server that I am remoting to in powershell and the server is on the same domain. The credentials I pass are for a Domain Admin, but SQL Server fails to validate the credentials for the passed parameter for the sql service user with
    a Access Denied.
    If I run the same command with the same user directly on the server it works fine.
    My guess is that the elavated privs for Administrator are not being set when using Invoke-Command? Is there a way to utilize powershell to install SQL Server 2012 with command line option using the invoke-command and passing credentials? Or is this a limitation
    to the SQL Server installer. If there is can a example be provided?

    Ok, so with the help of some friends, we found a fix that works!
    Prior to running the Invoke-Command I now run:
    # enable CredSSP on a client computer; this command allows the client credentials to be delegated to the server01 computer.:
    Enable-WsManCredSSP -Role Client -DelefateComputer server.some.domain.com
    Then I add the -Authentication option to my Invoke-Command with option Credssp.
    The install the works fine. Hope this helpes all.

  • SCCM 2012 use PowerShell to create a GlobalCondition, limiting the Deployment Type of an Application to certain operating systems.

    Title says it all basically.
    In the GUI im able to create a Global Condition (condition type: Expression) where I can add a clause that Limits the deployment type of an application to certain operating Systems (useful for deploying 64-bit apps).
    Is there away to Trigger that Setting using PowerShell? So far I haven't found one.
    Thx in advance...

    I changed my script a little bit and can be found Here. 
    An example to use it is:
    #Get Application named "Test" from the Server "localhost"           
    $app = Get-SCCMApplication "Test" "localhost"
    #A rule will be created from the global condition rule "ForumTest" where the registry value equals to "1"
    $rule1 = Create-SCCMGlobalConditionsRule . "ForumTest" "IsEquals" 1 "Registry"
    #Add the rule to the requirement rule of the deployment type
    $app.DeploymentTypes[0].Requirements.Add($rule1)
    #And save the application
    Save-SCCMApplication $app
    PowerShell, System Center 2012, Windows 8 http://blog.lechar.nl
    Thanks Rob!
    Have unfortunately encountered some problems:
    Get-SCCMApplication does not exist. Changed it to Get-CMApplication
    Create-SCCMGlobalConditionsRule - Cant find any "Create..." cmdlets
    Save-SCCMApplication does not exist
    Get-CMApplication : A positional parameter cannot be found that accepts argument 'TestApp'.
    At H:\sctipt\SetRequirement.ps1:2 char:9
    +  $app = Get-CMApplication "TestApp" "siteServe ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Get-CMApplication], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.GetApplicationCommand
    Create-CMGlobalConditionsRule : The term 'Create-CMGlobalConditionsRule' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At H:\script\SetRequirement.ps1:5 char:11
    +  $rule1 = Create-CMGlobalConditionsRule . "GlobalRuleName" "IsEquals" 1 "Registry"
    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Create-CMGlobalConditionsRule:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Cannot index into a null array.
    At H:\script\SetRequirement.ps1:8 char:2
    +  $app.DeploymentTypes[0].Requirements.Add($rule1)
    +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    Save-CMApplication : The term 'Save-CMApplication' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the na
    me, or if a path was included, verify that the path is correct and try again.
    At H:\script\SetRequirement.ps1:12 char:1
    + Save-CMApplication $app
    + ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Save-CMApplication:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

  • How can I find what scom group a specific server belongs to using powershell?

    Environment:  SCOM 2007 r2
    Server in question:  Running Windows 2003 Std. (yes I know this sounds crazy)
    Why do I need this:  I noticed at the console level we have had server unexpected shutdown events which are not generating email notifications. 
    Source shows: Windows 2003 Server Standard Edition
    Alert Rule:  Windows Shutdown Unexpectedly
    From what I see these are all windows 2003 server Std edition systems.  I did a track and trace using our exchange tracking system which confirmed the alerts were not being emailed. Not sure if there is a better approach for this, but not being a sql
    expert (however I do have someone I can leverage) I am trying to see if I can somehow extract this information using powershell.
    Secondary general question:  How can I find out the current size of our scom 2007 database and the number of objkects\servers being monitored? This is prep work for a migration over to 2012.
    Thanks in advance for the help!

    1. what scom group a specific server belongs to
    function Get-GroupNames {
     [cmdletbinding()]
     param($computerFQDN)
     $containmentRel = Get-RelationshipClass -name:’Microsoft.SystemCenter.InstanceGroupContainsEntities’
    $computerClass = Get-MonitoringClass -name:”Microsoft.Windows.Computer”
    $criteria = [string]::Format(“PrincipalName = ‘{0}’”,$computerFQDN)
     try {
     $computer = Get-MonitoringObject -monitoringClass:$computerClass -criteria:$criteria
     $relatedObjects = $computer.GetMonitoringRelationshipObjectsWhereTarget($containmentRel,[Microsoft.EnterpriseManagement.Configuration.DerivedClassTraversalDepth]::Recursive,[Microsoft.EnterpriseManagement.Common.TraversalDepth]::Recursive)
     catch {
     $_
     write-host “An error occurred while querying groups of $computerFQDN”
    foreach($group in $relatedObjects)
     [array]$Groups = $groups + $group.SourceMonitoringObject.DisplayName
     if($groups) {
     return $groups
     } else {
     write-host “No groups available for $computerFQDN”
    Usage:
     Get-GroupName -ComputerFQDN myserver1
    for detail, pls. refer to
    http://techibee.com/powershell/powershell-get-scom-groups-of-a-computer-account/1129
    Roger

  • Using powershell to deploy provider-hosted app and specify remote Url instead of using appinv.aspx page

    Hello all,
    Could you possibly help me with provider-hosted app development/deployment process.
    We developed SharePoint provider-hosted app that works just fine in development environment. Now we need to automate it's installation in test environment via powershell.
    In AppManifest.xml that we are deploying we have key instead of explicit URL:
    <App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest" Name="ShowAllRoomsApp" ProductID="{922a18aa-5592-b59a-4da9-4791baef02e7}" Version="1.0.0.0"
    SharePointMinVersion="15.0.0.0">
      <Properties>
        <Title>SomeTitle</Title>
        <StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
    If we use as
    https://technet.microsoft.com/en-us/library/jj655398.aspx recommends, we cannot specify Redirect Url as we can do this on
    /_layouts/appinv.aspx
    So now it seems like the only way to deploy this kind of solution is using appinv.aspx page.Or must we apply this URL in AppManifest on developing stage in Visual Studio?
    What did I miss?
    P. S. Even if I use /_layouts/appinv.aspx after powershell commandlets, I get error.

    hi,
    to deploy provider hosted app you need 2 things
    1. Client ID
    2. Redirect URL.
    What you can do you can generate app from visual studio using clientID and URL from developer enviornment.
    Now a app file is just a simple compressed zip file if you rename it as .zip and extract you will find AppManifest
    inside it. So to create an app for Testing enviornment what you have to to Get the CLient ID (from AppRegNew.aspx) in testing enviornment. Unzip .App file change the AppManifest with testing client ID and URL than again zip file and rename as .app.
    Now if you upload this file it will work.
    To automate this scenerio i have created a simple windows Application in which i Pass the Client ID and StartURl and an App File it unzips the app file make changes to app and again zip it.
    public static class AppPackageHelper
    public const string StartUrlExpression = "{0}?{1}";
    public const string StandardToken = "{StandardTokens}";
    public static string Publish(string appPath, string ClientId,string StartUrl)
    string tempDir = string.Empty;
    string outPutFile = string.Empty;
    try
    string parentDir = System.IO.Path.GetDirectoryName(appPath);
    outPutFile = System.IO.Path.Combine(parentDir, ClientId + "-Winshuttle.app");
    tempDir = System.IO.Path.Combine(parentDir, ClientId.ToString());
    Directory.CreateDirectory(tempDir);
    int lastInd = appPath.LastIndexOf('.');
    string tempPath = string.Empty;
    string targetFilePath = string.Empty;
    string cabPath = System.IO.Path.Combine(tempDir, System.IO.Path.GetFileNameWithoutExtension(appPath) + ".cab");
    FileInfo fInfo = new FileInfo(appPath) { IsReadOnly = false };
    File.Copy(appPath, cabPath);
    XDocument doc = null;
    string appManifest = string.Empty;
    using (ZipArchive zipArch = ZipFile.Open(cabPath, ZipArchiveMode.Update))
    appManifest = string.Format(@"{0}\AppManifest.xml", Directory.GetParent(cabPath).FullName);
    ZipArchiveEntry manifestEntry = zipArch.Entries.LastOrDefault(e => e.Name.ToLower() == "appmanifest.xml");
    manifestEntry.ExtractToFile(appManifest);
    doc = XDocument.Load(appManifest);
    XNamespace ns = doc.Root.GetDefaultNamespace();
    string defaultUrl = string.Format(StartUrlExpression, StartUrl.TrimEnd('/'), StandardToken);
    doc.Descendants(XName.Get("StartPage", ns.NamespaceName)).First().Value = defaultUrl;
    doc.Descendants(XName.Get("RemoteWebApplication", ns.NamespaceName)).First().Attribute(XName.Get("ClientId")).Value = setupInfo.ClientId.ToString();
    doc.Save(appManifest);
    if (manifestEntry != null)
    manifestEntry.Delete();
    zipArch.CreateEntryFromFile(appManifest, "AppManifest.xml");
    int totEnt = zipArch.Entries.Count;
    for (int e = 0; e < totEnt; e++)
    if (zipArch.Entries[e].Open().Length == 0)
    //if (zipArch.Entries.Count > totEnt && e >= totEnt) break;
    //zipArch.CreateEntry(zipArch.Entries[e].FullName);
    File.Delete(appManifest);
    if (File.Exists(outPutFile))
    File.Delete(outPutFile);
    File.Move(cabPath, outPutFile);
    return outPutFile;
    catch
    throw;
    finally
    if (System.IO.Directory.Exists(tempDir))
    System.IO.Directory.Delete(tempDir, true);
    return outPutFile;
    using System.IO.Compression.FileSystem.dll.
    Also if you want to do it using powershell You need to do the same thing unzip-> changes values-> zip
    So basic thing is You need to ahve only valid AppManifest file which contains 2 valid values Client Id and StartUrl
    if you changes it inside appmanifest manuall than it will also work. Using above code you can create a console Application to do it. You can use powershell it just that i dont know how to zip unzip in powershell but i am pretty sure you can easily find it
    on searching.
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

  • Is it possible to use Powershell to determine if Windows Server Source Files are present on disk?

    Hi everyone,
    I would like to know if it is possible to use a Powershell cmdlet to determine if Windows Server 2012 (R2) Source Files are present on disk.
    We are using an automated PS script to install roles and features and some registry keys and applications afterwards. If the Source Files are not present, the script will fail, so I would like a# Check if Source Files are present # stage built in
    the script to determine if the source files are present or that an alternate source path needs to be used.
    Is this possible with Powershell and if so, how can we achieve this?
    I'll appreciate your answer.
    - Rob

    Hi Rob,
    I assume that you are using powershell command "install-windowsfeature" .
    I would suggest you add the parameter "-source" to specify the alternate path of thesource file .
    " The path specified in this parameter is only used if the command cannot find feature files in the local side-by-side store of the specified target computer or VHD. "
    For details please refer to the article below :
    https://technet.microsoft.com/en-us/library/jj205467(v=wps.620).aspx
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • How to Install DNS ROLE and its FQDN service and Reverse Lookup zone in Server Core using Powershell?

    Hi
    I am Setting A Lab Scenario That the PC name "Core2012" i.e. Server Core 2012 Will be Domain Controller.
    Using PowerShell I have done this Task
    Change hostname ; Configure IP address and Preferred DNS address ; Disable IPv6 ;
    Configure Firewall ; Even Active Directory Role install.
    Now problem occur
    Well I have know to install DNS role install-WindowsFeature DNS
    Ok
    But; 
    How to configure FQDN ; Restore mode password ; Setting up global catalog server ;and configure Reverse Lookup zone Using powershell
    I have search many Forums but I am not getting to touch with it.
    So I Need a help to set and Configure DNS using Powershell
    Thank You!!!
    sagarpdalvi

    Hi Sagarpdalvi,
    To set the Safe mode password with powershell, please refer to the cmdlet Install-ADDSDomainController, to enable global catalog(GC), please run the cmdlet "Set-ADObject" after install Active Directory on the core server, to configure Reverse Lookup zone,
    please refer to the cmdlet
    Add-DnsServerPrimaryZone.
    To configure DC with powershell, please check the scripts:
    Installing a Domain Controller on Windows Server 2012
    R2 Core
    Enabling and Disabling the Global Catalog
    To configure DNS, the Domain Name System (DNS) Server Cmdlets should be helpful for you:
    http://technet.microsoft.com/en-us/library/jj649850.aspx
    I hope this helps.

  • SP 2013 - Use PowerShell to Deploy, Activate and Associate a SharePoint Designer Workflow

    Hello Community!
    I'm using SP 2013 Enterprise and I need to use PowerShell to deploy a reusable SharePoint Designer Workflow to the solution gallery, activate it, activate the workflow feature, and then associate the workflow to a list and or library.  Has anyone done
    this before and if so please provide guidance and code examples.
    Thanks!
    Tom
    Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
    Linked-In - SharePoint Gypsy

    Hi Tom,
    Below are the links might help, please check:
    Lists the Windows PowerShell cmdlets that you can use to manage workflows in a SharePoint 2013 farm.
    http://technet.microsoft.com/en-us/library/ee906558(v=office.15).aspx
    Series of articles written by Sahil Malik about SharePoint 2013 workflow
    http://www.codemag.com/Article/1301021
    http://www.codemag.com/Article/1304021
    SharePoint 2013: How to Schedule a PowerShell Script to Run Automatically
    http://www.proactivespeaks.com/2013/07/30/sharepoint-2013-how-to-schedule-a-powershell-script-to-run-automatically/
    Similar threads:
    http://stackoverflow.com/questions/15045189/how-to-start-workflow-2013-from-powershell
    http://sharepoint.stackexchange.com/questions/65555/deploying-workflow-wsp-as-sandbox-solution
    http://sharepoint.stackexchange.com/questions/89312/launch-sharepoint-2013-workflow-w-javascript
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Retrieve all pages in a site collection using powershell command

    Hi all,
    I need to retrieve all pages in a site collection and i wanted to display it in a csv file using powershell command.Please help.
    Regards,
    Praveen

    Hi Praveen,
    Here are two blogs would be helpful:
    PowerShell script to Enumerate Sites, Sub-sites and print them in a .csv file
    http://www.sharepointfix.com/2012/02/powershell-script-to-enumerate-sites.html
    Powershell to Loop through all SharePoint sites and pages
    https://tjendarta.wordpress.com/2013/03/19/powershell-to-loop-through-all-sharepoint-sites-and-pages/
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for