For this example, I don't really see a point of a pester test?
Since your pester test makes the change, the test becomes the script itself, no?
And in this example, you'd have to know in advance what the value for the Registry Key was, to know if your function actually did anything. If it was already set to 0, but your function failed for whatever reason, it would return a false positive. Personally, if I wrote a script for this, I would much rather check what the value was, change it if needed, and then check it afterwards so I know that it was changed.
Maybe I'm missing the point, but since Pestering actually carries out the work that it should only be *testing*, what is the actual point? Maybe if I'm only getting back information, but not when it actually makes changes(?)...
How would you go about getting the content you receive into a variable, and then working with it from there?
Specifically, I'm trying to get our Azure Billing Report, which is a CSV file, and then write it to Azure blob storage. As I am trying to do this from an Azure function, I don't really have the luxury of writing to a file first.