Files
testscripts/upd.ps1
2020-03-08 20:09:34 +00:00

12 lines
496 B
PowerShell

#Hiding PS console
#Add-Type -Name win -MemberDefinition '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);' -Namespace native
#[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle,0)
Start-Sleep -s 5
Start-Process microsoft-edge:https://geekprank.com/win10-update/
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('Microsoft Edge')
Sleep 2
$wshell.SendKeys('{F11}')
Start-Sleep -s 60