{"id":703,"date":"2010-02-28T13:56:36","date_gmt":"2010-02-28T13:56:36","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=703"},"modified":"2012-08-22T21:10:58","modified_gmt":"2012-08-22T21:10:58","slug":"creating-groups-in-the-fim-portal-using-powershell","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/creating-groups-in-the-fim-portal-using-powershell","title":{"rendered":"Creating Groups in the FIM Portal using powershell"},"content":{"rendered":"<p>I&#8217;ve been having a bit of a play with the powershell interface to the FIM Portal. I wanted to pre-populate a demo environment with an interesting set of criteria-based Securoity and Distribution groups, but they get a bit tedious to create by hand, and I wanted to see if powershell was the answer.<\/p>\n<p>I&#8217;m pretty pleased with the results. Both of the following scripts use a CSV to bulk-create the groups. The links have now been updated to their new home on the Technet Wiki:<\/p>\n<p><a href=\"http:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/2109.how-to-use-powershell-to-create-criteria-based-security-groups-from-a-csv-file-en-us.aspx\">How to Use Powershell to Create Criteria-Based Security Groups from a CSV File<\/a><\/p>\n<p><a href=\"http:\/\/social.technet.microsoft.com\/wiki\/contents\/articles\/how-to-use-powershell-to-create-manager-based-distribution-lists-from-a-csv-file.aspx\">How to Use Powershell to Create Manager-Based Distribution Lists from a CSV File<\/a><\/p>\n<p><!--more--><\/p>\n<p>The scripts run pretty slowly, but it&#8217;s still quicker than creating the groups by hand.<\/p>\n<p>If you want to have a go at a script like this (and you can&#8217;t find an example in the ever-growing <a href=\"http:\/\/social.technet.microsoft.com\/wiki\/tags\/FIM+ScriptBox+Item\/default.aspx\">FIM Scriptbox<\/a>) then I suggest you create a sample object by hand and then inspect both the object&#8217;s Advanced Properites, and the Details of the Request object which created it, for\u00c2\u00a0an idea of which\u00c2\u00a0attribute to\u00c2\u00a0populate.<\/p>\n<p>While developing the scripts I saw the following error far more times that I would have liked:<\/p>\n<blockquote><p>Microsoft.ResourceManagement.WebServices.Client.PermissionDeniedException: Policy prohibits the request from completing.<\/p><\/blockquote>\n<p>After messing around with MPRs it eventually became clear that this just meant I had populated an attribute incorrently, or missed one out, and was not about permissions at all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been having a bit of a play with the powershell interface to the FIM Portal. I wanted to pre-populate a demo environment with an interesting set of criteria-based Securoity and Distribution groups, but they get a bit tedious to create by hand, and I wanted to see if powershell was the answer. I&#8217;m pretty&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[42,22,23],"tags":[],"class_list":["post-703","post","type-post","status-publish","format-standard","hentry","category-fim-2010","category-groups","category-powershell"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-bl","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=703"}],"version-history":[{"count":7,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/703\/revisions"}],"predecessor-version":[{"id":1006,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/703\/revisions\/1006"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}