Forum Discussion
YosiP
Sep 18, 2023Copper Contributor
Find all files on SharePoint Online between two date
I am trying to write a script in PowerShell that copies all my files from one site to another site. I am trying to keep costs down by only taking so many files at the same time. I figured I would do ...
YosiP
Sep 19, 2023Copper Contributor
LeonPavesic I had to uninstall and reinstall the sharepoint module. Even after that I got this message:
$files = Get-SPOSite $sourceSiteUrl | Get-SPOWeb | Get-SPOList $sourceLibraryName | Get-SPOListItem | Where-Object {
($_.FileSystemObjectType -eq "File") -and ($_.FieldValues.Created -ge $startDate) -and ($_.FieldValues.Created -le $endDate)
}
Get-SPOWeb : The term 'Get-SPOWeb' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:39
+ $files = Get-SPOSite $sourceSiteUrl | Get-SPOWeb | Get-SPOList $sourc ...
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-SPOWeb:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
YosiP
Sep 20, 2023Copper Contributor
I am getting help on another forum. Thank you for all your help.