itglue / automation

A place for IT Glue's user community to learn ways of automating their documentation.
Apache License 2.0
99 stars 33 forks source link

Active Directory - Not tagging assets #6

Open awataszko opened 6 years ago

awataszko commented 6 years ago

Hi,

Not sure if this is by design but its not using the actual configurations, its just putting the configuration ID. EDIT - Figured this part out, had the wrong field type. Had textbox instead of tags.

It is also creating a new flexible asset each time I run the script.

What am I doing wrong?

Thanks, Andrew

CalebAlbers commented 6 years ago

Hey @awataszko,

Pardon the late reply on this. Are you still experiencing an issue with a new flex asset being created with every rerun of the script? If so, does that happen to every client or only specific ones?

Right now the script can run one of two ways -- if a flex asset ID is specified in the configuration file, the script will always update the flex asset with the ID in the config file. If no ID is specified, the script attempts to auto-match the flex asset ID based on a "fuzzy" search. The script searches IT Glue for an existing flex asset with the same name and same client, and then will use that ID to update.

Would you be able to run the following code snippet, replacing $api__flexible_asset_type_id and $api__org_id with the values from your configuration file? You should get a response that has a list of Active Directory flexible assets for a specific client (defined by $api__org_id). That list is what the script uses to auto-match flexible asset ID. If multiple flex assets are returned, do they all have the same name and data? (Get-ITGlueFlexibleAssets -filter_flexible_asset_type_id $api__flexible_asset_type_id -filter_organization_id $api__org_id)


I might have some more troubleshooting steps that I think of, but that should serve as a starting place.

Thanks!

ghost commented 6 years ago

I found that if i run this script from another server not a DC, it will find the data, but will not tag the config items. I am looking to see if we can try and add another DC as i currently only have one DC and a few app servers, one of which i built to test the IT Glue powershell items on. but if this runs only on the DC it needs to be noted somewhere.

FYI - it has the AD tools for remote management installed, and finds all the data, if I run it from the DC and then from the APP server, it removes all the config tags out of the system

ggill27 commented 5 years ago

Hi, I know this is a wrong place. I'm need a powershell script to reset domain account password and update in IT glue. If you could point me in the right direction that would be great. I already have a script that reset the domain account. I have got the api key. Just need a some guidance to update the password

Thanks