This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Swis Verb for DHCP

I need to update several hundred Citrix Hosts to check the DHCP box under host properties. I can't find a Swis verb that will let me update the "DynamicIP" field in the Orion.Nodes table. I was looking at Set-SwisObject but it appears that is only for Custom Properties. Please point me in the right direction.

  • Hello, updating the properties within Orion.Nodes can be done easily via update operation as you do that... you just need to know the node uri, property name and value. In case you're switching the DynamicIP property to true, you must also set, or have set the DNS so it can't happen, that you have dynamicIP node without DNS...

    example:

    $swis = connect-swis -host "localhost" -UserName "admin" -Password "123"

    $Uri  = Get-SwisData $swis "SELECT uri from Orion.Nodes where IPAddress='1.2.3.4'"

    $Uri | Set-SwisObject $swis -Properties @{DynamicIP=$true; DNS='supernode'}

    if you can't make it working, can you paste here your code snippet?

    Regards,

    Honza

  • Thank you. I had attempted to use Set-SwisObject before but I must have had the syntax incorrect.

    This syntax worked for me. (I already have DNS defined so I omitted that parameter from your example)

    Set-SwisObject $swis $uri -Properties @{DynamicIP=$True}