DocumentConfigMgrCB
DocumentConfigMgrCB copied to clipboard
Many of the Get-WMIObjects don't work
Invalid Namespace happens on the Get-WMIObjects because it tries to connect to the WMI class for the children sites (primary and secondaries) but uses the -Computername of the CAS. Those namespaces of course don't exist on the CAS so it should connect to each SMSProvider of each site server instead.
Unfortunately I have no experience in a CAS environment and don't have one in lab to make or test the script with. So, I really don't know what the changes would look like.
If anyone has a CAS that want to assist with tackling this, let me know. But not a high priority for me right now.
I have access to a CAS with 2 Primary sites for awhile. I'll work on the issues Russ mentioned. If there is anything else that should be checked let know.
@russrimm I'm getting pretty close to having the script ready for a 2nd set of eyes. The environment I'm using has a CAS running v1810 (for a few more weeks) with 2 Primaries, but no Secondaries. Do you still have access to an environment to test it against?
@ChadSimmons Hello, I've a test environment with a CAS and 2 Primaries. I would like to test your version.
@ChadSimmons Hello, I've a test environment with a CAS and 2 Primaries. I would like to test your version.
Great! I'll touch base with you later this week @CCWT.
@CCWT, get the test code from this GIST and try it out. I don't think I've gotten though every line of code yet, but the first 1000+ lines of code should be good. https://gist.github.com/ChadSimmons/a802b63b940a83a9674d618812f7124c
@ChadSimmons I've tested your new version. It detects now the childsites correct and the namespace errors are disappeared. But now the script throws errors because it try to add a key that is already there. (Function Get-PWCMDiscoveryMethod) error.log
@CCWT ... yes, I was seeing that too. I'll need some time to work though it. @paulwetter ... are you opposed to me moving some of the code to functions? That may be the best way to solve this issue.
I'm also getting a bit concerned about the number of changes required to make this work. Merging the changes back in may be problematic.
I haven’t looked to see what the changes look like but, I’d be fine with it as long as it doesn’t turn into double code. For instance get-pwcmdisoverymethodsPS for a primary site and then a slightly different get-pwcmdiscoverymethodsCAS to handle CAS differences. If that makes sense. And maybe it needs to be double code. I’m really blind to a CAS structure. Wish I had a lab with one to know it better.
Some of the newer stuff, that’s sort of what I have been trying to do is the data collection in a function and then the display as part of the main body. So, that sort of functioning, all for it.
@CCWT and @paulwetter ... I put in a bunch of time in Nov and Dec working though the challenges, but I don't have much tangible to show for it yet. I started with moving the DP details to a function but got bogged down. I'm not giving up, but it may be 2 months before my workload at work and home lighten up enough that I can make some meaningful progress.