From the course: Learning PowerShell

Unlock the full course today

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

Relieving anxiety with -WhatIf and -Confirm

Relieving anxiety with -WhatIf and -Confirm - PowerShell Tutorial

From the course: Learning PowerShell

Start my 1-month free trial

Relieving anxiety with -WhatIf and -Confirm

- [Voiceover] So you're probably thinking right now "Matt, I've got the hang of this PowerShell stuff and I'm ready to start writing my commandlets, I'm ready, I've been working on my test environment, they all worked great." You're gonna get to a point where you run your first PowerShell script inside a reduction environment and I guarantee you, you're gonna have that first script all ready to go, it's all fired up, commandlets are all in order, you know it worked in tests and your hand is gonna hover over the word Enter. You're not sure what's gonna happen, you're gonna have anxiety. PowerShell can cause anxiety. So, let me actually show you a commandlet here. And I'll recommend, don't run what I'm about ready to show you, but let's talk about what this would do inside of our environment. So, I'm gonna say Get-Service and bring up my handy-dandy pipe and type in Stop-Service. I know what you're thinking. You might be sitting on the edge of your chairs as you're watch this video…

Contents