Looking at the list of functions in the Function: drive, you will see some odd ones, such as CD..
, CD\
, and A:
. These are created to help the command-line experience and are not typical functions. The names of these functions, though, show an interesting difference between functions and scripts, since it should be clear that you can't have a file named A:.ps1
. Function naming, in general, should follow the same naming convention as cmdlets, namely Verb-Noun, where the verb is from the verb list returned by Get-Verb
and the noun is a singular noun that consistently identifies what kinds of things are being referred to. Our MdAndGo
function, for example, should have been named according to this standard. One reasonable name would be Set-NewFolderLocation
.
Getting Started with Powershell
Getting Started with Powershell
Overview of this book
Table of Contents (19 chapters)
Getting Started with PowerShell
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
First Steps
Building Blocks
Objects and PowerShell
Life on the Assembly Line
Formatting Output
Scripts
Functions
Modules
File I/O
WMI and CIM
Web Server Administration
Next Steps
Index
Customer Reviews