Update 'upd.ps1'
This commit is contained in:
10
upd.ps1
10
upd.ps1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user