pschaeflein/MagicTooltips

Add support for PnP.Powershell

Opened this issue · 3 comments

@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

image

Source - https://www.erwinmcm.com/pimp-your-pnp-powershell/

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

  1. What if you are not connected? Variables missing or empty?
    The values are null.
    image

  2. 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.

  3. 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.