SysAdmin Tools
The Ultimate Server Audit: Deep-Dive Inventory to Excel (VBScript) | Lazy Admin Blog

If you are facing a massive compliance audit or a data center migration, “basic” info isn’t enough. You need to know exactly what is under the hood: What roles are active? How much disk space is actually left? What random software was installed three years ago?
This VBScript is a one-stop-shop. It checks network connectivity and then scrapes WMI and the Registry to build a massive, multi-column Excel report.
What this Script Collects:
- Hardware: Manufacturer, Model, CPU Type, and RAM (converted to GB).
- OS Details: Version, Caption, and the exact Installation Date.
- Storage: Total Size vs. Free Space (with a Red-Alert highlight if space is < 20%).
- Network: DHCP status, IP, Subnet, and Gateway.
- Software & Roles: Every Windows Server Role/Feature and every application listed in the Registry’s Uninstall key (including version and install date).
Preparation
- Directory: Create
C:\Tempon your local machine. - Input: Create a file named
ServerList.txtinC:\Tempwith your server names (one per line). - Excel: Ensure Microsoft Excel is installed.
The Script: Server_Inventory.vbs
' Save as Server_Inventory.vbs in C:\Temp' lazyadminblog.com - Ultimate Inventory ScriptOn Error Resume Next dtmDate = DatestrMonth = Month(Date)strDay = Day(Date)strYear = Right(Year(Date),2)strFileName = "C:\Temp\ServerInventory_" & strMonth & "-" & strDay & "-" & strYear & ".xls"Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.Workbooks.Add Set fso1 = CreateObject("Scripting.FileSystemObject") Set pcfile = fso1.OpenTextFile("C:\Temp\ServerList.txt",1) Wscript.Echo "Audit in progress... Please wait!"'--- Setup Header Row ---Sub SetupHeader(col, text) objExcel.Cells(1, col).Value = text objExcel.Cells(1, col).Font.Colorindex = 2 objExcel.Cells(1, col).Font.Bold = True objExcel.Cells(1, col).Interior.ColorIndex = 23 objExcel.Cells(1, col).Alignment = -4108 ' CenterEnd SubSetupHeader 1, "Computer Name"SetupHeader 2, "Manufacturer"SetupHeader 3, "Model"SetupHeader 4, "RAM (GB)"SetupHeader 5, "Operating System"SetupHeader 6, "Installed Date"SetupHeader 7, "Processor"SetupHeader 8, "Drive"SetupHeader 9, "Drive Size (GB)"SetupHeader 10, "Free Space (GB)"SetupHeader 11, "Adapter Description"SetupHeader 12, "DHCP Enabled"SetupHeader 13, "IP Address"SetupHeader 14, "Subnet"SetupHeader 15, "Gateway"SetupHeader 16, "Roles & Features"SetupHeader 17, "Installed Software"SetupHeader 18, "Install Date"SetupHeader 19, "Version"SetupHeader 20, "Size"y = 2 Do While Not pcfile.AtEndOfStream computerName = pcfile.ReadLine Err.Clear Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & computerName & "\root\cimv2") If Err.Number = 0 Then ' Fetch Queries Set colSettings = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem") Set colOSSettings = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem") Set colProcSettings = objWMIService.ExecQuery("SELECT * FROM Win32_Processor") Set colDiskSettings = objWMIService.ExecQuery("Select * from Win32_LogicalDisk Where DriveType=3") Set colAdapters = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True") For Each objComputer In colSettings strManufacturer = objComputer.Manufacturer strModel = objComputer.Model strRAM = FormatNumber((objComputer.TotalPhysicalMemory / (1024^3)), 2) For Each objOS In colOSSettings strOS = objOS.Caption OSinstDate = CDate(Mid(objOS.InstallDate,1,4)+"/"+Mid(objOS.InstallDate,5,2)+"/"+Mid(objOS.InstallDate,7,2)) For Each objProc In colProcSettings strProc = objProc.Name ' Populate Static Info objExcel.Cells(y, 1).Value = computerName objExcel.Cells(y, 2).Value = strManufacturer objExcel.Cells(y, 3).Value = strModel objExcel.Cells(y, 4).Value = strRAM objExcel.Cells(y, 5).Value = strOS objExcel.Cells(y, 6).Value = OSinstDate objExcel.Cells(y, 7).Value = strProc ' Drive Logic a = y For Each objDisk In colDiskSettings objExcel.Cells(a, 8).Value = objDisk.DeviceID sz = objDisk.Size / (1024^3) fr = objDisk.FreeSpace / (1024^3) objExcel.Cells(a, 9).Value = FormatNumber(sz, 2) objExcel.Cells(a, 10).Value = FormatNumber(fr, 2) If fr < (sz * 0.2) Then objExcel.Cells(a, 10).Interior.ColorIndex = 3 ' Low Space Alert a = a + 1 Next ' Network Logic b = y For Each objAdapter In colAdapters objExcel.Cells(b, 11).Value = objAdapter.Description objExcel.Cells(b, 12).Value = objAdapter.DHCPEnabled If Not IsNull(objAdapter.IPAddress) Then objExcel.Cells(b, 13).Value = objAdapter.IPAddress(0) If Not IsNull(objAdapter.IPSubnet) Then objExcel.Cells(b, 14).Value = objAdapter.IPSubnet(0) If Not IsNull(objAdapter.DefaultIPGateway) Then objExcel.Cells(b, 15).Value = objAdapter.DefaultIPGateway(0) b = b + 1 Next ' Roles & Features x = y Set colRoleFeatures = objWMIService.ExecQuery("Select * from Win32_ServerFeature") If colRoleFeatures.Count > 0 Then For Each objRole In colRoleFeatures objExcel.Cells(x, 16).Value = objRole.Name x = x + 1 Next Else objExcel.Cells(x, 16).Value = "None Found" End If ' Software Registry Scan s = y Const HKLM = &H80000002 strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" Set objReg = GetObject("winmgmts://" & computerName & "/root/default:StdRegProv") objReg.EnumKey HKLM, strKey, arrSubkeys For Each strSubkey In arrSubkeys objReg.GetStringValue HKLM, strKey & strSubkey, "DisplayName", strVal1 If strVal1 <> "" Then objExcel.Cells(s, 17).Value = strVal1 objReg.GetStringValue HKLM, strKey & strSubkey, "InstallDate", strVal2 objExcel.Cells(s, 18).Value = strVal2 objReg.GetDWORDValue HKLM, strKey & strSubkey, "VersionMajor", vMaj objReg.GetDWORDValue HKLM, strKey & strSubkey, "VersionMinor", vMin objExcel.Cells(s, 19).Value = vMaj & "." & vMin s = s + 1 End If Next ' Advance Row to next available empty spot y = a If b > y Then y = b If x > y Then y = x If s > y Then y = s y = y + 1 ' Buffer line Next Next Next Else objExcel.Cells(y, 1).Value = computerName objExcel.Cells(y, 2).Value = "OFFLINE" objExcel.Cells(y, 2).Interior.ColorIndex = 3 y = y + 1 End If Loop ' Final FormattingFor col = 1 To 20: objExcel.Columns(col).AutoFit: NextobjExcel.ActiveWorkbook.SaveAs strFileNameWscript.Echo "Complete! Report saved to " & strFileName
Why it’s a Game Changer
- The “Red Flag” Feature: It automatically highlights any disk with less than 20% free space in Red. This instantly tells you which servers need urgent cleanup.
- Software Archeology: Most scripts skip software lists because they are messy. This script pulls directly from the
Uninstallregistry keys, capturing even the apps that don’t show up in standard WMI queries. - Intelligent Row Management: Because software, roles, and disks all have different counts, the script calculates the “max row” used for each server and jumps to the next clear space for the next machine.
Stop Hunting for Web Servers: How to Auto-Discover Every IIS Instance in Your Domain | Lazy Admin Blog

