I need to remove a member (specifically, a NoteProperty) from an object. How do I accomplish this?
If can depend on the type of object or collection you want to remove from. Commonly its a Collection (array) of objects like you might get from 'import-csv' which you can do it pretty easily.
$MyDataCollection = Import-CSV c:\datafiles\ADComputersData.csv
$MyDataCollection
Windows Server : lax2012sql01
IP : 10.101.77.69
Site : LAX
OS : 2012 R2
Notes : V
Windows Server : sfo2016iis01
IP : 10.102.203.99
Site : SFO
OS : 2012 R2
Notes : X
The to remove a property from each of these:
$MyDataCollection | ForEach { $_.PSObject.Properties.Remove('Notes') }
Windows Server : lax2012sql01
IP : 10.101.77.69
Site : LAX
OS : 2012 R2
Windows Server : sfo2016iis01
IP : 10.102.203.99
Site : SFO
OS : 2012 R2