Configure Tag History Storage Provider via Script

I want to write a script to go through and update the storage provide for all tags within a specified folder with history enabled to a different storage provider.

Would this even be available via system.tag.configure()? I don't see any specifics about reading/writing any of the properties within the history settings of a tag. Might need to use a string parameter and bind it to the storage provider to do it "indirectly" via changing the parameter? Thinking the parameter route would be easiest (at least with UDTs), so I started down that route.

Looks like configuring the default in the UDT definition isn't going to work though.

Solution I ended up here is kind of weird, but works.

  1. There's an expression string tag at the provider level that has the Storage Provider selected and derives its value from that setting. {[~]Storage_Provider.HistoryProvider}
  2. UDTs with a member that have history now have a parameter and a string member for the Storage Provider.
  3. Bind the UDT members to the provider-level tag
  4. Use a tag change script on the UDT member to write the parameter value