---
title: "Comment by Isaac Oni on \"Get overall status of your clients in AD, AAD, Intune and SCCM services\" | Hashnode"
description: "At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:122 char:39 [ValidateNotNullOrEmpty()] ~ Parameter declarations are a comma-separated list of variable names"
url: "https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3"
---

[Discussion](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d)

Comment [Get overall status of your clients in AD, AAD, Intune and SCCM services](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d)

[Isaac Oni](https://hashnode.com/@Isaaconi)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3)

At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:122 char:39

-   \[ValidateNotNullOrEmpty()\]
-   ~ Parameter declarations are a comma-separated list of variable names with optional initializer expressions. At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:122 char:39
-   \[ValidateNotNullOrEmpty()\]
-   ~ Missing ')' in function parameter list. At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:330 char:39
-   \[ValidateNotNullOrEmpty()\]
-   ~ Parameter declarations are a comma-separated list of variable names with optional initializer expressions. At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:330 char:39
-   \[ValidateNotNullOrEmpty()\]
-   ~ Missing ')' in function parameter list.
    -   CategoryInfo : ParserError: (:) \[\], ParseException
    -   FullyQualifiedErrorId : InvalidFunctionParameter

I get the above errors when I tried to dot source the script. Can you help please

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7ef93afd2f07b226303d1)

Have you searched for FIXME string and replace them with correct values? It seems to me that you have not according the error message

[Isaac Oni](https://hashnode.com/@Isaaconi)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7f35f16cfbf7c0f2b40bc)

Thank you for the swift reply. I did replace the tenant name and server name. Do I have to name them with the $ in front of the name or not? [Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7f52616cfbf7c0f2b4157)

[Isaac Oni](https://hashnode.com/@Isaaconi) use [gist.github.com](https://gist.github.com/) or similar service to share problematic part of the code with me. It will help me to understand the problem better.

You can use some dummy values instead of real one, but dont change the syntax/logic.

[Isaac Oni](https://hashnode.com/@Isaaconi)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7f61716cfbf7c0f2b4183)

I realised my mistake and was able to dot source successfully. Now when I try to query client data, I get error below New-GraphAPIAuthHeader command isn't available At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:67 char:13

-   throw "New-GraphAPIAuthHeader command isn't available"
-   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\~~~~
    -   CategoryInfo : OperationStopped: (New-GraphAPIAut...isn't available:String) \[\], RuntimeException
    -   FullyQualifiedErrorId : New-GraphAPIAuthHeader command isn't available [Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7f8c716cfbf7c0f2b41e7)

[Isaac Oni](https://hashnode.com/@Isaaconi) please try this version instead [gist.github.com/ztrhgf/90bbeeb1dee4916f287bad806d…](https://gist.github.com/ztrhgf/90bbeeb1dee4916f287bad806d8fa13b) (don't forget to again replace the FIXMEs)

[Isaac Oni](https://hashnode.com/@Isaaconi)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7fb44afd2f07b226305bd)

Thank you, I now get the error below

PS C:\\Users\\isaaco> Get-MDMClientData -computer nj-60-ntb -graphCredential $Cred | Format-List \* Credentials for creating Graph API authentication header is missing At C:\\Users\\isaaco\\Documents\\Get-MDMClientData.ps1:98 char:29

-   ... edential) { throw "Credentials for creating Graph API authentication ...
-   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -   CategoryInfo : OperationStopped: (Credentials for...ader is missing:String) \[\], RuntimeException
    -   FullyQualifiedErrorId : Credentials for creating Graph API authentication header is missing

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Ondrej Sebela](https://hashnode.com/@AndrewZtrhgf)

[Jan 18, 2023](https://hashnode.com/posts/get-overall-status-of-your-clients-in-ad-aad-intune-and-sccm-services/6166e4da18374f2573277a3d/comment/63c7ebe716cfbf7c0f2b3fd3#reply-63c7fe96afd2f07b2263060d)

[Isaac Oni](https://hashnode.com/@Isaaconi) I suppose you haven't provided the credentials in $cred variable then? Btw you should use device name from your environment instead of nj-60-ntb :)
