Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Aliases can be redefined in certain situations (such as compiling a LCM configuration into a MOF for use with PowerShell DSC). The only safe way to script is to use the full command names (Verb-Noun).


Command names can be shadowed, you can `function get-content { "hello world" }` and that also breaks gc alias. The only safe way to script is to use the full command names including module names `Microsoft.PowerShell.Management\Get-Content`


For scripts that you intend to be used by other people, yes. My comment was about personal scripts.


Frankly, you lost my interest at LCM, MOF & DSC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: