Suppress the PopUp Window
hi team,
i need activate windows license if not activated already.
i have copied module google , and few license achieve task. need run 2 commands in cmd.exe or powershell.
while running, got response pop-up message. need manually click "ok" on command output, 2nd command start run.
how can avoid manual interruption suppress pop-up. please me resolve this.
part of code:
$licensestatus = get-windowsserveractivationstatus -dnshostname localhost
if ($licensestatus.status -neq "licensed")
{
cmd.exe /c "slmgr -ckms"
cmd.exe /c "slmgr -ato"
}
//bala r
sorry cannot done. must run batch elevated prompt.
also not use cmd:
$licensestatus = get-windowsserveractivationstatus -dnshostname localhost if ($licensestatus.status -neq "licensed"){ cscript slmgr.vbs /ckms cscript slmgr.vbs /ato }
you cannot prevent ato prompt , cannot automate response. ato should specify license activation id.
read full instructions. https://technet.microsoft.com/en-us/library/dn502540.aspx?f=255&mspperror=-2147217396
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment