Category: Windows

Linux: How to Create RSA Keys and SSH Agent

Step 1: Generate RSA Key # Command to generate rsa key for Ubuntu Linuxssh-keygen -t…

Setting Windows Security Auditing via Command Line

Please be advised that the follow auditpol cmdlet would be overridden by Group Policies in…

How To Turn On Windows SMB File Share Access Auditing

Step 1: Turn on File Editing Here is how to check for effective local group…

PowerShell: Query Google Account Using GAM

$emailAddress='[email protected]' $field='accounts:last_login_time' function getGamUser{ param( $emailAddress, $field ) $result=try{gam report users user $emailAddress}catch{} if($result){ $headers=$result[0]…

Moving a Domain Controller to a Different Geographical Location

Changing IP of a Domain Controller - If dcpromo has been done before the move…

PowerShell: Download and Expand Zip File – Legacy Compatible

function downloadFile{ param( $url, $tempFolder="C:\Temp" ) try{ $fileName=split-path $url -leaf $tempFile = "$tempFolder\$fileName" try{[Net.ServicePointManager]::SecurityProtocol =…

Converting from IOPS to MB/s

Conversion factors: from IOPS to MiB/s Throughput is a function of Input/Output per second (IOPS)…

Disable Windows 10 Automatic Updates

Why? It's annoying if Windows keep updating automatically in the background and even reboot when…

System Center Virtual Machine Manager Errors and Resolutions

Error Message: Error (415)Agent installation failed copying 'C:\Program Files\Microsoft System Center\Virtual Machine Manager\agents\I386\IRV-VMM01\msiInstaller.exe' to '\\IRV-HYPERV06\ADMIN$\msiInstaller.exe'.The…

PowerShell: Create User Accounts From CSV File

# User-input Variables $csvFile='C:\Users-finalized.csv' $newOu='CN=Users,DC=kimconnect,DC=com' $newCompany='Kim Connect' $logFile="c:\temp\createActiveDirectoryAccounts-$(get-date -f yyyy-mm-dd-hh-mm-ss).txt" function createActiveDirectoryAccounts{ param( $csvFile, $newOu,…

How to Fix Remote Desktop Blue Screen on Windows 2019

Problem: when an RDP session is idle for an extended period of time, that session…

PowerShell: Checking Duplicating Identifiers Among ADFS Relying Party Trusts

function getDuplicatingIfd{ write-host "Checking each relying party trust for any duplicates of identifiers..." $trusts=Get-AdfsRelyingPartyTrust $allTrustNames=$trusts.Name…

PowerShell: Hyper-V Servers Capacity Report

Current Version: # HyperVCapacityReport.ps1 # Version 0.0.2 # Report parameters $workingDirectory='C:\scripts\googleSheets' $selectFields='node,model,os,cores,cpuUtilizationPercent,ramGb,ramUsedPercent' $domainObjects=@( @{domain='intranet.kimconnect.com';dc='lax-dc02.intranet.kimconnect.com';username='intranet\clusterReport';password=$env:clusterReportPass} @{domain='intranet.dragoncoin.com';dc='lax-dc02.intranet.dragoncoin.com';username='intranet\clusterReport';password=$env:clusterReportPass}…

Windows Error When Joining Domain

Error Message: ---------------------------Computer Name/Domain Changes---------------------------Changing the Primary Domain DNS name of this computer to ""…

PowerShell: How to Disable Users Authenticated Control (UAC)

This has been tested on Windows Server 2008, 2016, and 2019. Nothing fancy, just copy/paste…

PowerShell: Update CSV File Using Active Directory

# adAccountsCsvUpdate.ps1 $originalCsv='C:\Users\rambo\Desktop\kimconnectUsers.csv' $newCsv='C:\Users\rambo\Desktop\kimconnectUsers-processed.csv' $newEmailSuffix='@kimconnect.com' $newOu='OU=Test,DC=kimconnect,DC=com' function adAccountsCsvUpdate{ param( $originalCsv, $newCsv, $newEmailSuffix, $newOu ) function…

Resolving DNS Delegation Error: IP: [Missing glue A record]

Sample Output of DNS diagnostics: PS C:\Windows\system32> dcdiag /test:dns /s:TEST-DC01 Directory Server Diagnosis Performing initial…

How to Move C:\Users to Another Volume

Warning: this process will effectively re-route all file pointers from C:\Users\* to another volume. Windows…

PowerShell: Force Outlook to Compact On Exiting

Forcing Outlook to return free disk space to RDS nodes upon user exiting would be…

How To Quickly Search a User in Active Directory by Matching Email

This one liner would do the trick: Get-ADUser -Filter {EmailAddress -eq '[email protected]'} PS C:\Windows\system32> Get-ADUser…