can someone point out how to convert a string in form of "2010/31/12" in the required integer format to be able to set accountExpires attribute in Active Directory?
Thanks in advance
Henry
The AD accountExpire attribute is a FileTime structure (8 byte) and a not easily converted to and from without the right tools and the limited sync rule functions are not the right tools to use...
This would have been a perfect candidate (together with it's sister FromFileTime) for a custom sync rule function but since there isn't anything like that (yet) we have to fall back on workflow. If you read this and think custom sync rule functions could be nice to have, head on to Connect and give this feature request a vote!
//Henrik
But isn't it much simpler to go one step back and use the MIIS / ILM - style attribute export flow?
(At least until such commonly usedfeatures are not usable in the portal out of the box)
Henry
//Henrik
everything is perfect. I am very happy with your answer.
Henry
Here is a screen
shot of setting the Account Expires Attribute in AD when the EmployeeEndDate
Attribute is set in the FIM Portal. This is done via the FIM WAL using the
Powershell Workflow
Script
Param($User,$Date)
Import-Module ActiveDirectory
Set-ADUser -Identity $User -AccountExpirationDate
([datetime][string]($Date))
return "Success"
- Edited by Anthony Marsiglia (FIM Devil)Microsoft employee Monday, February 25, 2013 1:18 PM
Here is a screen
shot of setting the Account Expires Attribute in AD when the EmployeeEndDate
Attribute is set in the FIM Portal. This is done via the FIM WAL using the
Powershell Workflow
Script
Param($User,$Date)
Import-Module ActiveDirectory
Set-ADUser -Identity $User -AccountExpirationDate
([datetime][string]($Date))
return "Success"
- Edited by Anthony Marsiglia (FIM Devil)Microsoft employee Monday, February 25, 2013 1:18 PM
What is the FIM WAL?Here is a screen
shot of setting the Account Expires Attribute in AD when the EmployeeEndDate
Attribute is set in the FIM Portal. This is done via the FIM WAL using the
Powershell Workflow
Script
Param($User,$Date)
Import-Module ActiveDirectory
Set-ADUser -Identity $User -AccountExpirationDate
([datetime][string]($Date))return "Success"
this could be done by using a custom workflow activity which is what the FIM WAL is, the FIM WAL is a Custom Workflow Activity that was built and initially deployed by Microsoft Consulting Services "MCS"
There are a number of PowerShell Workflow Activities that have been posted online which could be used to perform this same task. Although the Account Expires activity could be performed completely codeless as far as a rules extension but I would highly recommend using the Rules Extension as it is more efficient, consistent.
an example of the rules extension can be found at my Blog The Connector Space