PowerTip: Find a List of PowerShell Type Accelerators

PowerTip: Find a List of PowerShell Type Accelerators

  • Comments 5
  • Likes

Summary: Use Windows PowerShell to list type accelerators.

Hey, Scripting Guy! Question How can I find a list of type accelerators available in Windows PowerShell?

Hey, Scripting Guy! Answer Use the Get property from TypeAccelerators class:


Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Wouldn't a shorter version be: [accelerators]::Get

  • @Burt Harris
    There isn't a type accelerator for that. You would have to do this in order to get a type accelerator available.

    $accelerator = [PSObject].Assembly.GetType('System.Management.Automation.TypeAccelerators')
    $null = $accelerator::Add('accelerator',$accelerator)

  • thank you

  • Thanks for the tips!

  • According to this very blog (http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/08/use-powershell-to-find-powershell-type-accelerators.aspx), it was at one point possible to use [accelerators]::get, as @Burt Harris suggested:

    "But Windows PowerShell 3.0 also introduces a type accelerator for type accelerators. Yep, and it is very easy to use. Here is the command: [accelerators]::get ..."

    What ever became of that?