Forefront
This topic has not yet been rated - Rate this topic

Windows PowerShellTools for FIM 2010

Updated: February 11, 2010

Applies To: Forefront Identity Manager 2010

The following topics cover the Windows PowerShell™ for Microsoft® Forefront® Identity Manager (FIM) 2010 cmdlets and examples.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Enums for ImportObject.State and ImportChange.Operation

Powershell does a pretty good job using Enums, and there are two cases for them in the FIM cmdlets:

[Enum]::GetValues('Microsoft.ResourceManagement.Automation.ObjectModel.ImportOperation') 
[Enum]::GetNames('Microsoft.ResourceManagement.Automation.ObjectModel.ImportState')


Many of the FIM PowerShell samples here in TechNet could be more readable if they took advantage of this. For example, instead of passing the number for the Object State, or Change.Operation, you can specify the string, or the value directly from the enum. In the case of 'Add':

[Microsoft.ResourceManagement.Automation.ObjectModel.ImportOperation]::Add

or just

'Add'