Have you ever been asked for a list of every active web server in your environment, only to realize your documentation is six months out of date? You could check your DNS records manually, or you could let PowerShell do the detective work for you.
This script scans your Active Directory for Windows Servers, checks if the World Wide Web Publishing Service (W3SVC) is actually running, and then pulls a deep-profile of the hardware, OS, and network configuration for every active hit.
The Setup
- Create the workspace: Create a folder at
C:\Temp\ServersRunningIIS. - Prepare the list: The script will automatically generate a list of all Windows Servers from AD, but ensure you have the Active Directory PowerShell module installed.
- Run with Privileges: Since the script uses WMI to query remote system info (RAM, OS Version, etc.), run your PowerShell ISE or Console as a Domain Admin.
The PowerShell Script
# Script: IIS Server Discovery & Profiler# Location: lazyadminblog.com# Purpose: Identify active IIS nodes and collect hardware/OS specsImport-Module ActiveDirectory# 1. Harvest all Windows Servers from ADWrite-Host "Gathering server list from Active Directory..." -ForegroundColor Cyan$servers = Get-ADComputer -Filter {operatingsystem -Like "Windows server*"} | Select-Object -ExpandProperty Name$servers | Out-File "C:\Temp\ServersRunningIIS\serverlist.txt"# 2. Load the list for processing$serversall = Get-Content "C:\Temp\ServersRunningIIS\serverlist.txt" Start-Transcript -Path "C:\Temp\ServersRunningIIS\log_output.txt" -Appendforeach($vm in $serversall) { try { # Check if IIS Service (W3SVC) exists and is running $iis = Get-WmiObject Win32_Service -ComputerName $vm -Filter "name='W3SVC'" -ErrorAction SilentlyContinue if($iis.State -eq "Running") { Write-Host "FOUND: IIS is active on $vm" -BackgroundColor DarkBlue -ForegroundColor DarkYellow # Collect Network Info $ipinfo = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $vm | Where-Object {$_.IPEnabled -eq $true -and $_.IPAddress -like "1*"} | Select-Object -First 1 # Collect Hardware Info $hwinfo = Get-WmiObject Win32_Computersystem -ComputerName $vm # Collect OS Info $osinfo = Get-WmiObject Win32_OperatingSystem -ComputerName $vm # Flattening data for CSV-style output $allinfo = "$($hwinfo.Name);$($hwinfo.Domain);$($ipinfo.IPAddress);$($ipinfo.IPSubnet);$($ipinfo.DefaultIPGateway);$($hwinfo.TotalPhysicalMemory);$($hwinfo.Manufacturer);$($hwinfo.Model);$($osinfo.Caption);$($osinfo.OSArchitecture);$($osinfo.ServicePackMajorVersion);$($osinfo.SystemDrive);$($osinfo.Version)" # Save results to our 'Running' list $allinfo | Out-File "C:\Temp\ServersRunningIIS\RunningWebServers.txt" -Append } } catch { Write-Host "Could not connect to $vm" -ForegroundColor Red }}Stop-TranscriptWrite-Host "Audit Complete! Check C:\Temp\ServersRunningIIS\RunningWebServers.txt" -ForegroundColor Green
What’s inside the report?
The output file (RunningWebServers.txt) uses a semicolon (;) delimiter, making it easy to import into Excel. It captures:
- Network: IP Address, Subnet, and Gateway.
- Hardware: Manufacturer, Model, RAM, and Domain membership.
- Software: OS Version, Architecture (x64/x86), and System Drive.
Lazy Admin Tip
If you want to open the results immediately in Excel, just rename the output file from .txt to .csv and use the “Text to Columns” feature in Excel with the semicolon as the separator!
From Zero to Complete IP Inventory in 5 Seconds: The Multi-Host VBScript | Lazy Admin Blog

