Hi gang,
I'm considering writing a collection of PowerShell Cmdlets to manage instances of an online service, and since they all require an instance URL and a Token for authentication, I thought it'd make sense to have a "Connect-" Cmdlet that you run first (similar to "Connect-AzureAD" etc).
Is there any official guidance out there on how to write these "Connect-" Cmdlets? Like if I were to invoke my hypothetical Cmdlet like this:
>Connect-Whatever -Url $url -Credential $creds
... how do I persist the information so that subsequent "-Whatever" Cmdlets can access it? What exactly does a "Connect-" Cmdlet do?
Thanks,
Matt