8,330 questions
Is there any option we can use to to send signal while initializing schedule command with `waitfor` ?
Snehal Dwivedi
1
Reputation point
In VB script there we can do this check here. Is there any similar option in PS? What I am trying to achieve is to convert the following VB command into PS
@schtasks /create /f /sc once /st 00:00:00 /tn chefclientbootstraptask /ru SYSTEM /rl HIGHEST /tr \"cmd /c #{command} & sleep 2 & waitfor /s %computername% /si chefclientinstalldone\"
So here in this code I am not able to find an alternative for waitfor /s %computername% /si chefclientinstalldone\"
. Can anyone help if there is such an option or not?
Windows for business | Windows Server | User experience | PowerShell
Sign in to answer