KITS KMS
  1. KITS KMS
  2. KITSKMS-607

Convert domains.conf data file to CSV files for ingestion into ADS via Windows PowerShell

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.11 Sprint
    • Fix Version/s: None
    • Component/s: Other/Unknown
    • Labels:
      None
    • Environment:
      Scripting language of choise on OS of choice. Ingestion will happen on Windows 7 machine with PowerShell and AD modules installed and running.

      Description

      TASK 1: Translate domains.conf file to audiences.csv
      For every <domain>%domainID</domain>, create a record in CSV file with this format:

      Name IU-UITS-KMS-AUDIENCE-%domainID

      GroupScope Universal

      Description This group defines members who can view KB documents in the %domainID domain (audience).

      DisplayName IU-UITS-KMS-AUDIENCE-%domainID

      GroupCategory Security

      ManagedBy kmsldap

      Path "OU=Audiences,OU=KMS Application Groups,OU=OSKM,OU=LSP,OU=BL-UITS,OU=BL,DC=ads,DC=iu,DC=edu"

      Server ads.iu.edu

      So the output file should look like this, given the first two domains in domains.conf as examples:

      Name,GroupScope,Description,DisplayName,GroupCategory,ManagedBy,Path,Server
      IU-UITS-KMS-AUDIENCE-KBSTAFF,Universal,This group defines members who can view KB documents in the KBSTAFF domain (audience).,IU-UITS-KMS-AUDIENCE-KBSTAFF,Security,kmsldap,"OU=Audiences,OU=KMS Application Groups,OU=OSKM,OU=LSP,OU=BL-UITS,OU=BL,DC=ads,DC=iu,DC=edu,ads.iu.edu"
      IU-UITS-KMS-AUDIENCE-SC,Universal,This group defines members who can view KB documents in the SC domain (audience).,IU-UITS-KMS-AUDIENCE-SC,Security,kmsldap,"OU=Audiences,OU=KMS Application Groups,OU=OSKM,OU=LSP,OU=BL-UITS,OU=BL,DC=ads,DC=iu,DC=edu,ads.iu.edu"

      NOTE: Path needs quotes, since it contains commas. Or, you could use another delimiter. I will be using this with a Widnows PowerShell command line tool, so '|' might not be a good delimiter.

      TASK 2: Create member lists for each audience in a separate file for each domain
      For every <domain>%domainID<doamin>, create a single list of members for each <query> value in a %domainID.csv file (NOTE: OMIT the 'cn=' and ignore all <includeSources>value</includeSources>)

      EXAMPLE for kbstaff.csv
      IU-UITS-KMS-dev,IU-UITS-OSE-KB-internal-access,IU-UITS-OSE-KB-internal-access

        Issue Links

          Activity

          Hide
          Matt Kane (Inactive) added a comment -

          this task is progressing well and should be done earlier than expected

          Show
          Matt Kane (Inactive) added a comment - this task is progressing well and should be done earlier than expected
          Hide
          Chuck Aikman added a comment -

          Good to know. We will test from the remote Windows 7 host bl-uits-caik755.ads.iu.edu. That host will need Windows PowerShell and AD module installed and running. We can talk about that on Friday. I will have some similar text file translations needed too. Hopefully the work for this task can be leveraged.

          Show
          Chuck Aikman added a comment - Good to know. We will test from the remote Windows 7 host bl-uits-caik755.ads.iu.edu. That host will need Windows PowerShell and AD module installed and running. We can talk about that on Friday. I will have some similar text file translations needed too. Hopefully the work for this task can be leveraged.
          Hide
          Chuck Aikman added a comment -

          Correction - in my quest to download PowerShell, I found it is already available on Windows 7.

          See these two resources:
          http://blogs.technet.com/b/josebda/archive/2009/11/25/download-for-powershell-v2-for-windows-7-no-need-it-s-already-there.aspx
          http://msdn.microsoft.com/en-us/library/windows/desktop/ms714418(v=vs.85).aspx

          We'll be using PowerShell Cmdlets to create AD groups and to modify members. I've already identified the specific ones we need and some script/syntax to pull data from the CSV files you're creating.

          Show
          Chuck Aikman added a comment - Correction - in my quest to download PowerShell, I found it is already available on Windows 7. See these two resources: http://blogs.technet.com/b/josebda/archive/2009/11/25/download-for-powershell-v2-for-windows-7-no-need-it-s-already-there.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms714418(v=vs.85).aspx We'll be using PowerShell Cmdlets to create AD groups and to modify members. I've already identified the specific ones we need and some script/syntax to pull data from the CSV files you're creating.
          Hide
          Chuck Aikman added a comment -

          I got the files from Matt. At first glance, they look like exactly what I specified. I will verify by testing and then close the ticket.

          Show
          Chuck Aikman added a comment - I got the files from Matt. At first glance, they look like exactly what I specified. I will verify by testing and then close the ticket.
          Hide
          Chuck Aikman added a comment -

          Successfully imported audiences.csv using PowerShell cmdlet 'New-ADGroup' and verified it created the 8 of the groups specified in the proper container in AD, with all of the configured properties. SUCCESS!

          Note: 4 of the groups failed to create and generated errors because groups with the same name exist in parent container. I expected this.

          FYI - command used was (CSV file location relative to my desktop):

          Import-CSV z:\Projects\KMS\Implementation\audiences.csv | %

          {New-ADGroup -Name $_.Name -GroupScope $_.GroupScope -Description $_.Description -DisplayName $_.DisplayName -GroupCategory $_.GroupCategory -ManagedBy $_.ManagedBy -Path $_.Path -Server $_.Server}
          Show
          Chuck Aikman added a comment - Successfully imported audiences.csv using PowerShell cmdlet 'New-ADGroup' and verified it created the 8 of the groups specified in the proper container in AD, with all of the configured properties. SUCCESS! Note: 4 of the groups failed to create and generated errors because groups with the same name exist in parent container. I expected this. FYI - command used was (CSV file location relative to my desktop): Import-CSV z:\Projects\KMS\Implementation\audiences.csv | % {New-ADGroup -Name $_.Name -GroupScope $_.GroupScope -Description $_.Description -DisplayName $_.DisplayName -GroupCategory $_.GroupCategory -ManagedBy $_.ManagedBy -Path $_.Path -Server $_.Server}

            People

            • Assignee:
              Matt Kane (Inactive)
              Reporter:
              Chuck Aikman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Structure Helper Panel