Open pschaeflein opened 3 years ago
@pschaeflein - Not sure if this helps - when connected to a SharePoint site using PnP PowerShell, a couple of environment variables will have values set in them. Those variables are $env:PNPPSSITE
and $env:PNPPSHOST
Thanks so much!!!
Couple of questions: 1) What if you are not connected? Variables missing or empty? 2) Is there a variable with the user name? 3) Would you prefer the connected site instead of the account? Or both?
No worries Paul. Please find the answers below
What if you are not connected? Variables missing or empty? The values are null.
Is there a variable with the user name? I don't think there is a variable with user name. Maybe @gautamdsheth can provide more information.
Would you prefer the connected site instead of the account? Or both? Since we can connect either with an account or an app reg, personally for me, connected site only is fine.
Info: Installing PnP PowerShell
Get-PnPConnection
https://twitter.com/ToddKlindt/status/1402269525769326592?s=20