Skip to content

SCCM 2012r2. Compliance Settings. Check groups

Featured Replies

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?

Have you tested this script outside of CM? does this script work? Have you tested it as CM would execute using the local system account on the local PC?

  • Author

Have you tested this script outside of CM? does this script work? Have you tested it as CM would execute using the local system account on the local PC?

yes, its work

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.

  • Author

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?

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

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.