Month: May 2022

PowerShell: Assign Guest Virtual Machine to a Cloud in VMM

# assignVmsToCloud.ps1 # version 0.02 # The following function assigns a guest VM into a…

The Process of Adding a New Hyper-V Server Into a Cluster and the Associated Virtual Machine Manager (VMM)

These are the steps: Install WindowsWindows 2019 Data Center Edition is the standard as of…

PowerShell: Check a List of Windows Computers for Online & Offline Statuses

# checkOnlineComputers.ps1 # Set a list of computers in a text file $computerListFile='C:\Temp\computerlist.txt' # Read…

PowerShell: Add Local User as an Administrator on All Servers in Domain

# addLocalAccountOnAllServers.ps1 # Feature: using only legacy commands for maximum compatibility # Set variables $newUsername='backupAdmin'…

How To Modify a Windows Service

Here's the freebie code: # Version 0.02 $serviceName='Windows_Exporter' $newExePath=$false $newSwitches=" --log.format logger:eventlog?name=$serviceName --collectors.enabled os,cpu,cs,logical_disk,net,tcp,service,textfile" function…

How To Modify Collectors of Windows Exporter

Update: here's a generalized version of this function that can be applied to other services…

How To Create a Windows Scheduled Task to Call a Program or Script

Example on How To Call a Program: Set Action = Start a Program Set Program/Script…

PowerShell: Delete Files Older Than 30 Days

Have you ever run into C:\ volumes reaching critical thresholds because certain applications or users…

How to Add New Lookup Domains into Windows DNS Suffixes

Error message: [server005.intranet.kimconnect.com]: PS E:\Users\kimconnect\Documents> add-localgroupmember -Group 'remote desktop users' -Member 'DMZ/testUser'add-localgroupmember : Principal DMZ/testUser…