Huddled Masses
You can do more than breathe for free...
Browse: Home / Tips

Tips

Parenthesis in PowerShell

By Joel 'Jaykul' Bennett on 22-Jan-2011

I was asked recently to clarify the different uses of parenthesis in PowerShell: I struggle with $myvar.foo vs. ($myvar).foo vs. ($myvar).foo() vs. $myvar.foo(); vs. $myvar.foo(1), etc., etc. How do I know which one to use for which case? And then how to put this output into a write-output statement? There are basically three ways of [...]

Posted in Huddled | Tagged PowerShell, Q&A, Syntax, Tips | 4 Responses

I wanted to start my best-practices series…

By Joel 'Jaykul' Bennett on 24-Aug-2010

I was trying to write the first real post for that series today, but I got really distracted, and instead … Created a Virtual Launch Party for Lee Holmes’ 2nd Edition Windows PowerShell Cookbook Updated my SharpSsh Module (which I wrote about ages ago in Scriptable SSH From PowerShell) to accept PSCredential objects or passwords, [...]

Posted in Huddled | Tagged News, Quick, Tips | 1 Response

What Scope Am I In?

By Joel 'Jaykul' Bennett on 06-Aug-2010

In PowerShell the question of scope is too complicated and convoluted. I’m going to try to help you understand it, but I’m not guaranteeing that I will be able to make it seem any simpler than it actually is. Hopefully, I won’t make it more complicated than it inherently is In PowerShell you always have [...]

Posted in Huddled | Tagged PowerShell, PowerUser, Scope, Tips, Variable Scope | 1 Response

Be a responsible geek – encrypt your email (free)

By Joel 'Jaykul' Bennett on 18-Sep-2008

Everyone should encrypt their emails … especially geeks, who can be expected to understand how little effort it would take for a rogue sysadmin or clever hacker to sniff your email on it’s way to it’s intended destination. Incidentally, if you’re a geek and you don’t know that, you should try running WireShark while you [...]

Posted in Huddled | Tagged Certificate, Email, Free, Signing, SSL, Tips | 4 Responses

PowerShell PowerUser Tips: List the Cmdlets in an Assembly

By Joel 'Jaykul' Bennett on 15-Sep-2008

Tiny script… let me know if you know a better way. function Get-Cmdlets { param([System.Reflection.Assembly]$assembly) $assembly.GetTypes() | Where-Object {      $_.GetCustomAttributes([System.Management.Automation.CmdletAttribute],$false) } | ForEach-Object {      $type = $_      $_.GetCustomAttributes([System.Management.Automation.CmdletAttribute],$false)   } | Select VerbName, NounName, @{n="Type";e={$type}} | } ## Example usage. ## You can use the [System.Reflection.Assembly]::Load… methods to get [...]

Posted in Huddled | Tagged PowerShell, PowerTips, PowerUser, Reflection, Tips

PowerShell Power User Tips: A Better Prompt

By Joel 'Jaykul' Bennett on 12-Aug-2008

For this edition of my Power User tips for PowerShell, I’m going to share my (heavily annotated) prompt function. Feel free to to copy useful pieces or just place the whole thing in your profile script I’m not going to say anything more, I’ll let the comments speak for themselves. Edit: Someone just pointed out [...]

Posted in Huddled | Tagged CurrentDirectory, Path, PowerShell, PowerTips, Scripting, Tips

PowerShell Power User Tips: Bash-style “alias” command.

By Joel 'Jaykul' Bennett on 02-May-2008

I keep hearing from new users who are used to bash-style aliases, how frustrating it is not to be able to create aliases with parameters, the way you can in bash … I’m going to show you how to make the “alias” command work roughly the way it does in bash, but first, let me [...]

Posted in Huddled | Tagged PowerShell, PowerTips, PowerUser, PUT, Scripting, Tips

PowerShell Power User Tips: Current Directory

By Joel 'Jaykul' Bennett on 16-Apr-2008

This is the second in an occasional series of tips for PowerShell users: short posts which don’t intend to give guidance, but merely a tip on a feature you may not be aware of, or maybe even answers to some of the recurring questions that come up in #PowerShell. Fixing the “Current Directory” problem The [...]

Posted in Huddled | Tagged CurrentDirectory, Path, PowerShell, PowerTips, PUT, Scripting, Tips

PowerShell Power User Tips: Get-Command precedence

By Joel 'Jaykul' Bennett on 22-Mar-2008

This is the first in what I hope will be an occasional series of tips for PowerShell users: short posts which don’t intend to give guidance, but merely a tip on a feature you may not be aware of, or maybe even answers to some of the recurring questions that come up in #PowerShell. We’ll [...]

Posted in Huddled | Tagged CommandType, Ordering, PowerShell, PUT, Scripting, Tips | 2 Responses

Lijit Search

Tags

.Net .Net 2008 Scripting Games Automation Bugs Design Development Funny Gadgets GeoShell GUI Huddled Masses Internet licensing Microsoft Modules My Software News Personal PInvoke Pipeline Politics PoshCode PoshConsole PowerBoots PowerShell PowerShell Functions PowerTips Rants Recommender Repository Scripting ShowUI Software Solutions Textile Tips User Group UserInterface WalkThrough WebHosting Windows 7 WordPress WPF Xml

About Huddled Masses

This is web site is dedicated to the musings of Joel Bennett (aka Jaykul) about technology, software, software development, the web, and the world.

Any resemblance of the views expressed and the views of my employer, my terminal, or the view out my window are purely coincidental. The resemblance between them and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader.

P.S.: I occasionally link to things I think are great. When I do, I occasionally find a "referral code" so I can make a little cash. I promise that I don't link to anything just because of that cash (I wouldn't cross the street for the amount of cash those links bring in, never mind write a whole blog post) ... but I do not promise that things I link to will stay great as time passes, nor that you will agree with me about their greatness!

Archives

  • January 2012
  • October 2011
  • August 2011
  • July 2011
  • June 2011
  • March 2011
  • February 2011
  • January 2011
  • November 2010
  • August 2010

Copyright © 2012 Joel Bennett.

Powered by WordPress and Hybrid.