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 ...
Get Learn PowerShell Toolmaking in a Month of Lunches now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.