Jul 03 2024 03:42 AM
Hi all,
I'm experiencing several issues with different PowerShell versions when trying to create folders in OneDrive for users in bulk.
PowerShell 5.1 does not recognize Connect-PnPOnline.
PowerShell 7 does not recognize Connect-SPOService.
I have been following the instructions from this guide, which worked on my previous device. However, I’m unable to get it to work on my new device.
My goal is to create folders within specific users' OneDrive accounts. Could you please assist me in resolving this?
Thank you!
Jul 04 2024 03:56 AM
Jul 04 2024 04:06 AM - edited Jul 04 2024 04:07 AM
Thanks but the link you provided shows how to create folders within a specifc sharepoint list, my end goal is to create folders within multiple users onedrives.
Jul 04 2024 04:13 AM
Jul 04 2024 04:25 AM
Jul 09 2024 04:25 AM
Jul 09 2024 04:45 AM
Jul 10 2024 04:40 AM
So I have a list of users I want to retrive the onedrive URLs for and the title is UserPrincipalName (I have also tried "Email"
The code I am using is
$myUsers = Import-Csv -Path 'C:\Users\Salamander\Downloads\UsersToPreProv.csv'
New-PnPPersonalSite -Email $myUsers
Error:
Any ideas?
Jul 10 2024 05:18 AM
Jul 10 2024 05:28 AM
Jul 10 2024 05:37 AM
Jul 10 2024 06:24 AM
Jul 10 2024 07:12 AM
Jul 10 2024 07:19 AM
Jul 10 2024 07:41 AM
Jul 10 2024 07:46 AM - edited Jul 10 2024 07:47 AM
The steps no longer work for me, this is the reason I put this post on here, I was following the guide before. No luck.
The link you posted gives me access to all urls but I dont want that I want to export URLs for several users then give myself access to them, to create the folders.
Jul 10 2024 08:07 AM
Jul 11 2024 12:32 AM
Hi
Thanks for your help. The code works up until the point below:
It creates the URL file, but no URLs are included in it.
The "UserToPreProv" file contains two accounts with the header UserPrincipalName followed by the emails. I import it using the command from your instructions:
Where am I going wrong? Unless the URLs come later, I run into an issue where PowerShell 7 does not recognise Connect-SPOService.
Thanks again for your assistance.
Jul 15 2024 01:18 PM
Jul 16 2024 01:54 AM
I tried again but encountered issues with the command you mentioned. However, I was able to run Import-Module -Name pnp.powershell.
Here is the error I receive when using Import-Module -Name pnp.powershell -UseWindowsPowerShell:
I checked my PowerShell version, and it is:
When I attempt to use Connect-SPOService, I get a "command not recognized" error.
Do you have any ideas on how to resolve this?
Thank you.