Script advice/help: Verify Activelicense > ConsumedLicense, pause if opposite

So I’m drafting a script that will prompt for which plan is required, Bus Prem or Exch Online, then check to verify Active is greater than Consumed. If yes then assign plan to user specified. If not, then pause allowing admin to buy a license, then teh admin continues the script to assign the new free license.

 

What I’ve got so far is:

https://paste.fedoraproject.org/paste/R6gdMUCHp5wFawG3qd-FDg

Pretty sure line 17 is formatted wrong. That’s the part I’m hung up on.

There is a closing curly bracket of switch missing after line 17. Can you explain your problem here ?

Well no I can’t explain it because that falls directly in line with what I was asking for assistance with.

 

To be honest I was disappointed that this was the only response I can get here so I went to Reddit. Found vastly more help there so I apologize for the wasted time.

Probably everyone was waiting for you reply, me of course.

Did you get any solution from redit, if so please share it here, else

Are you getting any error, can you share the error here.

Certainly, the entire block was basically changed to this: https://paste.fedoraproject.org/paste/W3WSAdNf1ullNpCbVKIfFw

However I do still have an issue with my loop that I’m working out. Loops are new to me so it’s baby steps.

 

 

kvprasoon, as for …

Did you get any solution from redit, if so please share it here, else

https://www.reddit.com/r/PowerShell/comments/b32uc9/syntax_help_broken_do_while_loop

I did not see this post here until today, after my response yesterday.

Postanote… you are everywhere… lol.