IderaBlog
  • Home
  • Performance Monitoring & Tuning
    • SQL Diagnostic Manager for SQL Server
    • SQL Defrag Manager
    • SQL Diagnostic Manager for MySQL
    • Precise
    • SQL Doctor
    • SQL Query Tuner for SQL Server
    • SQL Workload Analysis for SQL Server
    • Uptime Infrastructure Monitor Formerly Uptime
  • Database Administration
    • SQL Admin Toolset
    • SQL Enterprise Job Manager
    • SQL Inventory Manager
    • SQL Safe Backup
  • Database Security
    • SQL Compliance Manager
    • SQL Secure
  • Data Modeling
    • ER/Studio Business Architect
    • ER/Studio Data Architect
    • ER/Studio Team Server
  • Database Development & Management
    • Aqua Data Studio
    • DB PowerStudio
  • More
    • Powershell
    • Free tools
    • Events
  • U
Select Page

PowerShell Killing Itself

by ps1Mar 2, 2016

If you schedule a script as a scheduled task, or call it externally, and want to make sure the PowerShell process really ends, here is a brute force approach:

#requires -Version 2
Stop-Process -Id $Pid -Force

This line kills the PowerShell host that is executing the script.

Twitter This Tip! ReTweet this Tip!

Tags

Aqua Data Studio cloud compliance data architecture database database administration database management database monitoring database performance database tools data governance data modeling DBA DBArtisan diagnostics ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events IDERA interbase Microsoft SQL Server monitoring Monyog MySQL news Oracle performance Precise product updates Rapid SQL real time monitoring Release releases SQL SQL Compliance Manager SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Doctor SQL Safe Backup SQL Secure SQL Server Uptime Infrastructure Monitor webinar
  • Facebook
  • Twitter
  • LinkedIn
  • YouTube

Idera uses cookies to improve user experience. By using our community you consent to all cookies in accordance with our Cookie policy.