Category Archives: PowerShell

PowerShell – Uptime of Multiple Machines – Example for Custom Formatting and Grid View

This post is to help you out in finding UpTime of one or more computers also you can pass file as its input parameter . Most of the time, the Powershell console might not fit all the required output columns. … Continue reading

Posted in PowerShell | Tagged , , | Leave a comment

PowerShell – Invoke Commands,Batch files & Executable file – Dynamically passing Parameters

I’ve recently got a request to invoke an executable file from Powershell. Different ways of executing a executable file is given below. The advantage is that either you can pass the parameters dynamically by reading it from a text file or using … Continue reading

Posted in PowerShell | Tagged , , | Leave a comment

PowerShell – Identify and switch between installed PowerShell Versions

Most of the time we have been used to cmdlets and it’s various features but do not know about the version and hence this post might help some of you to understand in finding different versions of PowerShell and how … Continue reading

Posted in PowerShell | Tagged , , , , | 3 Comments

PowerShell – Get CPU Details and its Usage

This PowerShell script helpful in finding No of Processors, Speed and It’s current usage based on samples being gathered at frequent intervals. /* Get No of Processors,Speed and its usage*/ Function Get-CPUs { param ($server) $processors = get-wmiobject -computername $server … Continue reading

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

PowerSQL – Find OS and Memory Usage Details – Multi Server Script – No Input files

Multi Server script to find OS and Memory details.  It doesn’t require a text file as its input but you have to pass computer names as its parameters which are separated by comma. function Get-OSMemory { param( [string[]]$ComputerName = “.” … Continue reading

Posted in PowerShell | Tagged , , , | 2 Comments

PowerSQL – SQL Instance Configuration & Installation Information by Reading Registry Keys

Today I got a chance to retrieve configuration information of sql server 2005 instances. PowerShell provide a facility to read the registry information with ease. PowerShell treats the registry like any other location or directory. One critical difference is that … Continue reading

Posted in PowerShell | Tagged , , | 1 Comment

PowerSQL – Different Approaches to Find Free Space in all disk drives

Different ways to find FreeSpace  in all disk drives of a given server T-SQL Using WMIObject Counters All three methods are explained below This post illustrates the simplest way of doing anything with ease using Powershell. I hope everyone agree … Continue reading

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

PowerShell – Identify Service Account & Other Details of SQL Services – Multi Server Script

One of my friend requested me to give a mutli server script to pull SQL Service related details. Here is a quick PowerShell script to find Name, ServerName, Status, StartupMode, Service Account and other details of SQL Services across all … Continue reading

Posted in PowerShell, SQL | 5 Comments

SSAS – Find Cube Database Name, Size,Status and Total Size of SSAS Server

We are planning to take SSAS cube database backup since our backup tool does full file system backup in case of recovery, restoration is taking more time and hence as a first step we are started gathering the number of … Continue reading

Posted in PowerShell, SSAS | Tagged , , | 4 Comments

We came across a scenario where database bak files being created from long time which are no more in use and hence cleanup those files since we’ve backup tool is in place. We’ve many *.BAK (database backup files) created across … Continue reading

Posted on by Prashanth Jayaram | Leave a comment