This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #List existing Hosts | |
| ls WSMan:\localhost\Client\TrustedHosts | |
| #Add new Host | |
| winrm set winrm/config/client '@{TrustedHosts="HostName"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1) Go to path [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpnva] | |
| 2) There might be some junk characters in the Display name before the word "Cisco....". Delete them | |
| 3) the display name should read like "DisplayName"="Cisco AnyConnect VPN Virtual Miniport Adapter for Windows x64" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-WmiObject Win32_Product | Sort-Object Name | Select Name,version,Vendor |export-csv myprogramlist.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1)Generate SSL Certificate with one of these options | |
| -CA Authority(e.g:Versign) | |
| -Active Directory Certificate Services | |
| -Self Signed(Not to be used in Production) | |
| Code : cd 'C:\Program Files (x86)\Windows Kits\8.0\bin\x64\' | |
| makecert -r -pe -n "CN=3dmxvm-solar.cloudapp.net " -b 01/01/2012 -e 01/01/2022 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 | |
| 2) Export Certificate in .pfx format to store into Trusted Root Store of Client Machine | |
| 3) Enable WinRm Trusted Source IP addresses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# Take General Parameters from User #> | |
| param([string] $ServerName=(Read-Host -prompt "Please Enter Server Name"),[string] $UserName=(Read-Host -prompt "Please Enter Your User Name"),[string] $Password=(Read-Host -prompt "Please Enter Your Password")) | |
| function Job(){ | |
| cls | |
| #Local Firewall | |
| $fw = New-Object -ComObject hnetcfg.fwpolicy2 | |
| #Delete Existing Rules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set-StrictMode -Version Latest | |
| # Constants | |
| if (!(Test-Path variable:\NET_FW_DISABLED)) { Set-Variable NET_FW_DISABLED -Option Constant $False } | |
| if (!(Test-Path variable:\NET_FW_ENABLED)) { Set-Variable NET_FW_ENABLED -Option Constant $True } | |
| if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_TCP)) { Set-Variable NET_FW_IP_PROTOCOL_TCP -Option Constant 6 } | |
| if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_UDP)) { Set-Variable NET_FW_IP_PROTOCOL_UDP -Option Constant 17 } | |
| if (!(Test-Path variable:\NET_FW_PROFILE_DOMAIN)) { Set-Variable NET_FW_PROFILE_DOMAIN -Option Constant 0x1 } | |
| if (!(Test-Path variable:\NET_FW_PROFILE_PRIVATE)) { Set-Variable NET_FW_PROFILE_PRIVATE -Option Constant 0x2 } | |
| if (!(Test-Path variable:\NET_FW_PROFILE_PUBLIC)) { Set-Variable NET_FW_PROFILE_PUBLIC -Option Constant 0x2 } |
NewerOlder