Monday, December 1, 2014

Why are my cmdlets not working? Duh!

PS C:> Get-VM
PS C:> 

What? I have multiple VMs running on my system. I use this cmdlet often. What? Why did it suddenly stop working?

So, what to do? Of course my first move is to look at the help system.

PS C:> Get-Help Get-VM -ShowWindow

I really like the 'ShowWindow' parameter. It dumps the complete help file into a separate window where you can filter, zoom, search and more. 


Unfortunately I didn't find anything. I don't get an error in the console. I started using bing. Or Google, whatever you choose. I use bing. Of course there are lots of forum threads and random links. Nothing to do but start reading. 

The 'ah-ha' moment suddenly becomes the 'duh' moment. I saw a thread on the Get-VM cmdlet not working. And a few people were adding very complicated troubleshooting including SC-VMM stuff etc. At the end of the long thread... someone posted "run the console as admin"... DUH! 

I always run my console as admin, but for some reason this time I forgot. And didn't check.

If you have a problem in PS, and it is bizarre/strange... make sure to check how it is running. It is simple, the title bar of the console will tell you if you are running as admin. Make sure to check.


If you are new to PowerShell, simply right-click on the PowerShell Icon in the task bar and choose your option. Simple...





No comments:

Post a Comment