User Profile
sickaroll
Brass Contributor
Joined Jul 03, 2019
User Widgets
Recent Discussions
Re: SharePoint Online Powershell Connection (MFA) inside PS Job
Frederick Wilson Use -returnconnection and save the result as something. $MyWebConnection = connect-pnpOnline -url -interactive -returnconnection Then you can use the connection switch to 'force' the use of this connection. $web = get-pnpWeb -connection $MyWebConnection You can pass them to functions as parameters too: function Do-StuffInAWeb { param( [Parameter(Mandatory=$true)] [PnP.PowerShell.Commands.Base.PnPConnection]$PnPWebConnection, [Parameter(Mandatory=$true)] [string]$ReportPath =$(throw "-ReportPath parameter is required.") )1.3KViews0likes0Comments
Recent Blog Articles
No content to show