April 15th, 2015

PowerTip: Remove Type Data with PowerShell

Doctor Scripto
Scripter

Summary: Learn how to remove type data by using Windows PowerShell.

Hey, Scripting Guy! Question How can I remove a custom type data that is producing an error message when I try to update it
           in my Windows PowerShell session?

Hey, Scripting Guy! Answer Use the Get-TypeData cmdlet to retrieve an instance of the type data, and pipe it to the 
           Remove-TypeData cmdlet, for example:

"Microsoft.Management.Infrastructure.CimInstance#root/cimv2/Win32_Volume" |
Get-TypeData | Remove-TypeData

Note  This is a long single-line command that is broken at the pipeline character for readability.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.