Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. if ($(Get-WmiObject Win32_Process -Filter "ProcessID=$($PID)").CommandLine -match '-EncodedCommand')
  3. {
  4. Write-Warning "EncodedCommandが使われています!"
  5. $ret = Show-PromptForChoice '<EncodedCommand>' '安全でないコマンドが実行されようとしています、続けますか?' @('いいえ(&N)', 'はい(&Y)')
  6. if ($ret -ne 1)
  7. {
  8. # 続行しない場合は止める
  9. kill $PID
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement