Hi @madhavi gunasekar ,
I suppose you are talking about the script Kevin Holman referenced in his blog:
How to create a SCOM group from an Active Directory Computer Group
https://kevinholman.com/2017/08/26/how-to-create-a-scom-group-from-an-active-directory-computer-group/
Both of the properties you have mentioned are comming from the discovery module:
# Load SCOM Discovery module
$DiscoveryData = $momapi.CreateDiscoveryData(0, $SourceId, $ManagedEntityId)
exactly because of this, if you want to test the script you need to provide zeroed values for those:
# Manual Testing section - put stuff here for manually testing script - typically parameters:
#=================================================================================
# $SourceId = '{00000000-0000-0000-0000-000000000000}'
# $ManagedEntityId = '{00000000-0000-0000-0000-000000000000}'
# $ADGroup = "SCOM Computers Group"
# $LDAPSearchPath = "LDAP://DC=opsmgr,DC=net"
#=================================================================================
Please examine the script and the comments of Kevin Holman and try to run it. Let us know how it looks like.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards,
Stoyan