Forum Discussion
444456464
Apr 01, 2022Copper Contributor
Import items from a CSV file to a Sharepoint Online list
Hello, I made a PowerShell script to import items from a CSV file to a Sharepoint Online list. Except that my code does not work because I have this error: "Get-SPOUser : Le terme «Get-SPOUser» n'e...
Apr 05, 2022
Any error messages when trying to install?
444456464
Apr 05, 2022Copper Contributor
When I install it from the command line nothing happens : https://zupimages.net/up/22/14/4ua2.png
But when I install it from the Microsoft website you sent (by downloading the .msi) it works.
But when I execute my powershell code it doesn't work 😞 : https://zupimages.net/up/22/14/r10s.png
Harm_Veenstra
But when I install it from the Microsoft website you sent (by downloading the .msi) it works.
But when I execute my powershell code it doesn't work 😞 : https://zupimages.net/up/22/14/r10s.png
Harm_Veenstra
- Apr 05, 2022If nothing happens/no prompt when running Install-Module Microsoft.Online.Sharepoint.PowerShell , you can add the -verbose parameter to see what it does. (No output while running install-module means that there was no issue)
If you run a import-module Microsoft.Online.Sharepoint.PowerShell -verbose, do you see VERBOSE: Importing cmdlet 'Set-SPOUser'. ?- 444456464Apr 05, 2022Copper ContributorI have this : https://zupimages.net/up/22/14/fuf7.png
And if I run import-module Microsoft.Online.Sharepoint.PowerShell -verbose I have this : https://zupimages.net/up/22/14/2o3h.png
Harm_Veenstra- Micca0815Apr 05, 2022Iron Contributor
as you make use of CSOM and SharePoint Online Management shell, I`d suggest to download the latest CSOM libraries from here:
https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOMand once downloaded load them into your current session.
The installed ones you are adding currently might not be compatible with SharePoint Online.
BTW. , you do not need to install those, they could be filed relative to the scripts´ location as well.
e.g. this is a shortened function I would use.function get-assemblies { $sCSOMPath= $scriptDir $sCSOMRuntimePath=$sCSOMPath + "\Microsoft.SharePoint.Client.Runtime.dll" $sCSOMClientPath=$sCSOMPath + "\Microsoft.SharePoint.Client.dll" #$sCSOMUploadPath= $sCSOMPath +" \Microsoft.SharePoint.Client.Publishing.dll" #Load SharePoint Online CSOM Assemblies try{ Add-Type -Path $sCSOMClientPath | out-null Add-Type -Path $sCSOMRuntimePath | out-null } catch { Add-LogEntry $logFilePath $requestNumber $env:hostname 'error' "failed loading assemblies" return Get-JsonStatus 1 "required dlls for SharePoint on $env:computername not found." } }