This file contains 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
@echo off | |
: set logging | |
set LOGFILE=SMB1Protocol-settings-deploy.log | |
call :LOG > %LOGFILE% | |
exit /B | |
:LOG | |
: ############################### | |
: SMBv1 batch script 1 v0.1 |
This file contains 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
@echo off | |
: set logging | |
set LOGFILE=SMB1Protocol-settings-deploy.log | |
call :LOG > %LOGFILE% | |
exit /B | |
:LOG | |
: ############################### | |
: SMBv1 Removal batch script 1 v0.1 |
This file contains 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
echo "$(tail -n 500 /opt/librenms/logs/librenms.log)" > /opt/librenms/logs/librenms.log |
This file contains 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-ChildItem cert:\ -Recurse | Where-Object {$_ -is [System.Security.Cryptography.X509Certificates.X509Certificate2] -and $_.NotAfter -lt (Get-Date)} | Select-Object -Property FriendlyName,NotAfter | ConvertTo-Html | Set-Content C:\Temp\ExpiredCerts.htm |
This file contains 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
enter-pssession $computername -credential (get-credential) |
This file contains 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
# Remote EAC Shell | |
# from: https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-servers-using-remote-powershell?view=exchange-ps | |
# Get Credentials | |
$UserCredential = Get-Credential | |
# Set Session | |
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerFQDN>/PowerShell/ -Authentication Kerberos -Credential $UserCredential | |
# Connect Session |
This file contains 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-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online |
This file contains 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
winget install -e --id Microsoft.WindowsAdminCenter |
This file contains 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-CimInstance -ClassName Win32_OperatingSystem | Select LastBootUpTime |
This file contains 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-DnsServerResourceRecord -computername DC1 -ZoneName zone.domain.com | Select-Object Hostname,TimeStamp,RecordType,@{Name="IPv4Address";Expression={ [version]$_.RecordData.IPv4Address.IPAddressToString }} | Sort-Object IPv4Address | export-csv -path c:\temp\dns1sort.csv |
OlderNewer