Forum Discussion
Connect-PnPOnline -Connection parameter???
- Jan 08, 2023
My-atix The Connect-PnPOnline cmdlet has a -ReturnConnection parameter which will return the connection object you are looking for.
Change line 5 in your sample above to
$webConnect = Connect-PnPOnline -Url $webUrl -Interactive -ReturnConnection
Good luck!
Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
My-atix The Connect-PnPOnline cmdlet has a -ReturnConnection parameter which will return the connection object you are looking for.
Change line 5 in your sample above to
$webConnect = Connect-PnPOnline -Url $webUrl -Interactive -ReturnConnection
Good luck!
Please click Mark as Best Response & Like if my post helped you to answer or resolve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.