Saturday, September 14, 2013

PowerShell Techniques : Alias v/s Full Cmdlets usage.

 

Hi Everyone,

I hope you are enjoying your weekend.

This is my another post on Powershell techniques.

We all love Powershell alias's they are good and they handy and saved lots of key strokes.  I use Powershell alias a lot. But i have seen few Powershell scripter and they do use Powershell alias in their scripts. 

In Console

1 (fig. 1)

2(fig. 2)

You can see when we use alias in Powershell Console, it use less space and less key strokes,

Good, we know Alias are good so?

In Powershell scripts i don’t prefer to user Powershell alias. Powershell scripts are used by other too , we share the script , so if someone want to change anything or append anything then it is bit difficult  and intercept the code.

So for easy reading, easy interception using full cmdlets are very useful to use in the scripts.

3

Note :- This is my personal opinion and view. 

Happy Scripting ;)

That’s all for now.

Thanks

Aman Dhally

clip_image001 clip_image002 clip_image003 clip_image005clip_image007

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.