[How-To] Powershell okienko – part 2

On 7. júla 2011, in How To, by admin

Enable / Disable Cisco AnyConnect Service + Set Proxy

$VPNService = Get-Service -DisplayName "Cisco AnyConnect Secure Mobility Agent"
$VPNName = $VPNService.DisplayName

if ( $VPNService.Status -ne "Running" )
{
Start-Service $VPNService.DisplayName
[Diagnostics.Process]::Start('C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe')
$VPNServiceStatus = (Get-Service -DisplayName $VPNName).Status
$Message = "$VPNServiceStatus …

 

[How-To] Powershell okienko – part 1

On 7. júla 2011, in How To, by admin

Enable / Disable Proxy + Restart IE and set-up Homepage

if ((Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyEnable | Select-Object ProxyEnable).ProxyEnable -eq 0)
{
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name ProxyEnable -Value 1
$Message = "Proxy Enabled`n"
$Message = $Message + ((Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | Select-Object

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Premium WordPress Themes