Chapter 16. Making tools that make changes
So far, we’ve been focused on tools that get information, Get-MOLSystemInfo being our running example. But you’re obviously going to create tools that make changes, too. When you do so, there are a couple of extra steps that you should take in order to remain consistent with the rest of PowerShell. You’ve already seen a hint of this: the support for –Confirm and –WhatIf that our Invoke-MOLDatabaseQuery function included. In this chapter, we’ll walk you through those details.
Note
We’re going to be using some of PowerShell’s CIM commands in this chapter. Those work against Windows Management Instrumentation (WMI) but only work if PowerShell Remoting has been enabled on the computer. If you’re having ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access