Manually documenting IP addresses, MACs, and DNS settings is the definition of “busy work.” This VBScript automates the entire process. It reads a list of servers from a text file, queries each one via WMI, and builds a professional Excel report in real-time.
How to Use This Script
- Prepare the Input: Create a text file (e.g.,
servers.txt) and list your hostnames or IP addresses, one per line. - Save the Script: Save the code below as
IPAddressInventory.vbs. - Run: Double-click the
.vbsfile. When prompted, provide the full path to your text file (e.g.,C:\Scripts\servers.txt). - Requirement: You must have Microsoft Excel installed on the machine where you run the script.
The VBScript Code
VBScript
' Save as IPAddressInventory.vbs' Input: Text file with Hostnames/IPs' Output: Excel Spreadsheet (IP_Addresses.xlsx)On Error Resume NextConst FOR_READING = 1'--- File Input ---strSrvListFile = InputBox ("Please enter the server list file path OR UNC file path" & vbCrLf & "Eg: C:\Scripts\server.txt" & vbCrLf & "Eg: \\servername\scripts\server.txt","File Input location")Set objFSO = CreateObject ("Scripting.FileSystemObject")Set objReadFile = objFSO.OpenTextFile (strSrvListFile, FOR_READING)'--- File Output ---strOutput = objfso.GetParentFolderName(strSrvListFile) &"\"'--- Error Handling ---If Err.Number <> 0 Then WScript.Echo "Please Enter a Valid file Name" Err.Clear WScript.QuitEnd If'--- Excel Object Creation ---Set objExcel = CreateObject ("Excel.application")objExcel.Visible = TrueSet objWorkbook = objExcel.Workbooks.Add()Set objWorksheet = objWorkbook.Worksheets("Sheet1")x = 1y = 1'--- Define Headers ---objWorksheet.Cells (x, y).value = "S.No"objWorksheet.Cells (x, y+1).value = "Server Name"objWorksheet.Cells (x, y+2).value = "Description"objWorksheet.Cells (x, y+3).value = "IP_Address"objWorksheet.Cells (x, y+4).value = "Subnet"objWorksheet.Cells (x, y+5).value = "MACAddress"objWorksheet.Cells (x, y+6).value = "Gateway" objWorksheet.Cells (x, y+7).value = "Preffered DNS"objWorksheet.Cells (x, y+8).value = "Primary DNS"objWorksheet.Cells (x, y+9).value = "Secondary DNS"objWorksheet.Cells (x, y+10).value = "Additional DNS 1"objWorksheet.Cells (x, y+11).value = "Additional DNS 2"objWorksheet.Cells (x, y+12).value = "WINS Primary"objWorksheet.Cells (x, y+13).value = "WINS Secondary"objWorksheet.Cells (x, y+14).value = "DNS Suffix"objWorksheet.Cells (x, y+15).value = "DNS Suffix Order"objWorksheet.Cells (x, y+16).value = "Remarks"s = 1Do Until objReadFile.AtEndOfStream k = 0 arrComputer = objReadFile.ReadLine strServer = Split (arrComputer, ",") objWorksheet.Cells (x+1, y).value = s objWorksheet.Cells (x+1, y+1).value = strServer(k) Set objWMIService = GetObject ("winmgmts:" & "!\\" & strServer(k) & "\root\cimv2") '--- Query Network Information --- If Err.Number = 0 Then WScript.Echo strServer(k) &": Inventoring" Set colAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled = True") For Each objAdapter in colAdapters objWorksheet.Cells(x+1, y+2).Value = objAdapter.Description ' IP Address Logic If Not IsNull(objAdapter.IPAddress) Then For i = LBound(objAdapter.IPAddress) To UBound(objAdapter.IPAddress) If Not InStr(objAdapter.IPAddress(i),":") > "0" Then objWorksheet.Cells(x+1, y+3).Value = objAdapter.IPAddress(i) End If Next End If ' Subnet Logic If Not IsNull(objAdapter.IPSubnet) Then For i = LBound(objAdapter.IPSubnet) To UBound(objAdapter.IPSubnet) If objAdapter.IPSubnet(i)<> "64" Then objWorksheet.Cells(x+1, y+4).Value = objAdapter.IPSubnet(i) End If Next End If objWorksheet.Cells(x+1, y+5).Value = objAdapter.MACAddress ' Gateway Logic If IsNull(objAdapter.DefaultIPGateway) Then objWorksheet.Cells(x+1, y+6).Value = "Gateway Not Set" Else For i = LBound(objAdapter.DefaultIPGateway) To UBound(objAdapter.DefaultIPGateway) objWorksheet.Cells(x+1, y+6).Value = objAdapter.DefaultIPGateway(i) Next End If ' DNS Logic If IsNull(objAdapter.DNSServerSearchOrder) Then objworksheet.Cells(x+1, y+7).Value = "DNS Not Set" Else For i = LBound(objAdapter.DNSServerSearchOrder) To UBound(objAdapter.DNSServerSearchOrder) objWorksheet.Cells(x+1, y+7).Value = objAdapter.DNSServerSearchOrder(i) y = y + 1 Next End If y = 1 objWorksheet.Cells(x+1, y+12).Value = objAdapter.WINSPrimaryServer objWorksheet.Cells(x+1, y+13).Value = objAdapter.WINSSecondaryServer objWorksheet.Cells(x+1, y+14).Value = objAdapter.DNSDomain ' Suffix Logic If IsNull(objAdapter.DNSDomainSuffixSearchOrder) Then objworksheet.Cells(x+1, y+14).Value = "Suffix Order NA" Else For i = LBound(objAdapter.DNSDomainSuffixSearchOrder) To UBound(objAdapter.DNSDomainSuffixSearchOrder) objWorksheet.Cells(x+1, y+15).Value = objAdapter.DNSDomainSuffixSearchOrder(i) x = x + 1 Next x = x - 1 End If x = x + 1 WScript.Echo strServer(k) &": Completed" Next Else ' Error Handling for Offline Servers objWorksheet.Cells(x+1, y+16).Value = Err.Number & "_" & Err.Description WScript.Echo strServer(k) &": "& Err.Description Err.Clear x = x + 1 End If s = s + 1Loop'--- Formatting and Saving ---Set objRange = objWorksheet.UsedRangeobjRange.EntireColumn.Autofit()objExcel.ActiveWorkbook.Saveas strOutput & "IP_Addresses.xlsx"MsgBox "Operation Completed Successfully " ,,"IP Address"
Key Features of the Script
- Automatic Excel Formatting: It uses
UsedRange.Autofit()to ensure the data is readable as soon as the file opens. - WMI Integration: It queries the
Win32_NetworkAdapterConfigurationclass directly from the remote machine. - Multi-Adapter Support: If a server has multiple enabled NICs, the script loops through each to capture all configurations.
- Remark Logging: If a machine is unreachable, the error code and description are written directly into the Excel “Remarks” column so you know which servers to check manually.

