Update 'upd.ps1'

This commit is contained in:
2020-03-08 19:32:51 +00:00
parent 0fd6fffbc9
commit 42b781a560

10
upd.ps1
View File

@@ -1,4 +1,6 @@
Invoke-Command -ComputerName . -AsJob -Scriptblock {
Start-Sleep -s 5
Start-Process notepad.exe
}
#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 notepad.exe