Monthly Archives: July 2015

How to find the port where SQL server is listning using PowerShell

Here is the PowerShell code snippet to find the port where the SQL server is listing:

Posted in Scripts | Tagged , | Leave a comment

How to find out if a PowerShell script is executed as Administrator

Here is a PowerShell code snippet to find out if a script is run as Administrator:

Posted in Scripts | Tagged , , | 1 Comment

How to find the SQL instance using PowerShell and store in a variable

Here is a PowerShell script to find the SQL server instance and store the value in a variable:

Posted in Scripts | Tagged , , | Leave a comment

Store and restore passwords in PowerShell scripts

Security is something that every administrator should take seriously.¬†Clear text passwords in (PowerShell) scripts is not something that is best practice and should be avoided or handled differently. In this post I am going to encrypt a password (not a … Continue reading

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