This project has moved. For the latest updates, please go here.



The Remove-Resource cmdlet deletes an object or objects from the FIM Service. The ResourceObjects parameter can be used to pass in an array of resource objects to delete, which will be performed as a single composite request. Note, that if using the pipeline to perform the operation, PowerShell will pass the objects to the cmdlet one at a time, and a composite operation will not be performed.


Remove-Resource -ID <object> 

Remove-Resource -ResourceObjects <PSObject> 



The ID of the object to delete


One or more ResourceObjects returned from Get-Resource or Search-Resources to delete


# Delete a resource by its object ID
Remove-Resource -ID 4107f14e-e73d-479c-87bd-5293d314a260

# Get a Person using its AccountName attribute, and delete it
Remove-Resource | Get-Resource -ObjectType Person -AttributeName AccountName -AttributeValue testuser

# Delete all email templates one at a time
Remove-Resource | Search-Resource -Xpath "/EmailTemplate"

# Delete all email templates as a composite operation
$resources = Search-Resource -Xpath "/EmailTemplate"
Remove-Resource $resources

Last edited Apr 19, 2016 at 10:50 PM by ryannewington, version 3