PowerShell

Tail in Windows

As an Unix administrator you easily get used to some standard tools that are available in most of the distributions.

One of them is “tail” mostly used with the “-f” option. The “-f” allows you to follow the data as it’s being appended to a file – most commonly used to view log files.

Unfortunately when you type “type -f” in the default Windows command interpretor (cmd.exe) you won’t come far…

Fortunately there’s a way to do it using PowerShell.

This will show you the whole content of the file and display any new data that is being appended to the file.

 

Determining script execution time in PowerShell

How to determinate the total execution time of your script:

Put a new line at the beginning of your script which will start the counter:

To see how much time passed by since the start you can simply use:

Go to Top