Standard Windows Monitoring Threshold Parameters | Lazy Admin Blog

Monitoring thresholds are often dictated by the Service Level Agreement (SLA) or Statement of Work (SoW) signed with your client. However, if you are setting up a new environment or looking for baseline recommendations, these industry standards are a great place to start.
The Performance Monitoring Matrix
Below are the typical thresholds used for enterprise Windows environments. These are designed to minimize “alert fatigue” while ensuring you have enough time to react before a service failure occurs.
| Metric | Polling Interval | Warning (Yellow) | High/Critical (Orange) | Alert/Emergency (Red) |
| CPU Utilization | 5 Minutes | > 80% for 3 polls | > 90% for 2 polls | > 95% for 2 polls |
| Memory (Available MBytes) | 5 Minutes | < 100 MB | < 50 MB | < 20 MB |
| Memory (Pages/sec) | 5 Minutes | > 500 | > 1000 | > 5000 |
| Disk Free Space (%) | 15 Minutes | < 15% | < 10% | < 5% |
| Disk Queue Length | 5 Minutes | > 2 per spindle | > 5 per spindle | > 10 per spindle |
| Network Utilization | 5 Minutes | > 60% | > 80% | > 90% |
| Service Status | 1 Minute | N/A | Stopped (Manual) | Stopped (Automatic) |
Understanding “Remedy on Demand” (RoD) Integration
In many enterprise environments, these thresholds are tied directly to an ITSM tool like Remedy on Demand (RoD).
- Warning levels usually trigger an email notification or a low-priority ticket.
- Alert levels generate a high-priority incident in RoD, often triggering an automated page to the on-call engineer.
Key Considerations for Polling Intervals
- Short Intervals (1-2 mins): Great for critical services, but increases the load on the monitoring server and the target agent.
- Long Intervals (15-30 mins): Ideal for Disk Space or non-critical capacity trends.
- The “3-Poll Rule”: To avoid alerts caused by temporary spikes (bursty CPU usage), set your monitoring tool to only trigger a ticket if the threshold is exceeded for 3 consecutive polling intervals.
A Sample Template:

