Jump to content


  • 0
lep86

SCCM 2012r2. Compliance Settings. Check groups

Question

Good day! I try to get domain groups my PC. I use that script

$Compliance = 'Compliant'
Get-ADComputer -Identity $env:COMPUTERNAME -Properties MemberOf | select -expand MemberOf | foreach {if ($_ -like '*All Coputers*') {$Compliance = 'Non-Compliant'}}
$Compliance

But the result always teaches compliant regardless of which group the computer is located. What i'm doing wrong?

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

This will not work, unless you have the RSAT Tools installed on all of your Clients and activated the AD tools.

Anyways, it's completely unnecessary. You already have the Information in your SCCM Database, if AD and AD Group Discovery is activated.

Share this post


Link to post
Share on other sites

  • 0

This will not work, unless you have the RSAT Tools installed on all of your Clients and activated the AD tools.

Anyways, it's completely unnecessary. You already have the Information in your SCCM Database, if AD and AD Group Discovery is activated.

How i can get?

Share this post


Link to post
Share on other sites

  • 0

How i can get?

This SQL query will get you started.

Select 
	RV.Netbios_name0,
	SSGN.System_Group_Name0
from 
	dbo.v_R_system_valid RV
	join dbo.v_RA_System_System_Group_Name SSGN on RV.ResourceId = SSGN.resourceID
Where
	RV.Netbios_name0 = 'CAOTTANT-GJL'
Order by
	RV.Netbios_name0

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.