From the course: PowerShell 5 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Understanding cmdlet syntax

Understanding cmdlet syntax - PowerShell Tutorial

From the course: PowerShell 5 Essential Training

Start my 1-month free trial

Understanding cmdlet syntax

- It's time to dive in to understanding the Syntax structure of PowerShell commands. Now, think about something that you may be already familiar with, like, do you ever do the dir command, where you did like, *.*, and then /s? By the way, that's not gonna work in PowerShell (laughs) Because that's the old dir command. But there are some components here. Here was the name of the command. This was an argument, and this was a switch option. We have a very similar kind of concept, but a different structure. And here's the best part, though. The structure never changes. So, no matter what product you're working with, whether it be SharePoint or Exchange, the structure of a cmdlet doesn't change. We just have to learn what that structure and that syntax is. And here's what it's gonna look like, and, I'm gonna do this as, kind of fake code. So we'll call this Get-Fake. That's not a real cmdlet. It would be -parameter. Parameters adjust how this command works. It's like a fine-tuning control…

Contents