mozziemozz / M365CallFlowVisualizer

Reads a config from Microsoft 365 Phone System and renders them visually into a mermaid-js flowchart.
MIT License
91 stars 25 forks source link

Parameter passing erroring out #35

Closed dinocaputo closed 1 year ago

dinocaputo commented 1 year ago

image How are the parameters expected? Tried a few ways and it errors out.

mozziemozz commented 1 year ago

ShowPhoneNumberType is a switch, so you don't have to add $true. Just add -ShowPhoneNumberType

-ShowPhoneNumberType Specifies whether or not the phone number type of phone numbers should be displayed. (CallingPlan, OperatorConnect, DirectRouting) Required: false Type: switch Default value: false

All params are explained/defined in the synopsis.

dinocaputo commented 1 year ago

Yeah this worked. Showed True/False in readme so assumed all parameters required them.
image Might suggest making it all consistent but all good. Thanks!

mozziemozz commented 1 year ago

Yeah some params are switches, some are bools because I want a default value for those. Not that uncommon for PowerShell I think.

I don't recall adding any of the new params to the readme but all should be in the synopsis.

You can always create a parent script which just calls the visualizer with your preferred params. ☺️

dinocaputo commented 1 year ago

Thanks all good. Any way to run this once and capture ALL callflows in one run session? The reason I ask is that if I run each AA as separate cmdlet it will read all AA's and CQs into an array and it slows down the processing.

mozziemozz commented 1 year ago

The script can only run for 1 top level app at a time but there is now a param called CacheResults which is false by default. So try to use -CacheResults $true. It will get all AAs, CQs and RAs and store them in Global variables, so for the next run, it will only need to lookup the stuff it has to, which all should be graph requests with an explicit ID (users/groups) as long as the PS session persists. But it won't read all voice apps again.