I'm trying to move a file to a Teams Channel\SharePoint directory using powershell. It appears to me that I only need three lines of code for proof of concept. I'm using the -UseWebLogin to get my login information
$Output = Get-ChildItem C:\Temp\ToSharepoint\Test.txt
Connect-PnPOnline -Url "https://My365.sharepoint.com/" –UseWebLogin
Add-pnpfile -path $Output -Folder
CodePudding user response:
Here's the interface I'm working with and what I'm using. The only way I could get the picture in was to submit this as an answer, sorry about that.
$Output = Get-ChildItem C:\Temp\ToSharepoint\Test.txt
Connect-PnPOnline -Url "https://My365.sharepoint.com/sites/UnitedWeStand" –UseWebLogin
Add-pnpfile -path $Output -Folder "Documents/IT Communications"
Thanks again!