No Reboot Required: Configuring Dell iDRAC via RACADM | Lazy Admin Blog

Configuring the Integrated Dell Remote Access Controller (iDRAC) is usually a “Day 1” task performed in the BIOS. But what if you’ve already deployed the server and realized the NIC isn’t configured, or the IP needs to change?
By using the Dell RACADM (Remote Access Controller Admin) utility, you can modify network settings, reset credentials, and pull system health logs directly from the command line without a single second of downtime.
Getting the Tools
To start, download the Dell EMC OpenManage DRAC Tools. This package includes the RACADM executable. You can install this on the local server or on your management workstation to manage servers over the network.
1. Remote RACADM (From your Workstation)
If you have the current credentials but need to change settings remotely, use the -r (remote), -u (user), and -p (password) flags.
Example: Get System Information
Bash
racadm -r 10.1.1.1 -u root -p calvin getsysinfo
Note: If you get an SSL certificate error, the command will still run. To force the command to stop on certificate errors for security, add the
-Sflag.
2. Local RACADM (From the Server OS)
If you are logged into the Windows or Linux OS on the Dell server itself, you don’t need credentials. The tool communicates directly with the hardware via the IPMI driver.
Example: Quick Network Setup
Bash
# Check current configracadm getniccfg# Set a new Static IP, Subnet, and Gatewayracadm setniccfg -s 192.168.1.50 255.255.255.0 192.168.1.1
3. Deep Configuration (The Config Group Method)
For more granular control (like setting DNS servers or the DRAC name), you can target specific configuration groups.
The “Lazy Admin” DNS Setup Script:
Bash
racadm config -g cfgLanNetworking -o cfgNicIpAddress 172.17.2.124racadm config -g cfgLanNetworking -o cfgNicNetmask 255.255.252.0racadm config -g cfgLanNetworking -o cfgDNSServer1 172.17.0.6racadm config -g cfgLanNetworking -o cfgDNSRacName MyServer-iDRACracadm config -g cfgLanNetworking -o cfgDNSDomainName corp.company.com
4. SSH / Serial RACADM
If you are already connected to the iDRAC via SSH, you don’t need to repeat the racadm command prefix. Simply type racadm and hit enter to enter the RACADM shell:
Bash
admin@idrac-web-01: racadmracadm>> getsysinforacadm>> serveraction powercycle
Why this is a “Lazy Admin” Win
Instead of walking to the cold aisle with a crash cart or waiting for a 20-minute reboot cycle, you can script the iDRAC configuration of an entire rack in seconds.
#DellEMC #PowerEdge #iDRAC #SysAdmin #DataCenter #RACADM #Infrastructure #ITOps #LazyAdmin #ServerManagement
The Ultimate Robocopy Command for Large-Scale Migrations | Lazy Admin Blog

