Posts Tagged ‘Kill’

Posted by OmegaMan at April 26, 2016

Category: Powershell

Tags: , ,

While working for a company which used a browser based VPN which needed to have different pinned components in memory. That caused difficulties when having to mostly re-login due to their startup script. I created this PowerShell script to kill specific processes, if running, and launch IE to my companies’ web page.

Get-Process | where {      
                     -or $_.Name -like "Juniper*"<code>-or $___abENT__#46;Name -like __abENT__quot;dsHostChecker*__abENT__quot;</code>
                     -or $_.Name -like "iisexpress"<code>-or $___abENT__#46;Name -like __abENT__quot;Network*__abENT__quot;</code>
                 -or $_.Name -like "dsNcService*"<code>}</code>
            | Stop-Process -Verbose -Force


$ie = New-Object -com internetexplorer.application; 
$ie.visible = $true; 
$ie.navigate("Https://secure.MyCompany.com");

If you have any failures try running this script with admin privileges on the box.

Share
  • Recent Comments

    Thanks for this simple yet delightful code....
    Hey guys I'm having the same problem as Netanel KL { “Error HRESUL...
    Soluciono el problema con el primero (First step solved it for me)....
    Thank you! I was looking for this. You save my day!...
    Thank you! This was a big help. My requirement was a little differen...
    Thanks, after a small path adjustment it worked for Visual Studio 2015...
    Good call!...
    Thank you .. this helped...
    How about when you have a long string with no space? I tried it and it...
    Thank you, I ran into this same issues with Visual Studio 2015 after i...
  • Categories

  • Tags

  • Meta