Bulk set asset custom field

I have created a new check box custom asset field. How do I set the initial value to true (yes) for all assets?

1 Like

Easiest would be to script it.

Import-Module $env:SyncroModule
Set-Asset-Field -Name "Custom Field" -Value true

But all the assets would have to be on. No way to be sure it’s set once and done.

It may be easier to just change the field and assume the starting value is false.

Yes, unfortunately they have to be on. I really wish Syncro had the concept of “offline” or “system” scripts that can manipulate fields like this without needing to go through PS. I did stuff like this for when we switched from CWA. If CWA folder found, it switch it to true, then filtered on true to find the ones that still had CWA on it.

This is really not a function of scripting. Scripting is just a second-rate way to handle it because we don’t yet have bulk editing of custom fields today. It’s something we’d like to add, but it likely wouldn’t happen anytime soon. This is really a CRM-style functionality of mass manipulating basic data fields.

2 Likes

Do it with a script and then do a saved asset search for all the ones without the value set, you can do the few that aren’t online regularly by manually editing the asset. It sucks but only option currently.