posts-powershell

Case-Sensitive Hash Tables

PowerShell hash tables PowerShell hash tables are, by default, not case sensitive: PS > $hash = @{} PS > $hash.Key = 1 PS > $hash.keY = 2...

Getting Process Based On Window Title

Identifying a Process by Window Title It isn't always easy to pick the right process because the process ID or process name may not be known or...

List Hidden Files

Did you notice that Dir, ls or Get-ChildItem do not return hidden files? Use the -Force Parameter to Reveal Hidden Files To see hidden files, you...

Calling VBScript From PowerShell

Sometimes, you may have an existing VBScript that already does just what you want. You can easily incorporate any VBScript into PowerShell because...

Encrypting PowerShell Scripts

Why Hide PowerShell Script Code? Sometimes, you may want to hide the code of your PowerShell script in order to protect passwords contained within...

Converting ASCII and Characters

Convert ASCII value to a character To convert the ASCII value to a character, use type casting like this: [char]65 Convert a character to ASCII...

Validating a URL

Validating User Input as a URL Using System.URI To make sure user input is a valid URL, you can use the System.URI type. Try to convert the raw...

Assigning Multiple Variables

Refer the code : In PowerShell, you can initialize multiple variables in just one line. The following line sets all variables to the value 1: $a =...

Converting Hash Tables to Objects

Hash Tables are convenient but are not true objects. This is bad because you are unable to output the hash content to formatting cmdlets or export...

1 3 4 5