Category Archives: Powershell

Powershell commands – my quick reference

Posted in Learn_Powershell, Powershell, Productivity, Uncategorized | Tagged | Leave a comment

Windows Server storage capacity and usage report using Powershell

Below Scrip generates list of all Drives and mount points configured, thery storage capacity and free space. Following Script to check the storage on a single server; If you want to calculate the storage to be added to maintain certain … Continue reading

Posted in Powershell, Productivity, Uncategorized, Windows Server | Tagged , , , , | Leave a comment

Generate SQL Query for Database Snapshot creation using Powershell

Following PowerShell script generates SQL Query to take a snapshot;

Posted in Powershell, Productivity, SQL, Uncategorized | Tagged , , , , | Leave a comment

Powershell script to test Geo-Replication Configuration

Recently we have upgraded and downgraded multiple databases in SQLAzure and as part of that we have deleted and recreated geo-replication on large number of databases. Considering the number of databases and priority we end up performing manual changes. Created … Continue reading

Posted in Azure, Powershell, SQL, Uncategorized | Tagged , , , , | Leave a comment

Check if the Server is pending reboot

I have used this Powershell script to validate if the server is pending a reboot or not. This script can be used to validate server pending reboot status on any other server within the network! https://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542

Posted in Powershell, Windows Server | Tagged , , | Leave a comment

Powershell script to search specific error on all log files in given servers

I have used this code to find specific activity failure during a critical process which is running across 25 different servers. this script also searches the log files which are created in last 5 days.

Posted in Powershell, Productivity | Tagged , , , , , | Leave a comment

Delete old files using powershell script

Powershell script to delete old backup files

Posted in Powershell, Productivity, Uncategorized | Tagged , , , | Leave a comment