paulwetter / DocumentConfigMgrCB

This script attempts to document your entire Configuration Manager (MEMCM/SCCM) environment
https://wetterssource.com/documentconfigmgrcb
174 stars 45 forks source link

Type site returned by Get-CMSite is not correct #70

Open PAcoH2 opened 3 years ago

PAcoH2 commented 3 years ago

https://docs.microsoft.com/en-us/mem/configmgr/develop/reference/core/servers/configure/sms_site-server-wmi-class?redirectedfrom=MSDN

Type 3 not exists in SMS_Site Server WMI Class: Value | Site type 1 | SECONDARY 2 | PRIMARY 4 | CAS

Line 2268. In CAS environment the summary report show:

Site Name Site Code Release Version Version Build
System.Object[] System.Object[] xxxx System.Object[] System.Object[]

PS xxx:> Get-CMSite | Select SiteName,Type

SiteName Type Central Site - 4 Secondary Site - 1 Secondary Site - 1 Secondary Site - 1 Secondary Site - 1 Secondary Site - 1 Secondary Site - 1 Secondary Site - 1 Primary Site - 2 Primary Site - 2 Primary Site - 2

ChadSimmons commented 3 years ago

@PAcoH2 thanks for the report. Issue #44 is all about reporting in an environment with a CAS. Since this scenario is somewhat rare these days it's harder to develop for and test against. I've put hours into it and have a little bit to show for the progress at this gist. Run it and see if you have any better results. I know that code is not complete and will cause issues with duplicating objects, but it is a start. Hopefully you will have time to invest in improving the code for the CAS scenario.