Author Archives: Steve

About Steve

C# Software Developer in Madrid

Powershell Tip #136: Read first and last byte of a file

Tip: You can read the first and last byte of a file.

Powershell Tip #135: Read file as a byte array

Tip: You can read the content of a file as a byte array.

Powershell Tip #134: Out-GridView with PassThru parameter

Tip: You can use the PassThru parameter to send the selected items from the window down the pipeline with the Out-GridView cmdlet. In other words, with the PassThru parameter the GUI window will get two buttons : OK and Cancel. Without -PassThru With -PassThru If you select the calc.exe line and press Ctrl key to select also… Read More »

Powershell Tip #133: Set a title to Out-GridView window

Tip: You can set a title when using the Out-GridView cmdlet. It can be useful in cases you have multiples windows open to compare them.

Powershell Tip #132: Combine two paths using Join-Path cmdlet

Tip: You can combine two paths using the Join-Path cmdlet.

====== Documentation Join-Path

Powershell Tip #131: Add certificates to Personal, Root and Intermediate stores

Tip: You can add certificates to Personal, Root and Intermediate stores (LocalMachine) Personal

====== Root

====== Intermediate

====== MSDN StoreLocation Enumeration StoreName Enumeration

Powershell Tip #130: Convert ticks <> datetime

Tip: You can convert tickets to datetime and vice versa. Convert ticks to datetime

Convert datetime to ticks

Powershell Tip #129: Get midnight time

Tip: You can get the midnight time :

Powershell Tip #127: Wait for EMC Avamar Backup to be completed

Tip: You need to wait until the EMC Avamar Backup client finishes the backup. An easy way to do that is to check if the processes avtar and avvss are running.