30 common tasks you perform using the GUI that you can do faster in Windows PowerShell

Sign in to queue

The Discussion

  • User profile image
    Latha Nair

    Hi Orin,

    This site (30 common tasks you perform using the GUI that you can do faster in Windows PowerShell) says

    No media available
    The recording for this session is not yet available
    I'd like to get hold of the presentation.

    Thanks,
    Latha.

  • User profile image
    Orin

    That's just because with this one they took video of me, so it takes them a little while to edit the video and the slides together. Imagine that it will be available by 19 Sep.

  • User profile image
    Sayad

    Hi, Could I have access to the slides please. It would save me a lot of trouble creating a poster for my teams cubicles with the 30 commands. Everyone was at teched and is very interested to take this up.
    Thanks
    Sayad

  • User profile image
    Latha Nair

    The presentation is online now. But how can I get access to the slides?

  • User profile image
    Rambling​Cookie​Monster

    Hello!

    Nice presentation - two critiques:

    • Too much focus on servers, phrasing wise. PowerShell isn't exclusively for servers, yet language like that used in the presentation may scare off, turn off, or give excuses to folks who should know PowerShell. Most of the examples were widely applicable to other areas in IT.
    • Focus on Operating System specific commands. Yeah, Windows 8 and 2012 and later have a wealth of new Cmdlets. That's not very helpful for the majority of managed systems out there that are running Windows 7 and 2008 R2 or earlier.  (Don't get me started on the fact that Microsoft authors are relying on these commands in DSC resources).

    Cheers!

  • User profile image
    Mike R

    The commands are nice, but would be even better if they were supported on Win 7 and Server 2008. We are still over a year away before we will be considering an OS upgrade on the desktop, and will be running older servers even longer. Maybe

    Add to that the commands are longer for PS than the cmd alternative, leaving off the fact that we are not likely to have a gaming pad in the office. By the time I get powershell open on a system, I could already have most of these tasks done via the gui or command line. Maybe when we get to the new desktop OS, and more that a couple of servers on 2012 this will be worth looking at again.

  • User profile image
    Colin McLeod

    @Mike R: If you're not already learning PowerShell and you're a Windows shop your personal value will exponentially decrease with time (as an administrator). It was worth looking at when PS3.0 came out 2 years ago. I absolutely guarantee I would win a race in any of the admin tasks you're performing via cmd.exe or GUI. Here's why -

    Commands being longer -

    PowerShell has a cmdlet called "New-Alias" which allows you to specify shorten oft used commands. Just like Bash. As an example you could create an alias for "Get-NetIPConfiguration" that's "Get-IP" or even just "ip"

    Then "Get-NetIPConfiguration -Detailed" becomes "ip -Detailed". Also PowerShell is not case sensitive it's just written in camel case for legibility (however I do think it's case aware, just not case sensitive). You could run "get-netipconfiguration -detailed" and "ip -detailed".

    Also you can press tab to autocomplete commands. If you type "get-netipc" then press tab it will autocomplete to "Get-NetIPConfiguration". This applies to the parameters of a command as well. If you type "Get-NetIPConfiguration -" and hit tab it will autocomplete the parameter set at the first position. Continue add hyphens and hitting tab and you'll eventually have every parameter in your command.

    You can scroll through cmdlets by typing "Get-" or "Set-" or "Add-" or "Remove-" and tapping tab to go through the list of available cmdlets.

    My hands rarely leave the keyboard.

    PowerShell sluggish to start -

    I have the opinion that your PowerShell console is meant to be open at all times on your workstation, from logon to logoff. I have it launching at startup within cmder, multiple tabs connecting to different servers via SSH, my aliases and custom functions load automatically.

    If someone calls saying "I'm getting accessed deny on X resource" within 5 seconds I've run 'Get-PwdAge username' and determined if their password expired midday or not. - This alone has increased satisfaction ratings with IT.

    The first thing coming out of my mouth is no longer "did you reboot?", it's "lemme just check something quick... yep your password expired after you logged in this morning. Just hit control alt delete and choose Change Password and you should be good, if not just log off and back on."

    Needing a gaming device for hotkeys -

    Autohotkey and other hotkey applications have existed for years. You can connect a second keyboard to your workstation and remap every single key to a different function on that second keyboard. A very small inexpensive wireless tablet keyboard makes a great 'admin hotkey' device. A racing foot peddle joystick from a yard sale equipped with a gas peddle and brake peddle gives you two foot powered hotkeys.

    Can't use the cmdlets in the video -

    You can find PS scripts that replicate the functionality of the cmdlets demonstrated in the video and load them with your $profile. You can find pre-made scripts right in the Technet repo.

    All of these cmdlets the presenter is demonstrating are simply fronts for standard WMI calls, that PowerShell has had the ability to do all along. It takes some extra time to locate and set up but the time spent and time saved ratio is probably 5:1.



    Note: All of this is just the tip of iceberg, you need to start learning PowerShell now before your skills become obsolete.

  • User profile image
    brett

    where are the slides for this video as the last commands were not shown.

  • User profile image
    Andrew Burt

    Another vote to get the slides uploaded if possible!
    Cheers.

  • User profile image
    matjazz

    You can get presentation in PPT format at https://mstechednz.blob.core.windows.net/slides2014/DCIM324.pptx">https://mstechednz.blob.core.windows.net/slides2014/DCIM324.pptx.

     

    It is to be kept near your working place, till it does not "sink in" :)

     

    Regards,
    Matjaz

     

  • User profile image
    Andrew P

    Nice scaremongering!

    I thinks its a little more than just that...

  • User profile image
    bgshacklett

    I must agree that it's quite unfortunate how many of these commands are unavailable in Windows 7. While it's possible to work around it, it makes life quite difficult if you're jumping into a new environment (as a consultant, for instance). For now, we're going to have to continue to remember multiple ways to do things. Yes, there may be functions or scripts out there that duplicate the functionality, but I'm not going to trust them as I would built in commandlets, and I'm certainly not going to just grab them and use them on the fly.

    Secondly, regarding the gaming device, why not inform the audience of how tab completion works? Custom functions can be written for a lot of the functionality mentioned as well. While I will applaud out of the box thinking, this being suggested in a Microsoft demonstration is... questionable.

  • User profile image
    Orin

    As I'm not a MS FTE, what I choose to use in my demos is my own business. If you've ever watched people type reams of PowerShell on stage, you'll quickly understand why using a gaming controller to speed things up works a treat.

Add Your 2 Cents