Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

PowerSQL By Prashanth Jayaram

Technology enthusiast with 7+ years of experience in Database Technology. I am Microsoft Certified Professional with certificates of OCA, MCP, MCTS, MCITP developer, MCITP administration and backed with a degree in Master of Computer Application. My expertise lies in T-SQL programming, Replication, PowerShell and Performance Tuning. Hobbies are Drawing, playing soccer and listening to Melodies songs.

Archives: September 2013

PowerShell – Restart Service – Local or Remote Machines

This post is to start the services of local or remote computers. It also check for all its dependent services.  The script works on below logic

  • Service status is Running

The script will stop the dependent services ,stop the main service , start the dependent service and then start the… Read more

0 comments, 592 reads

Posted in PowerSQL By Prashanth Jayaram on 23 September 2013

PowerShell – Script to Monitor a Service on a Group of servers – HTML Formatted Email Output

This post explains how to monitor a given service on a group of servers. The function Get-ServiceStatusReport comprises of various cmdLets and function to monitor any given service on a list of servers.

  • Get-Service
  • HTML Ouptut
  • Email Address validation

You can customize it as per your requirement.

The Function Get-ServiceStatusReport… Read more

10 comments, 2,459 reads

Posted in PowerSQL By Prashanth Jayaram on 17 September 2013

PowerShell – List Local or Remote Programs with an Exclusion List of Programs

This post is to list all the software installed on your local or remote machines. The exclusion list is an array item which holds the programs  that you wanted to exclude it from displaying.

********************************************************************************

Function Get-SoftwareList {
param(
[CmdletBinding()]
[string[]]$ComputerName = $env:COMPUTERNAME
)

$writeArray=@()
$excludeArray=@()
#List of programs to… Read more

4 comments, 473 reads

Posted in PowerSQL By Prashanth Jayaram on 16 September 2013

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. By default, the ordering of the columns are based on… Read more

0 comments, 321 reads

Posted in PowerSQL By Prashanth Jayaram on 9 September 2013

PowerShell – Delete Registry Entries – Remote Machines – Example Profile Deletion

 

#The following SID registry entry to be deleted across all mutiple Machines, SID is a user #who owns this user profile. Run the below script in Powershell console or ISE

$sid = ‘S-1-5-21-3656904587-1668747452′

$scriptblock = {
param($sid)
$regpath = ‘HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList’
Remove-Item -path (Join-Path $regPath $sid) -force -recurse
} Read more

0 comments, 716 reads

Posted in PowerSQL By Prashanth Jayaram on 6 September 2013

SQL – Find CPU,Memory,Connections, VLF’s,I/O of all the Databases

Find CPU, Memory, No Of Connections/databases and VLF’s and I/O details in one single script. 

You just need to run the below T-SQL in SSMS

Download the code here Metrics

*****************************************************************************

USE MASTER

GO
DECLARE @DML1 nvarchar(MAX),
@DML2 nvarchar(MAX),
@DML3 nvarchar(MAX),
@DML4 nvarchar(MAX)

DECLARE @Aggregate_IO_Statistics TABLE
(
[I/O Rank] [bigint]… Read more

4 comments, 984 reads

Posted in PowerSQL By Prashanth Jayaram on 3 September 2013