PowerShell to move specific files after x days

Explanation: Set the directories: Replace "C:\SourceDirectory" and "C:\DestinationDirectory" with the actual source and destination paths. Set file types: Replace ` “.txt”, “.log”` with the desired file extensions. Set the number of days: Modify $days to specify the age threshold for moving files. Get the current date: The script calculates the cutoff date by subtracting the specified number of days from the current date. Get the... » read more

Windows Failover Cluster – Designate all nodes as possible owners

Task: Designate all nodes as possible owners for DB01 and DB02 to ensure the cluster resource comes online automatically after a failover. Steps: To designate all nodes as possible owners for resources like DB01 and DB02 in a Windows Server Failover Cluster (WSFC), you can follow these steps. This ensures that the cluster resource comes... » read more

Apply Latest CU Update for SQL Server 2019

Note: Run the SQLServer2019-KB5039747-x64.exe file to start the patch. An GUI similar to the SQL Server Install will popup to guide you through the patch process. Make sure SQL Server services has been stopped. Make sure to restart the server after the patch has completed. After the restart, the SQL Server version should reflect what... » read more

Windows Failover Cluster – Configure a File Share Witness

Create a Witness This sections shows how to  create a witness. In the Failover Cluster Manager, locate the new cluster resource, right click, More Actions, Configure Cluster Quorum Settings. You Begin page of the Configure Quorum Wizard Choose “Select the quorum witness” Quorum Configuration Option page. This is where you will inform the Wizard which... » read more

Troubleshoot SQL Server AlwaysOn Failures

Look into the following logs… Critical Events from Failover Cluster Manager Validate Cluster Report Windows Event Viewer Quick Action: Update SQL Server to Latest Patch. Reboot server on all nodes. Critical Events from Failover Cluster Manager Cluster -> Nodes -> Show Critical Events Validate Cluster Report Cluster -> Validate Cluster -> Run all test Windows... » read more

Screen Capture on Windows

Press Windows logo key  + Shift + S for a static image snip. https://support.microsoft.com/en-us/windows/use-snipping-tool-to-capture-screenshots-00246869-1843-655f-f220-97299b865f6b

The service did not start due to logon failure.

Error: Getting the following error when trying to set a network account to run SQL Server service. The service did not start due to logon failure. Fix: Make sure the network account has “logon as a service” permission. Enable service log on permission for Run As accounts Go to Administrative Tools and select Local Security... » read more

MMC could not create the snap-in for Task Scheduler

Error: MMC could not create the snap-in. The snap-in might not have been installed correctly. Fix: Microsoft Management Console (MMC) is a built-in feature in Windows operating system that lets you manage snap-in on the go. Snap-ins are basic component of a console. Sometimes, snap-ins may not work properly, especially if the registry configuration of... » read more

How to Delete hiberfil.sys on Windows 10

How to Delete hiberfil.sys on Windows 10 Select Search. Enter command. … Right-click Command Prompt and select Run as Administrator. … Select Yes if a User Account Control window appears requesting permission to continue. … Type powercfg.exe /hibernate off into the Command Prompt window and press Enter.