This isn’t causing me a real problem, I just noticed it while doing some testing. If I attempt to write to a custom asset field that doesn’t exist, the result of set-asset-field is reported as a success. For example, if I do this:
is a memory pointer to the hash table previously defined.
Powershell doesn’t ever provide the actual memory location, and instead displays “System.Collections.HashTable” to the set-asset-field command.
$data = @{ }
is the syntax to create a hashtable of N key value pairs.
The value of each key could also be further data hashtables.
Therefore if you only refer to $data, you are refering to the entire hashtable, not any single key value pair.
I’m less concerned about actually being able to store this type of data than I am with the function claiming success when it fails. I don’t actually have a use case for a hash table, so that’s on me. I was just looking for different failure points to test.
What I’m concerned about is getting accurate reports from the function so I can better read the output of my scripts.