script to upload folders to one drive for buisness


i trying automate uploading files 1 drive business large work via cloud. these files access databases , 2gb piece.  script trying run spouploaddownload.  see below test , it's results new powershell , appreciated:

ps c:\users\hmagnes> add-spofolder -uploadfilepath "c:\users\hmagnes\documents" -username hmagnes@et-t.com -siteurl "add
-spofolder -uploadfilepath "c:\users\hmagnes\doccuments " -username hmagnes@et-t.com-siteurl "https://easterntelephone-m
y.sharepoint.com/personal/hmagnes_et-t_com/documents" -listname document -folderpath doccuments" -listname document -fol
derpath doccuments
add-spofolder : cannot process argument transformation on parameter 'password'. cannot convert " -username
hmagnes@et-t.com-siteurl " value of type "system.string" type "system.security.securestring".
@ line:1 char:156
+ ... ers\hmagnes\doccuments " -username hmagnes@et-t.com-siteurl "https:// ...
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + categoryinfo          : invaliddata: (:) [add-spofolder], parameterbindingargumenttransformationexception
    + fullyqualifiederrorid : parameterargumenttransformationerror,add-spofolder

ps c:\users\hmagnes>

your code badly copied website.

look closely. "documents" misspelled. code line pasted twice one-inside-the-other.

a normal line this:

# following line add-spofolder -uploadfilepath c:\users\hmagnes\doccuments -username hmagnes@et-t.com-siteurl https://easterntelephone-my.sharepoint.com/personal/hmagnes_et-t_com/documents" -listname document -folderpath doccuments" -listname document -folderpath documents  #


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607