If you need to move huge files while keeping a close eye on progress, this is the syntax you want. It includes logging, multi-threading for speed, and the ability to resume if the network drops.
The “Power User” Command
DOS
robocopy "D:\Source_Data" "E:\Destination_Data" /s /e /z /mt:32 /tee /log+:"C:\Logs\MigrationLog.txt"
Switch Breakdown: Why We Use Them
| Switch | What it does |
| /s /e | Copies all subdirectories, including empty ones. |
| /z | Restart Mode: If the connection drops mid-file, Robocopy can resume from where it left off instead of starting the file over. Essential for 100GB+ files! |
| /mt:32 | Multi-Threading: Uses 32 threads to copy multiple files simultaneously. (Default is 8). Adjust based on your CPU/Disk speed. |
| /tee | Writes the status to the console window and the log file at the same time. |
| /log+: | Creates a log file. Using the + appends to an existing log rather than overwriting it—perfect for multi-day migrations. |
How to Monitor Progress in Real-Time
Because we used the /tee and /log+ switches, you have two ways to monitor the status:
- The Console: You’ll see a rolling percentage for each file directly in your Command Prompt.
- Tail the Log: Since the log is being updated live, you can “tail” it from another window (or even remotely) to see the progress without touching the active copy session.
Lazy Admin Tip (PowerShell):
Open a PowerShell window and run this command to watch your Robocopy log update in real-time as files move:
Get-Content "C:\Logs\MigrationLog.txt" -Wait
Important Notes for Huge Files
- Disk Quotas: Robocopy doesn’t check destination space before starting. Use
dirordf(if using Linux targets) to ensure you have enough room. - Permissions: If you need to copy NTFS permissions (ACLs), add the /copyall switch.
- Bandwidth: Running
/mt:128(the max) can saturate a 1Gbps link. If you’re copying over a live production network, stick to/mt:8or/mt:16.
#WindowsServer #Robocopy #DataMigration #SysAdmin #ITInfrastructure #StorageAdmin #TechTips #LazyAdmin #CloudMigration
How to Patch Air-Gapped Windows Servers using WSUS Offline

