Tuesday, December 3, 2013

Remove PowerShell Object

 

I was working with SharePoint and found an object that I needed to delete

image

NOTE that lega… is the friendly name.  Well not really.  On close examination appears that the name was corrupt.  The name was lega … with more info.

image

So using a where-object I gathered a couple of objects and saved as an array.

image

Then deleted the first object in the array using the name property.

image

HTH