onsdag 31 augusti 2011

PowerShell: Some gotchas

Useful reading about some gotchas in PowerShell, especially for users coming from VBScript: www.rlmueller.net/PSGotchas.htm

This is a must-read for anyone with a bit of previous programming experience, so you wont do the same mistakes as I did when it comes to functions in Powershell: http://www.simple-talk.com/dotnet/.net-tools/down-the-rabbit-hole--a-study-in-powershell-pipelines,-functions,-and-parameters/

My conclusion is: For simplicity, do not call functions like this: myFunc(attr1, attr2, ...)
Instead, treat all functions as cmdlets: myFunc attr1 attr2 ...

Inga kommentarer:

Skicka en kommentar