Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in function Get-PWCMCoMgmtAdminCenterDeviceUploadStatus #103

Open
NorbertBauer opened this issue Feb 23, 2023 · 10 comments
Open

Error in function Get-PWCMCoMgmtAdminCenterDeviceUploadStatus #103

NorbertBauer opened this issue Feb 23, 2023 · 10 comments

Comments

@NorbertBauer
Copy link

I always get an error from the command in line 2972:

Invoke-CimMethod : The WS-Management service cannot process the request because it contains an invalid character.
WS-Management cannot convert the string to a number. String: true. Ensure that the string represents the correct
datatype.
At D:\Tools\DocumentConfigMgrCB-master\DocumentCMCB.ps1:2972 char:34

  • ... onMapping = Invoke-CimMethod -Namespace "ROOT\SMS\site_$SiteCode" -Ci ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ProtocolError: (ROOT\SMS\site_xxx:SMS_CoMgmtConfigs:String) [Invoke-CimMethod], CimExcep
      tion
    • FullyQualifiedErrorId : HRESULT 0x80338041,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand
    • PSComputerName : SiteServer.domain.yyy
@ChadSimmons
Copy link
Contributor

@NorbertBauer, is your SiteCode a number like 001? If so, try quoting it in the command line parameter to force it to be typed as a string.

@NorbertBauer
Copy link
Author

No, the SiteCode is like "AB1"

@paulwetter
Copy link
Owner

It looks like you can get that same error if you do not have the AAD Tenant ID defined in CM. So, perhaps something missing in the co-management configuration in your site? Hard to say. I don't have access to a fully configured CM environment anymore. Job has changed and I don't spend much time with it anymore, so it's all a bit fuzzy.

@NorbertBauer
Copy link
Author

NorbertBauer commented Feb 25, 2023 via email

@NorbertBauer
Copy link
Author

NorbertBauer commented Feb 25, 2023 via email

@paulwetter
Copy link
Owner

Possible it's changed. What build of CM you getting the errors in?

@NorbertBauer
Copy link
Author

NorbertBauer commented Feb 25, 2023 via email

@paulwetter
Copy link
Owner

On the co-management configuration, could you provide the details here. It is failing in collecting that page details. It seems it throws that error if wmi query has an incorrect tenant ID. Can you confirm that matches what was configured? Maybe there are other issues too.. But, that is what i'm seeing.
image

@NorbertBauer
Copy link
Author

on this page, all settings are enabled and all devices are uploaded.
Also the TenantID, that the Script reads from WMI ist the same, as shown in the console.
And with each WMI query within this function, I do only get one Item, so there should be no issue with that.

@NorbertBauer
Copy link
Author

Ahhh... We do not specify "Upload specific collection" and therefore, this WMI Method will not find a Collection. Maybe the error is "by design" in that case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants