So what wrong with my script?

Sent from my iPhone

On May 26, 2016, at 4:32 PM, James Avery 
<ja...@jamescavery.com<mailto:ja...@jamescavery.com>> wrote:

Thank you Sherry!!!!!!

I’m going to take the scripts you gave me and try to get the other information 
from SCCM.

Do you know a good way to take Garth’s VBS script and port it to Powershell?

James

From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
[mailto:listsad...@lists.myitforum.com] On Behalf Of Sherry Kissinger
Sent: Thursday, May 26, 2016 10:52 AM
To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com>
Subject: Re: [mssms] SCCM PowerShell to pull report information

sample...

$listAdContainers = (get-cmdiscoveryMethod -name 
ActiveDirectorySystemDiscovery).proplists | where-Object {$_.PropertyListName 
-eq "AD Containers"}
($listAdContainers.values -like 'ldap*')

On Thu, May 26, 2016 at 10:14 AM, Sherry Kissinger 
<sherrylkissin...@gmail.com<mailto:sherrylkissin...@gmail.com>> wrote:
AD containers are in  (get-cmdiscoverymethod -name 
activedirectorysystemdiscovery).proplists
, not props.  I'm guessing because those types of properties could be a "list 
of" things.

On Thu, May 26, 2016 at 9:33 AM, James Avery 
<ja...@jamescavery.com<mailto:ja...@jamescavery.com>> wrote:

That makes sense and I can kinda parse out what should go where. There are a 
few things it's not showing. For example the Active Directory Containers.



Here's what I see when I run your script, in case anyone wants to see it.



PS QTC:\> (get-cmdiscoverymethod -name activedirectorysystemdiscovery).props

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Enable Incremental Sync
Value                 : 1
Value1                :
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Startup Schedule
Value                 : 0
Value1                : 000120000010A000
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Full Sync Schedule
Value                 : 0
Value1                : 0001170000100038
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : SETTINGS
Value                 : 0
Value1                : ACTIVE
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Run Count
Value                 : 5
Value1                :
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Enable Filtering Expired Logon
Value                 : 0
Value1                :
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Days Since Last Logon
Value                 : 90
Value1                :
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Enable Filtering Expired Password
Value                 : 0
Value1                :
Value2                :

SmsProviderObjectPath : SMS_EmbeddedProperty
ItemType              :
PropertyName          : Days Since Last Password Set

________________________________
From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> 
<listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com>> on 
behalf of Sherry Kissinger 
<sherrylkissin...@gmail.com<mailto:sherrylkissin...@gmail.com>>
Sent: Wednesday, May 25, 2016 7:08:15 PM
To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com>
Subject: Re: [mssms] SCCM PowerShell to pull report information

(get-cmdiscoverymethod -name ActiveDirectoryUserDiscovery).props
and/or
(get-cmdiscoverymethod -name ActiveDirectoryUserDiscovery).proplists

Does that make more sense for output ?


On Wed, May 25, 2016 at 3:21 PM, James Avery 
<ja...@jamescavery.com<mailto:ja...@jamescavery.com>> wrote:
I’m trying to get more information for reports other than what Garth and David 
O. wrote.



I'm trying to pull information for a report I'm building.
I was thinking of starting with
Get-CMDiscoveryMethod -Name "ActiveDirectoryForestDiscovery"
Get-CMDiscoveryMethod -Name "ActiveDirectoryGroupDiscovery"
Get-CMDiscoveryMethod -Name "ActiveDirectorySystemDiscovery"
Get-CMDiscoveryMethod -Name "ActiveDirectoryUserDiscovery"
Get-CMDiscoveryMethod -Name "HeartbeatDiscovery"
Get-CMDiscoveryMethod -Name "NetworkForestDiscovery"
However, I get something like this.
PS LAB:\> Get-CMDiscoveryMethod -Name "ActiveDirectoryUserDiscovery"


SmsProviderObjectPath : 
SMS_SCI_Component.FileType=2,ItemName="SMS_AD_USER_DISCOVERY_AGENT|SCCM-01.home.pvt",ItemType="
                        Component",SiteCode="LAB"
ComponentName         : SMS_AD_USER_DISCOVERY_AGENT
FileType              : 2
Flag                  : 6
ItemName              : SMS_AD_USER_DISCOVERY_AGENT|SCCM-01.home.pvt
ItemType              : Component
Name                  : SCCM-01.home.pvt
PropLists             : {AD Containers, AD Attributes, Start On Master Site 
Control File Changes}
Props                 : {Enable Incremental Sync, Startup Schedule, Full Sync 
Schedule, SETTINGS...}
SiteCode              : LAB
When I should have something like the following:
1. Showing enabled
2. Active Directory containers: LDAP://OU=Users,OU=LAB,DC=home,DC=pvt
3. Polling schedule
4. If Delta is enabled
You get the point. However, I'm unable to retrieve this type of information. 
Ideas?





--
Thank you,

Sherry Kissinger

My Parameters:  Standardize. Simplify. Automate
Blogs: http://www.mofmaster.com, http://mnscug.org/blogs/sherry-kissinger, 
http://www.smguru.org





--
Thank you,

Sherry Kissinger

My Parameters:  Standardize. Simplify. Automate
Blogs: http://www.mofmaster.com, http://mnscug.org/blogs/sherry-kissinger, 
http://www.smguru.org




--
Thank you,

Sherry Kissinger

My Parameters:  Standardize. Simplify. Automate
Blogs: http://www.mofmaster.com, http://mnscug.org/blogs/sherry-kissinger, 
http://www.smguru.org





Reply via email to