DanielChronlund / DCToolbox

Tools for Microsoft cloud fans
309 stars 52 forks source link

Removed -ExpandProperty "policy(`$expand=rules)" #44

Open jonas04anderberg opened 9 months ago

jonas04anderberg commented 9 months ago

Removed -ExpandProperty "policy(`$expand=rules)" so that the script works again. This is solving issue #41 for me.

When I did some tests with the script, it turns out that the "Rules" property is empty and therefore it returns the error specified in issue #41. Removing the -ExpandProperty parameter completely, solves this issue for me. I don't know if Microsoft have changed something as the script worked for me before, but stopped working all of a sudden.

After looking through the script a little bit more, I don't find any reason as to why the -ExpandProperty parameter should be needed, but it's possible that I have missed something as I'm not good at coding.