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
| $reg_cdm = '\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' | |
| $keys = Get-Item -Path ("HKCU:"+$reg_cdm)) | |
| $keys.GetValueNames() | Foreach-Object { | |
| If ($keys.GetValueKind($_) -eq 'DWord') { | |
| Set-ItemProperty -Path ('HKCU:'+$reg_cdm) -Name $_ -Value 0 -Force | |
| } | |
| } |
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
| # Some Sources: | |
| #https://docs.microsoft.com/en-us/powershell/module/pkiclient/export-certificate?view=win10-ps | |
| #https://powershell.org/forums/topic/certificate-templates-add-catemplate-problems/ | |
| #Run as Admin | |
| $caName = "LDAPS-Server-Auth" | |
| $cryptoProvider = "RSA#Microsoft Software Key Storage Provider" | |
| $keyLength = 2048 | |
| $hashAlgorithm = 'SHA256' |
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
| # Install Powershell Modules | |
| Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
| Install-WindowsFeature RSAT-AD-PowerShell | |
| # Install RDS Server Features | |
| Add-WindowsFeature –Name RDS-Gateway –IncludeAllSubFeature | |
| Add-WindowsFeature –Name RDS-Connection-Broker –IncludeAllSubFeature | |
| Get-WindowsFeature | ? { $_.Name -match "RDS-Licensing|RDS-RD-Server" } | Install-WindowsFeature –IncludeAllSubFeature | |
| # Set Firewall and Service Settings for RD |
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
| $svcName = "WiresharkPCAPTrace" | |
| $outFile = "C:\ProgramData\WiresharkPCAPTrace.pcapng" | |
| if (Get-Service -Name $svcName -ea SilentlyContinue) { | |
| Write-Host "The pcap service has already been added to this system. Proceeding with removal and recreation" | |
| $service = Get-WmiObject -Class Win32_Service -Filter "Name='$svcName'" | |
| $service.Delete() | Out-Null | |
| } | |
| $fspace = Get-WMIObject -Class Win32_LogicalDisk | Where {$_.DeviceID -like "C:"} | Select @{Name="FreeSpaceGB"; Expression={[math]::round($_.FreeSpace/1GB, 2)}} | |
| if ($fspace.FreeSpaceGB -lt "10.00") { |
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
| esxcli system snmp set --communities public | |
| esxcli system snmp set --enable true | |
| esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false | |
| esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address <IPAddress Of SNMP Manager> | |
| esxcli network firewall ruleset set --ruleset-id snmp --enabled true | |
| /etc/init.d/snmpd restart |
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
| esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6.7.0-20 | |
| vim-cmd /hostsvc/maintenance_mode_enter | |
| esxcli network firewall ruleset set -e true -r httpClient | |
| esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.7.0-20191204001-standard | |
| reboot | |
| vim-cmd /hostsvc/maintenance_mode_exit |
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
| param( $Newest = 10 ) | |
| function Parse-EventLogEntry | |
| { | |
| param( | |
| [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)] | |
| [System.Diagnostics.EventLogEntry[]] | |
| $eventInfo | |
| ) |
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
| # Sender and Recipient Info | |
| $MailFrom = "[email protected]" | |
| $MailTo = "[email protected]" | |
| # Sender Credentials | |
| $Username = "" | |
| $Password = "" | |
| # Server Info | |
| $SmtpServer = "" |
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
| Function Invoke-SpeedTest { | |
| param ( | |
| $Server | |
| ) | |
| $topServerUrlSpilt = $Server -split 'upload' | |
| $url = $topServerUrlSpilt[0] + 'random2000x2000.jpg' | |
| $wc = New-Object system.net.WebClient | |
| $wc.QueryString = New-Object System.Collections.Specialized.NameValueCollection | |
| $downloadElaspedTime = (Measure-Command {$webpage1 = $wc.DownloadData($url)}).totalseconds |
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
| ((netsh wlan show interfaces) -Match '^\s+Signal' -Replace '^\s+Signal\s+:\s+','') -Replace '%','' |
OlderNewer