Home Service Manager Portal Feature Requests
We appreciate you taking the time to vote and add your suggestions to make our products awesome! Your request will be submitted to the community for review and inclusion into the backlog.

We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.

For more information around feature requests in the Cireson Community click here.
Options

Team Request Mass Import

Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
Would like a feature that would allow the import of AD security groups into Team Requests. Currently we have 500 Team Groups and its very time consuming to manually add them. (Only got 100 added at the moment still have 400 to add)
Would also assist if there is a need to TRUNCATE CI$UserGroup from the Cireson as they will need to be added again.
2 votes

Submitted · Last Updated

Comments

  • Options
    merlenette_jonesmerlenette_jones Member Advanced IT Monkey ✭✭✭
    edited February 2017
    Hello Brian,

    You can actually do this with Powershell:

     

    Note: this one will throw a bunch of errors for those groups which are already created as team group objects.  You can ignore those.  This script can be run over and over as it is only goodness.

     

    $Groups = Get-ADGroup -Filter * -SearchBase 'OU=Employees,OU=Users,DC=Contoso,DC=Com' | Sort-Object Name
    
    
    foreach($Group in $Groups)
    
    {
        $GroupName = $Group.Name
        $GroupEMO = Get-SCSMObject -Class (Get-SCSMClass -Name Microsoft.AD.Group) -Filter "UserName -eq '$GroupName'"
    
        if($GroupEMO)
    
        {
    
            $GroupID = [guid]$GroupEMO.Id
            $props = @{'AdGroupId'=$GroupID;'GroupName'=$Group.Name;'DisplayName'=$Group.Name}
            New-SCSMObject -Class (Get-SCSMClass -Name Cireson.MyTeamViewGroup) -PropertyHashtable $props
    
        }
    }
     
    
    Write-Host "Team Groups: " (Get-SCSMObject -Class (Get-SCSMClass -Name Cireson.MyTeamViewGroup)).Count
    
    Write-Host "AD Groups: " $Groups.Count

    So you will want to change this section to match your environment. 

     $Groups = Get-ADGroup -Filter * -SearchBase 'OU=Employees,OU=Users,DC=Contoso,DC=Com' | Sort-Object Name 
  • Options
    Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Sweet I will give this a run in my lab. Thanks
  • Options
    Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Worked like a charm. Thanks
    For others reading this, run the Powershell from your SCSM primary management server.
    Added line to import SCSM module.
    Import-Module "[SCSM Install Path]\Powershell\System.Center.Service.Manager.psd1"
    My AD group were across 101 OU's but were created via script with specific descriptions so I used this to get the required groups.
    $Groups = Get-ADGroup -Filter 'description -eq "Access to Cireson Portal"' | Sort-Object Name
    Would recommend a KB on the support portal. :)
  • Options
    Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Interesting offset. 
    If running the command from Powershell to verify the membership 
    Get-SCSMObject -Class (Get-SCSMClass -Name Cireson.MyTeamViewGroup)
    Members added via the portal have displaynames of a GUID
    Members added via the script are the matching AD object names
  • Options
    merlenette_jonesmerlenette_jones Member Advanced IT Monkey ✭✭✭
    Hello Brian,

    Glad it's working for you. This is not a supported PowerShell script. It's more of a customization with scripting. 
Sign In or Register to comment.