none
Powershell SCCM - Set-CMBoundaryGroup -AddSiteSystemServer cannot convert hastable to ConfigurationManagement.ManagementProvider.IResultObject

    Question

  • Hi, 

    I've used many of the following several times in the past but it will no longer work.  What am I doing wrong?

    Set-CMBoundaryGroup -ID $BoundaryGroupID -AddSiteSytemServer @{"SiteServer.FQDN"="Fastlink"}
    OR
    Set-CMBoundaryGroup -Name $BoundaryGroupName -AddSiteSytemServer @{"SiteServer.FQDN"="Fastlink"}
    OR
    $SiteServer = @{"SiteServer.FQDN"="Fastlink"}
    $BoundaryGroupName | Set-CMBoundaryGroup -AddSiteSystemServer $SiteServer
    OR
    Get-CMBoundaryGroup -ID $BoundaryGroupID | Set-CMBoundaryGroup -AddSiteSystemServer $SiteServer
    OR
    ...
    ... Several permutations attempted ...
    ...


    I am now getting the following error:

    Set-CMBoundaryGroup : Cannot bind parameter 'AddSiteSystemServer'. Cannot convert the "System.Collections.Hashtable" value of type "System.Collections.Hashtable" to type "Microsoft.ConfigurationManagement.ManagementProvider.IResultObject".

    Only thing I'd say has changed since last time this worked is the CB version: went from 1702 to 1710.  Powershell version is 4.0 and that has not changed since the above cmdlets worked.

    Additional info that *may* help, I noticed that if you don't provide the data in a Hastable format and simply provide the site server name (which is not correct but for the purposes of this post please bear with me), such as:

    Set-CMBoundaryGroup -Name $BoundaryGroupName -AddSiteSystemServer "SiteServer.FQDN"

    The error is:

    Set-CMBoundaryGroup : Cannot bind parameter 'AddSiteSystemServer'. Cannot convert the "SiteServer.FQDN" value of type "System.String" to type "Microsoft.ConfigurationManagement.ManagementProvider.IResultObject".

    When the cmdlet used to work and I (again this is wrong) typed the expression as mentioned above, the error was:

    Set-CMBoundaryGroup : Cannot bind parameter 'AddSiteSystemServer'. Cannot convert the "SiteServer.FQDN" value of type "System.String" to type "System.Collections.Hashtable"

    Hence, in consistence with Microsoft Docs regarding the Set-CMBoundaryGroup cmdlet, the AddSiteSystemServer parameter must be of type Microsoft.ConfigurationManagement.ManagementProvider.IResultObject but that has changed from before when Powershell was expecting a value of type System.Collections.Hastable.

    So, I am NOT crazy... :)

    Anyone can shed some light?

    Thank you,
    Karim

    References:
    - https://docs.microsoft.com/en-us/powershell/module/configurationmanager/set-cmboundarygroup?view=sccm-ps
    - https://www.anoopcnair.com/sccm-configmgr-cb-recover-boundaries-boundary-groups-details/

    Tuesday, July 3, 2018 5:58 AM

Answers

All replies

  • Hi,

    It probably has to do with the fact that configuring boundaries with Slow or Fast Distribution Points have been removed from the Current Branch, see the section "Configurations for Fast or Slow are removed":

    https://docs.microsoft.com/en-us/sccm/core/servers/deploy/configure/boundary-groups

    You can run the following as an alternative:

    Set-CMBoundaryGroup -ID $BoundaryGroupID -AddSiteSystemServerName "SiteServer.FQDN"

    • Marked as answer by Karim Slaoui Wednesday, July 4, 2018 12:57 AM
    Tuesday, July 3, 2018 12:16 PM
  • Lievens,

    Thank you for your input.

    That did it yes.

    A bit of a sidenote if I may: Yes the links have been removed from CB since 1610 and it is noted in the Cmdlet's documentation in https://docs.microsoft.com/en-us/powershell/module/configurationmanager/set-cmboundarygroup?view=sccm-ps

    I also had tried the command you suggested and that gave me 2 different errors:

    1. The first error said "cannot convert ... ... value of type String to type Hastable"

    2. The second error said "cannot convert ... ... value of type String to type IResultObject"

    I think what happened between the 2 times I've used the cmdlet is a CB version change going from 1702 to 1710.  To make things "easier" (cough cough), instead of using -AddSiteSystemServer and a hashtable value where you have to specify the link when this has been deprecated, you now have to use -AddSiteSystemServerName parameter (which takes a String value type)

    Thanks again Lievens.

    Karim


    Wednesday, July 4, 2018 12:57 AM
  • Hi,

    It probably has to do with the fact that configuring boundaries with Slow or Fast Distribution Points have been removed from the Current Branch, see the section "Configurations for Fast or Slow are removed":

    https://docs.microsoft.com/en-us/sccm/core/servers/deploy/configure/boundary-groups

    You can run the following as an alternative:

    Set-CMBoundaryGroup -ID $BoundaryGroupID -AddSiteSystemServerName "SiteServer.FQDN"

    -AddSiteSystemServerName  

    This is not even a parameter in SCCM 1602

    Friday, September 28, 2018 10:13 AM