Powershell – Variable for Null, Empty String and White Space

More often than not, we create variables with the intent they will hold a value. We typically then choose to act upon that value. Therefore, if a variable doesn’t have value, this is something we would want to check against in our conditional logic flow. Read More …

Enable WinRM with Group Policy for PowerShell Remoting

PowerShell Remoting really can makes a routine work a lot easier, but it requires quite a bit of work to get all the remote computers ready to take the remoting calls, such as automatically start Windows Remote Management service. Read More …

Powershell – If -And & If -Or Statements

One of the best statements for filtering data is the If clause. For scripts that require precise flow control you could incorporate PowerShell’s -And, the benefit is that your test could now include multiple conditions. Read More …

SQL Server – ANSI_Padding and Scripting from SSMS

Let’s say that you want to quickly create a table from an existing table in another database. If you are Read More …

Embedding External Files in PowerShell Scripts

Sometimes you have to create a custom script that requires external files, for example binary dll files or executables. One Read More …

Calculate MD5 and SHA1 file hashes using PowerShell V4

The majority of software distribution occurs electronically. However, the larger the downloads, the larger the risk of corrupted data transfer. Read More …

Retrieve “Password Last Set” and Expiration Date (PowerShell)

In this post we will look how to retrieve password information, in an Active Directory domain, to find out when Read More …

Replace Function to replace characters in a String (VBA)

Use the VBA Replace function to replace a substring of characters in a string with a new string. VBA Replace Read More …