Day: October 6, 2021

PowerShell: Set Windows Scheduled Task to Send a Pop-up Message

# Set variables $taskName='Bi-weekly Meeting Reminder' $time='11:50am' $daily=New-ScheduledTaskTrigger -Daily -At $time $everyOtherDay=New-ScheduledTaskTrigger -Daily -DaysInterval 2…

PowerShell: Rename Hyper-V Object and Clustered Role Resource

$oldName='testWindows' $newName='server01.intranet.kimconnect.com' # Rename Hyper-V Clustered Resource: Guess VM $vm=Get-clustergroup -Cluster (get-cluster).Name -Name $oldName $vm.Name=$newName…

PowerShell: Detect Microsoft SQL Version and Installed Location

function getSqlInfo{ $results=@() $instances=(get-itemproperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances foreach ($i in $instances){ $p=(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\Instance…

Use CMD to Kill All Instances of a Program / Process

This can be invoked in an un-elevated session. The command is: taskkill /F /IM <PROGRAM.EXE>…