Page 2 of 2

Re: Install-ADDSForest ok by script but not in winform

Posted: Wed Aug 08, 2018 1:12 pm
by jvierra

Code: Select all

$sb = {
     Import-Module ADDSDeployment
     Install-ADDSForest @ForestConfiguration
}

Start-Job -ScriptBlock $sb
Sorry - I am not French and my English is still bad.

Re: Install-ADDSForest ok by script but not in winform

Posted: Wed Aug 08, 2018 2:03 pm
by thematterneo
Thank you but just now I found on web in technet this and it works ! :

Code: Select all

start-job -Name addFeature -ScriptBlock {
Add-WindowsFeature -Name "ad-domain-services" -IncludeAllSubFeature -IncludeManagementTools
Add-WindowsFeature -Name "dns" -IncludeAllSubFeature -IncludeManagementTools
Add-WindowsFeature -Name "gpmc" -IncludeAllSubFeature -IncludeManagementTools }
Wait-Job -Name addFeature