FIM ScriptBox Item

Summary

This one-liner shows how to use an Xpath filter to export Request objects since a given DateTime.
the [DateTime].AddHours() method is used with a negative number in this example.  The AddDays(), AddMinutes() and other methods could easily be swapped in here.

Script Code

001
Export-FIMConfig -only -Custom ("/Request[CreatedTime >= '{0}']" -F [DateTime]::UtcNow.AddHours(-12).ToString("yyyy-MM-ddTHH:mm:ss.fff"))

 

note Note
To provide feedback about this script, create a post on the FIM TechNet Forum.
For more FIM related Windows PowerShell scripts, see the FIM ScriptBox.

 



See Also