Patching servers in an offline or “air-gapped” environment is a common challenge for SysAdmins. While Microsoft’s official WSUS role typically requires a network connection, the third-party tool WSUS Offline Update allows you to “bring the internet to the server” via a USB stick or DVD.
When to use this method?
This is an ideal solution for a one-time update or for small environments where setting up a complex, multi-tier WSUS architecture isn’t practical.
Note: This requires a “bridge” machine—a computer with internet access where you will build the update repository before moving it to the offline server.
Phase 1: Creating the Update Media (On the Online Machine)
- Download the Tool: Head to wsusoffline.net and download the latest version.
- Extract and Launch: Extract the ZIP file and run
UpdateGenerator.exe. - Select Your OS: Check the boxes for the operating systems you need to patch (e.g., Windows Server 2016, 2019, or legacy versions like 2008 R2).
- Download: Click Start. The tool will download all missing patches from Microsoft’s servers into a local folder.
- Size Tip: Expect downloads to range from 800MB to several GBs depending on the OS version.
- Transfer: Copy the entire
wsusofflinefolder to your removable media (USB Drive, External HDD, or burn it to a DVD).
Phase 2: Patching the Offline Server
- Insert Media: Plug your USB drive into the offline server.
- Navigate to Client: Open the
wsusofflinefolder, then open the “client” subfolder. - Run Installer: Execute
UpdateInstaller.exe. - Configure & Start: Select your desired options (like “Automatic reboot and recall”) and click Start.
The tool will now simulate a local Windows Update session, installing all the downloaded patches without ever needing a NIC connection.
#WSUS #AirGapped #SysAdmin #WindowsServer #CyberSecurity #ITAdmin #TechTips #OfflinePatching #LazyAdmin #ServerMaintenance
Troubleshooting Persistent AD Account Lockouts

