Partager via


How to create a SCOM group from an Active Directory Computer Group

<!--[if lt IE 9]>

<![endif]-->

Comments

  • Anonymous
    August 28, 2017
    Great work on this Kevin. It should have ben default, just as OU if you ask me.Looking at the script now, will it work with nested groups? I want to create scom groups based on some maintenance groups defined in AD, but these are nested, and will need to search for computers recursively. Dosent look to me as this will work with the current scriptBestMartin Ehrnst
    • Anonymous
      August 28, 2017
      The comment has been removed
      • Anonymous
        August 29, 2017
        Hi Kevin, id did not mean a class property, but the ability to create group based on AD computer groups (as you did here)On to my question.I took a brief look at your script as i need to create SCOM groups based on AD groups that represent our patch windows (don't ask why).Our AD groups are nested and only contains other computer groups. As far as I can see, you script does not work in this case, I can try to see if i'm able to create something with your script as base source ( i dont want to rely on the AD PS modules and such)Martin
  • Anonymous
    April 27, 2018
    (The content was deleted per user request)
  • Anonymous
    April 27, 2018
    This is an excellent blog, Kevin! I have used Visual Studio and created an MP and it is working fine! As we are with SCOM 2016, we can schedule Maintenance Mode for AD groups as our patching is based on AD group names. Question - We have around 20 plus AD groups specific for environments like Dev, Stage and Prd and for various time window. Can we use same MP to discover multiple AD groups and to create SCOM group names based on it? If yes, can you point me the direction to achieve it.
    • Anonymous
      May 02, 2018
      This is to update that I have edited an MP to discover multiple AD groups. All you need to do is to rewrite five HTML tags with the appropriate name in it. But, one challenge is that script code will be also pasted multiple times while adding the AD group. So, our XML will be lengthy in lines. If anyone have other option, that will be great.
      • Anonymous
        May 02, 2018
        This is one of the downsides to using fragments - you do not get the benefit of shared data sources as easily. To reduce your AD based Group MP's XML size and duplication of the script - you'd need to use a shared datasource sealed in a library MP, then have each discovery reference this shared script datasource, and pass the important variables that change, like AD group name, etc.
        • Anonymous
          May 02, 2018
          Thanks for your reply, Kevin! I will try to create a Library MP and implement as you mentioned. As I am not good with Authoring, will read more blogs and create. Thanks again!
  • Anonymous
    May 22, 2018
    The comment has been removed
    • Anonymous
      August 20, 2018
      The comment has been removed
      • Anonymous
        August 20, 2018
        (The content was deleted per user request)
      • Anonymous
        August 24, 2018
        I found out the cause of the error by looking at the PS code in the fragment. None of the machines in the AD group is managed by the SCOM management server (under the health check). And that caused the error. I picked a different group, and the fragment worked without error. Ed