Git – The 5 Percent that I Always Use

One of the reasons I got into IT was that I really enjoy learning new things. Unfortunately, there are so many things to learn that it’s easy to get overwhelmed. Does it make sense to do a deep-dive into each technology that you use, or does it sometimes make sense to skim the cream off …

Continue reading ‘Git – The 5 Percent that I Always Use’ »

Get-Learning – Launching Powershell

I thought I’d take a few minutes and show several ways to launch PowerShell. I’ll start with the basics and maybe by the end there will be something you haven’t seen

before.

The Start Menu

One of the first places to look for PowerShell is in the Start Menu. Opening the start menu and typing “PowerShell” will get you something like this:


Note that there are several options

  • Windows PowerShell (64-bit console)
  • Windows PowerShell ISE (64-bit ISE)
  • PowerShell-6.0.0 (PowerShell Core…you might not have this)
  • Windows PowerShell (x86)  (32-bit console)
  • Windows PowerShell ISE (x86) (32-bit ISE)

There’s also a “debuggable package manager”, which is a Visual Studio 2017 tool (and essentially the 32-bit console).

For each of these, you can click on it to launch, but there are other options as well:

  • Click to run a standard PowerShell session
  • Right-Click and choose “Run As Administrator” to run an elevated session (if you are a local administrator)

You’ll also notice that the right-click menu has options to run the other versions (ISE/Console, 32/64-bit).

The Run dialog

From the Run dialog (Windows-R), you can type PowerShell or PowerShell_ISE to launch the 64-bit versions of these tools.

What you may not know (and I just learned this recently, thanks Scott) is that if you hit ctrl-shift-enter, instead of just hitting enter, it will run them elevated (as administrator).

Windows Explorer

The final place I’m going to mention is Windows Explorer.  If you have it open, you can launch PowerShell or the ISE in the current directory by typing PowerShell or PowerShell_ISE in the address bar like this:


Can you think of other ways to launch PowerShell (other than from PowerShell…that would be cheating)?  Let me know in the comments.

 

–Mike

Calling Extension Methods in PowerShell

A quick one because it’s Friday night. I recently found myself translating some C# code into PowerShell.  If you’ve done this, you know that most of it is really routine.  Change the order of some things, change the operators, drop the semicolons. In a few places you have to do some adjusting, like changing using …

Continue reading ‘Calling Extension Methods in PowerShell’ »

Deciphering PowerShell Syntax Help Expressions

In my last post I showed several instances of the syntax help that you get when you use get-help or -? with a cmdlet. For instance: This help is showing how the different parameters can be used when calling the cmdlet. If you’ve never paid any attention to these, the notation can be difficult to work …

Continue reading ‘Deciphering PowerShell Syntax Help Expressions’ »

Great Books for PowerShell Ideas

I get asked a lot about what PowerShell books people should be reading. The easy answer is, “It depends”. If you’re looking for a tutorial book (or two) to get you started with PowerShell, the only answer I give is “Learn PowerShell in a Month of Lunches”, followed by “Learn PowerShell Toolmaking in a Month …

Continue reading ‘Great Books for PowerShell Ideas’ »

You don’t need semicolons in multi-line hashtable literals.

This is not a world-changing topic, but I thought it was worth sharing. If you have written hashtable literals on a single line, you’ve seen this before: Sometimes, it makes more sense to write the hashtable over several lines, especially if it has several items. I’ve always written them like this: I was watching Don …

Continue reading ‘You don’t need semicolons in multi-line hashtable literals.’ »