Author: kimconnect

PowerShell: Get All Hyper-V Host Spectre Patch Versions

# getAllVmSpectrePatchVersions.ps1 function getHyperVHostsInForest{ function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu' $rsatWindows81='https://download.microsoft.com/download/1/8/E/18EA4843-C596-4542-9236-DE46F780806E/Windows8.1-KB2693643-x64.msu' $rsat1709 =…

PowerShell: Fix All VMs CPU Compatibility Setting

# fixAllVmCpuCompatibility.ps1 # version 0.01 function getHyperVHostsInForest{ function includeRSAT{ $ErrorActionPreference='stop' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 #$rsatWindows7x32='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x86-RefreshPkg.msu' $rsatWindows7x64='https://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu'…

PowerShell: Search for Hyper-V Guest VM That Has Not Been Registered In Cluster

# findVmHost.ps1 $vmName='TESTVM01' function findVmHost($vmName){ try{ Import-Module Hyper-V Import-Module FailoverClusters $allHyperVHosts={(Get-ClusterNode | Where { $_.State…

Resolving Guest Virtual Machine Critical Status in Hyper-V Manager

Part A: Validating problem as VM in Critical Status # Check VM Status in Hyper-V…

How To Stop, Start, Restart a Windows Service Being Stuck in ‘Stopping’ Status

Convenient Function:(related to https://blog.kimconnect.com/powershell-kill-a-windows-service-forcefully) # forceRestartService.ps1 # version 0.0.2 $serviceName='Spooler' function forceRestartService($serviceName='Spooler'){ $processId=Get-WmiObject -Class Win32_Service…

PowerShell: Copy Active Directory User

# copyADUser.ps1 # Version 0.01 $fromUsername='mTyson' $newUserFirstname='Bruce' $newUserLastname='Lee' $newPassword='SOMEPASSWORD' $newEmailAddress='[email protected]' $setProxyAddress=$false function copyADUser{ param( $fromUsername,…

SQL: Truncate Transaction Logs

Overview: Significance: many small teams lack Database Admin resource to babysit SQL databases; therefore, certain…

PowerShell: Quickly Add Users into Groups on a List of Computers

$newVmNames=@( 'SERVER0001', 'SERVER0002' ) $newUsers=@( 'domain\user1' ) $groupNames='Administrators','Remote Desktop Users' $newVmNames|%{ invoke-command -computername $_ {…

Linux: How To Create XDG-MIME Association for Google Voice in Unbuntu

Google Voice is a great application that is available on IOS and Android. However, it…

How To Disable Startup Automatic Repair

Problem: Sometimes, a certain virtual machine would not boot correctly when it's being moved between…

PowerShell: How To Disable and/or Stop Windows Service

Disable and Stop Using Native Command 'Set-Service' # To disable service as well as stopping…

Microsoft Dynamics Sluggish CRM Records Creation – Slow to Update Views

Symptom: Event Logs with repeated entries... Log Name: ApplicationSource: MSCRMAsyncServiceDate: 11/15/2021 01:55:49 AMEvent ID: 25349Task…

Fixing an Issue On Windows Server 2019 Hyper-V with Uneven Distribution of Available CPU Cores

Issue: When guest-VMs are being migrated between Hyper-V Hosts within a cluster, CPU core scheduling…

CSS Snippet to Target Phones, Tablets, and Desktops Separately

@media (min-width:20em) { /* iPhones, Androids portrait 480x320 phones */ } @media (min-width:30em) { /*…

How to Know if Your Colleague is a God (Like Thor)?

Sometimes, I sit back and watch the mind games in politics, companies, churches, and even…

Using Microsoft Virtual Machine Manager (VMM) to Create Private Clouds

Step 1: Create a New Cloud Instance Preparation: Create a new Active Directory Group ('Test…

How To Create a Virtual Machine Administrator Role in SCVMM

Update: A new write-up has been posted with screenshots here. Virtual Machine Manager (VMM) 2019…

PowerShell: Technique to Pass Array Variable as Argument

Problem: The subtle difference between invoke-command -scriptblock {} -Args vs -ArgumentList is elusive enough to…

An Experience in Upgrading Synology SSD Cache Drives

This is a quick note to myself so that I wouldn't repeat the same mistake…

PowerShell: Add New Virtual Disk to Existing Guest VM in Hyper-V

# Adding disks (optional) $newVMNames='TestWindows2019' $extraDiskSize='200GB' if($extraDiskSize){ foreach($newVmName in $newVMNames){ STOP-VM -vmname $newVmName $diskFile=(join-path $destinationFolder…