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
| $ComputerName = $env:computername | |
| $AllShares = Get-WmiObject -Class win32_share -ComputerName $ComputerName | Select-Object -ExpandProperty Name | |
| Function GetShareSecurity { | |
| Param([string]$path = $(throw"$path required.")) | |
| Write-Host "--------------------------------------------------" | |
| $pathparts = $path.split("\") | |
| $ComputerName = $pathparts[2] | |
| $ShareName = $pathparts[3] | |
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
| # | |
| # Menu based Powershell script to change DNS servers for local area connections. | |
| # | |
| $DNSServer = @{"Home1" = "192.168.2.2"; | |
| "Home2" = "192.168.2.10"; | |
| "Home3" = "192.168.2.1"; | |
| "OpenDNS1" = "208.67.220.220"; | |
| "OpenDNS2" = "208.67.222.222"; | |
| "Google1" = "8.8.8.8"; |
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
| ' This is a Robert McMurray's script, all the credit goes to him :) | |
| ' https://blogs.msdn.microsoft.com/robert_mcmurray/2012/04/26/configuring-ftp-client-certificate-authentication-in-ftp-7/ | |
| ' | |
| ' Please change the following two variables before running it | |
| Set strSiteName = "FTP" | |
| Set strSserverCertHash = "884301293bad5ab538c0cfddcba7371cedfca647" | |
| Set adminManager = CreateObject("Microsoft.ApplicationHost.WritableAdminManager") | |
| adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST" |
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
| # | |
| # Powershell Functions for adding/removing/showing entries to the hosts file. | |
| # | |
| # Known limitations: | |
| # - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
| # | |
| Function Use-RunAs { | |
| # Check if script is running as Administrator and if not use RunAs | |
| # Use Check Switch to check if admin | |
| param([Switch]$Check) |
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
| # Enables TLS 1.2 on Windows Server 2008/2012/2016 and Windows 7/8.1/10 | |
| # Add and Enable TLS 1.2 for client and server SCHANNEL communications | |
| New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2" -Force | |
| New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Force | |
| New-Itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -name "Enabled" -value "0xffffffff" -PropertyType "DWord" | |
| New-Itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -name "DisabledByDefault" -value 0 -PropertyType "DWord" | |
| New-Item "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" -Force | |
| New-Itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" -name "Enabled" -value 1 -PropertyType "DWord" |
NewerOlder