We’ve all been there: a user’s Active Directory account keeps locking out every 5 minutes, even after a password reset. Finding the “ghost in the machine” can be a nightmare. Here are the most common culprits and how to kill them.
1. The 90% Culprit: Mobile Devices & ActiveSync
In nearly 90% of cases, the culprit is an old smartphone or tablet.
- The Scenario: The user changed their AD password on their PC, but their iPad at home is still trying to sync mail using the old password. After a few failed attempts, the account locks.
- The Fix: Have the user update the password on all mobile devices or temporarily turn off Wi-Fi on those devices to see if the lockouts stop.
2. Windows Credential Manager
Windows loves to “help” by caching credentials for printers, file shares, and SharePoint sites.
- The Fix: Go to Control Panel > User Accounts > Credential Manager. Under Windows Credentials, look for any entries related to the domain or internal web portals and remove them.
3. Stored Passwords (The Legacy Method)
Sometimes the GUI Credential Manager doesn’t show everything. You can access the legacy stored usernames and passwords directly:
- The Fix: Open a Run box (Win+R) and type:
rundll32.exe keymgr.dll, KRShowKeyMgr - Delete any stored passwords that look suspicious or outdated.
4. Background Applications & Web Services
Third-party tools, browser plugins, or internal HR portals often store AD credentials.
- The Scenario: A user opens Internet Explorer, and a background tool immediately attempts to authenticate.
- The Fix: Check the user’s “Startup” tab in Task Manager and disable non-essential third-party apps.
5. Advanced Diagnostics: LockoutStatus & ADLockouts
If the manual checks fail, you need to find out which Domain Controller is reporting the lockout.
- LockOutStatus: This tool from Microsoft’s Windows Server Resource Kit shows the lockout status across all DCs and identifies the “Source” machine.
- Netwrix Account Lockout Examiner: A great free alternative that often points directly to the process name causing the issue.
![lockoutstatus[1]](https://i0.wp.com/lazyadminblog.com/wp-content/uploads/2015/04/lockoutstatus1.jpg?resize=640%2C206&ssl=1)
#ActiveDirectory #SysAdmin #ITPro #AccountLockout #WindowsServer #TechSupport #DataCenter #LazyAdmin #ExchangeServer #CyberSecurity
Mastering DsQuery: Fast Domain Controller Auditing

Using the GUI to find specific servers in a large forest can be time-consuming. DsQuery Server provides a lightning-fast way to extract this data directly from the Command Prompt. Whether you need a list of Global Catalogs or want to find the Schema Master, these commands will save you hours of clicking.
1. Locating Domain Controllers in the Forest
To get a quick list of every DC across all domains in your entire forest, you can use the -Forest switch.
- To get the full Distinguished Name (DN):
DsQuery Server -Forest - To get just the Relative Distinguished Name (RDN):
DsQuery Server -o rdn -Forest
2. Targeting a Specific Domain
If you only want to see the controllers within a specific domain, use the -domain switch: DsQuery Server -domain lazyadminblog.com
3. Finding Global Catalog (GC) Servers
Global Catalogs are vital for forest-wide searches. To find which DCs in a specific domain are configured as GCs: DsQuery Server -domain lazyadminblog.com -isgc
4. Finding FSMO Role Holders
Instead of opening multiple MMC snap-ins, you can find the FSMO role holders directly. For example, to find the server holding the Schema Master role for the forest: DsQuery Server -Forest -hasfsmo schema
Note: You can replace
schemawithnaming,pdc,rid, orinfrastructureto find other role holders.
5. Exporting your Results
The most useful way to use DsQuery is to pipe the results into a text file for documentation or further scripting. Use the > operator to save your output: DsQuery Server -Forest > C:\Logs\AllDCs.txt
#ActiveDirectory #DsQuery #SysAdmin #WindowsServer #ITPro #CodingAdmin #ServerAudit #LazyAdmin #TechTips #DataCenter
Dell ExtPart: The “Magic” Utility for Legacy Partition Expansion | Lazy Admin Blog

If you’ve ever tried to expand a boot partition on an older Windows box (like Server 2003 or 2008) and found the “Extend Volume” option greyed out, you know the frustration. Enter the Dell ExtPart Utility.
This tiny 36KB tool allows for online volume expansion—meaning you can grow your NTFS partition without a reboot.
⚠️ The “Cloud” Warning
Before we dive in, a massive disclaimer: Do NOT use this in a Cloud/Virtual infrastructure (Azure, AWS, or even modern ESXi/Hyper-V). Modern hypervisors and cloud platforms use virtual disk drivers that can become corrupted if a legacy tool like ExtPart tries to manipulate the partition table directly. Use the native Disk Management or PowerShell tools instead.
How to use ExtPart.exe
- Download and Extract: It’s a self-extracting archive. Run it and extract
extpart.exeto a folder (e.g.,C:\extpart). - Open Command Prompt: Run CMD as an Administrator.
- Run the Command: Navigate to your folder and use the following syntax:
extpart [drive_letter]: [size_to_add_in_mb]
Example: To add 10GB (10240MB) to your C: drive, you would type:
extpart c: 10240
Key Specs:
- File Name: ExtPart.exe
- Size: 36KB
- Requirement: NTFS formatted basic disks.
- Reboot required? No.
Official Download Link:
- Link: Dell Basic Disk Expansion, v.1.0.4, A01
- File Name:
ExtPart.exe - Size: 36.73 KB
Installation Quick-Steps:
- Click Download File on the Dell page.
- Run the
ExtPart.exeyou just downloaded. It is a self-extractor. - By default, it extracts to
C:\dell\ExtPart. - Navigate to that folder to find the actual
extpart.exeutility you’ll use in the Command Prompt.