You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running your DHCP documenting script through this Azure secure setup, i've added the proper traits to the yaml whitelist document. ### Used for "DHCP - Autodoc" dhcp-server-name: string dhcp-server-settings: string dhcp-server-database-information: string dhcp-domain-authorisation: string dhcp-scopes: string dhcp-scope-information: string dhcp-statistics: string
The script runs successfully and adds the data to the flexible asset for the organization in IT Glue, the problem comes in when you run it again, it does not update the existing flexible asset it creates a new duplicate entry.
It comes down to this line $ExistingFlexAsset = (Get-ITGlueFlexibleAssets -filter_flexible_asset_type_id $filterID.ID -filter_organization_id $orgID).data | Where-Object { $_.attributes.traits.'DHCP-Server-Name' -eq "$env:computername" }
Running this alone, and replacing the variables with the real information, if run not through Azure it returns the proper value, if run through Azure it returns nothing.
Removing the Where-Object it returns the proper flexible asset.
Im not sure what is happening through this azure function app that is removing the ability for it to return the filtered result, especially when this exact same code works in the Active Directory documentation script run through Azure to update flexible assets.
The text was updated successfully, but these errors were encountered:
I'm running your DHCP documenting script through this Azure secure setup, i've added the proper traits to the yaml whitelist document.
### Used for "DHCP - Autodoc" dhcp-server-name: string dhcp-server-settings: string dhcp-server-database-information: string dhcp-domain-authorisation: string dhcp-scopes: string dhcp-scope-information: string dhcp-statistics: string
The script runs successfully and adds the data to the flexible asset for the organization in IT Glue, the problem comes in when you run it again, it does not update the existing flexible asset it creates a new duplicate entry.
It comes down to this line
$ExistingFlexAsset = (Get-ITGlueFlexibleAssets -filter_flexible_asset_type_id $filterID.ID -filter_organization_id $orgID).data | Where-Object { $_.attributes.traits.'DHCP-Server-Name' -eq "$env:computername" }
Running this alone, and replacing the variables with the real information, if run not through Azure it returns the proper value, if run through Azure it returns nothing.
Removing the Where-Object it returns the proper flexible asset.
Im not sure what is happening through this azure function app that is removing the ability for it to return the filtered result, especially when this exact same code works in the Active Directory documentation script run through Azure to update flexible assets.
The text was updated successfully, but these errors were encountered: