Tag: PowerShell

Measuring How Long Commands Take in Windows

I was considering installing the timeit.exe command on my new laptop, but read that it may not work on the latest versions of Windows.  So, I found an article on StackOverflow that recommended using the Measure-Command command in PowerShell.  You use it as follows, where Get-ChildItem is just listing the current directory as an example command …

Continue reading

Combining Files in PowerShell

If you need to combine text files in cmd.exe, you would issue the following command:

If you wish to do the same for binary files, you would use the following command:

To do the same in PowerShell is pretty straightforward.  If the destination file does not already exist or already contains content, you’ll …

Continue reading

Setting the Title of the Command Prompt Window

PowerShell Prompt

I was wondering how you change the title of the Command Prompt window.  A little searching found that Scott Hanselman had answered this question here.  All you have to do is type:

and press Enter to change the title of your Command Prompt window.  It should look like the following: Note that if you are …

Continue reading

Afraid of PowerShell? Watch this video now.

I have been working more and more with PowerShell lately and I love it.  If you want to watch a great introductory 75 minute video to get up to speed quickly, look no further than here: Windows PowerShell Crash Course https://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/WSV321 It is presented by Don Jones and Jeffrey Snover.  They share a number of great tricks and …

Continue reading

Want to add color to PowerShell code in your docs?

I was writing a Word document and wanted syntax highlighting for my PowerShell scripts.  It turns out that ISE (Integrated Scripting Environment) has an extension for copying text with color (and for copying text with color as HTML).  Just do the following: Install the PowerShellPack.msi file from here. Open ISE and your .ps1 PowerShell file. …

Continue reading

Load more