Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
jvierra
- Posts: 13992
- Joined: Tue May 22, 2007 9:57 am
-
Contact:
Post
by jvierra » Wed Aug 08, 2018 1:12 pm
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.
-
thematterneo
- Posts: 11
- Joined: Thu Mar 06, 2014 2:22 pm
Post
by thematterneo » Wed Aug 08, 2018 2:03 pm
Thank you but just now I found on web in technet this and it works ! :
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