Category Archives: PowerShell

SQL PowerShell to check and repair Ad-hoc distributed queries Vulnerability

Introduction Ad hoc distributed queries use the OPENROWSET and OPENDATASOURCE functions to connect to remote data sources that use OLE DB. As the name suggests, ad-hoc distributed queries should only be used with infrequent access to data sources. For the … Continue reading

Posted in PowerShell, Security, SQL, T-SQL, Uncategorized, Vulnerability | Tagged , , , , , | Leave a comment

Different methods to write PowerShell output to a SQL table

PowerShell has become the ultimate choice for many database administrators because of its efficient way of handling and managing automation in a simple, quick way. It’s built on .NET Framework and uses Object Models such as COM, ADSI, ADO, and … Continue reading

Posted in PowerShell, SQL, T-SQL | Tagged , , , , , | 2 Comments

An overview of Python vs PowerShell for SQL Server Database Administration

Today, Microsoft claims that Linux runs like a First-Class citizen on Azure, .NET Core has been open-sourced, and has been ported over to Linux, taking PowerShell along. PowerShell runs really well on Ubuntu, CentOS, RedHat Linux, and even Mac OS X. … Continue reading

Posted in PowerShell, Python, SQL 2017 on Linux | Tagged , , | Leave a comment

PowerShell: Managing Service(s) Using WMI, CIM and Get-Service Cmdlet

Abstract A common task of any administrator is to manage and maintain the application availability by checking the various services status, accomplish configuring the services and restarting the service on a local/remote system. There are several components are available to accomplish … Continue reading

Posted in PowerShell | Tagged , , , , , , | Leave a comment

PowerShell : Monitoring and Notification – Disk Space Alerts

“Microsoft Technet Guru – Gold Medal Winning Article- Nov, 2016” Abstract Monitoring disk space utilization of server(s) is the critical and important job for any administrator. Keeping things organized might improve application availability and server availability. This article takes us through … Continue reading

Posted in PowerShell | Tagged , , , , , , , , , , | Leave a comment

PowerShell : CSV – Disk Space Report – Excel

Abstract Monitoring disk space utilization of server(s) is a critical and important job for any administrator. Keeping things organized might improve application availability and server availability. Being a database administrator for 10 years, I have faced and handled/managed lot of issues … Continue reading

Posted in PowerShell, Uncategorized | Tagged , , , | 1 Comment

PowerShell: Extending Modules – System Parameter measurement

The Microsoft Technet Guru Award  (August 2016) winning article  – Silver PowerShell: Extending Modules – System Parameter measurement PowerShell: Extending Modules – System Parameter measurement Abstract The objective of this post to illustrate the various methods of creating PoSH Modules. To … Continue reading

Posted in PowerShell | Tagged | 2 Comments

SQL Server Operations: Monitoring Disk Space with WMI and OLE Automation Objects

Abstract This article talks about various SQL methods to fetch the disk usage details and use of T-SQL in conjunction with invoking OLE automation procedures and WMI  class libraries using SQL Windows Shell interface. The step by step  details about … Continue reading

Posted in PowerShell, SQL, T-SQL | Tagged , , , , , | 1 Comment

Disk Space GUI Tool – Multi Server(s) – Grid and Email Output

Monitoring server resources is critical and important job of any Administrator. Keeping things organized might improve application availability and server availability. Being a database administrator for 1o years have faced and handled/managed lot of issues with disk space. There are … Continue reading

Posted in PowerShell, Uncategorized | Tagged , , , | Leave a comment

PowerSQL – Get SQL TraceFlag SQL Service and Config Information

Get SQL Server configuration, service info, start type along with enabled Trace Flags of local or remote servers. This script outputs sql server configuration, service, start type, Service Account along with startup trace flags. The script will work on SQL … Continue reading

Posted in PowerShell, SQL | Tagged , , | 2 Comments