Posts Tagged ‘Powershell’

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; 

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