I want to run the following command with powershell and wait till it completes before doing the next item
slmgr after it completes the command displays a windows which needs human intervention to click “ok” to close it and complete the process. I need this to work without human intervention. I figured out a way to do it using cscript , but it seems messy. Is there a way to do this without using cscript.
This is the current working method, which seems good
Start-Process "c:\windows\system32\cscript" "c:\windows\system32\slmgr.vbs -upk" -wait
Is there a better way? I do need powershell 2.0 compatibility