Day: February 6, 2020

PowerShell: Fix Clustered Disk Errors

# fixClusterDiskErrors.ps1function selectClusterName{ param($domainName=$env:USERDNSDOMAIN) write-host "Now scanning $domainName for all available cluster names. This may…

PowerShell: Generate Report of Users and Computers That Have Not Logged On for X Days

# AccountsNotLoginXDays.ps1# Set days$lastLogonDaysExceeding = 120# Gather Users$daysRange = (get-date).adddays(-$lastLogonDaysExceeding)$users=Get-ADUser -properties * -filter {(enabled -eq…

PowerShell: Change Windows Autolock

# Disable_AutoLock.ps1function changeAutoLock{ param ( [Switch]$disable, [Switch]$enable ) $registryHive = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" $registryKey="NoLockScreen" $keyItem = Get-ItemProperty…