Windows 10: Search and Restore file from SharePoint Online using PowerShell

Discus and support Search and Restore file from SharePoint Online using PowerShell in Windows 10 Tutorials to solve the problem; When having SharePoint Online, one can easily recover items from the Recycle Bin, but unfortunately, there is no search facility for the Recycle Bin... Discussion in 'Windows 10 Tutorials' started by Noel, Jan 9, 2023.

  1. Noel New Member

    Search and Restore file from SharePoint Online using PowerShell


    When having SharePoint Online, one can easily recover items from the Recycle Bin, but unfortunately, there is no search facility for the Recycle Bin from the web interface. We can use PowerShell to easily search for the item.

    To be able to connect, we need to install the new module, Open a PowerShell window and use the below to install the module.

    Install-Module -Name PnP.PowerShell

    If you would have an older version already installed, you need to use the below command to remove the old module, and then install the module as above.

    Uninstall-Module -Name SharePointPnPPowerShellOnline -AllVersions -Force

    To connect with the SharePoint Online site, we need to use the following command which will ask us to allow the script to communicate along with the Multi-Function Authentication (MFA).

    Connect-PnPOnline -Url "Enter the SharePoint URL here" -Interactive

    To extract the specified SharePoint Online Recycle Bin, you need to use the following command to output to the screen. Change the RowLimit to set the maximum results.

    Get-PnPRecycleBinItem -RowLimit 50 | Select Title, ItemType, Size, ItemState, DirName, DeletedByName, DeletedDate | Format-table -AutoSize

    To export the results to a CSV, you need to add the Export-CSV at the end as below

    Get-PnPRecycleBinItem -RowLimit 50 | Select Title, ItemType, Size, ItemState, DirName, DeletedByName, DeletedDate | Export-Csv "C:\Temp\RecycleBin.csv" -NoTypeInformation

    To restore a specific file, you cannot just specify the name, as you need to get the item information. We need to use the following commands

    $itemtorestore=Get-PnPRecycleBinItem | ? -Property Title -EQ "filename of the deleted file"
    Restore-PnpRecycleBinItem -Identity $itemtorestore -Force

    This will restore the file to its original location.

    Swish

    (0)

    read more...
     
    Noel, Jan 9, 2023
    #1
  2. enso Win User

    Quick Access not searching Pictures folder

    Summary, that last suggestion didn't work.

    • I moved the pictures to another folder temporarily.


    • Since there were no troubleshooting steps for this scenario, just for the heck of it, I ran through the restore steps. Copied some pictures into the Pictures folder, ran a Quick Access search and initial problem remains: Searching all of QA doesn't find any files in Pictures folder, running search on just the Pictures folder does. I want to run a global search and find matching files in any/all of the Documents, Music, Videos, and Pictures folders.
    That article dates from 2015 and I'm guessing is out of date. I hope it didn't create potential future problems in my registry.

    Bottom line: I'm still looking for a fix.
     
    enso, Jan 9, 2023
    #2
  3. Sharepoint sync - massive delay - Windows events log file

    Hi All,

    How do I view the events log?

    The M365 team are suggesting taking a manual backup of Sharepoint, then reestablishing a Sharepoint sync "from scratch". Please forgive any knowledge gaps.

    They've advised this has a possibility of losing sharepoint data. We are therefore reluctant to perform this step if an event log can point to an alternative fix.
     
    Mary Walker (inbox), Jan 9, 2023
    #3
  4. Search and Restore file from SharePoint Online using PowerShell

    Edge Search Does Not Permit Change of Region


    I got these suggestions from the Microsoft Community forum.No. 1 worked for me:

    Thank you for posting the query on Microsoft Community. I am glad to assist you on this.
    We have reproduce the issue here and we are able to access non-regional search for google using Microsoft Edge.
    I would suggest you to try the below steps and check if it helps.
    Step 1:
    Clear browsing data option of Microsoft Edge and check if you face the issue. To do so perform the steps below.

    1. Click on the More actions icon next to the feedback icon present on top right corner of the Project Spartan homepage.
    2. Select Settings and click on Choose what to clear.
    3. Check the boxes Browsing history, Cookies and saved website data and Cached data and files and click on Clear.
    Step 2:
    I suggest you to create a new user account and check if the issue occurs.

    1. Go to Settings.
    2. Choose Accounts and then select Family and other users.
    3. Select add someone else on this PC.
    4. Enter a user name and hit next.
    5. Click on Finish.
    6. Sign out from the current Account and Log into the new account.
    Step 3:
    It could also happen because of network issue. I suggest you to try with different network connection and check if it helps.
     
    hurricane51, Jan 9, 2023
    #4
Thema:

Search and Restore file from SharePoint Online using PowerShell

Loading...
  1. Search and Restore file from SharePoint Online using PowerShell - Similar Threads - Search Restore file

  2. Using File Explorer to view SharePoint

    in Windows 10 Software and Apps
    Using File Explorer to view SharePoint: Up until today I have been able to use File Explorer to view local files and SharePoint files, by logging into my SharePoint on Internet Explorer and adding it as a Trusted Site. As of today, I can't log back into Internet Explorer as it's just coming up with messages saying...
  3. Powershell vs Sharepoint Online Management Shell

    in Windows 10 Gaming
    Powershell vs Sharepoint Online Management Shell: What is the difference between powershell and sharepoint online management shell? https://answers.microsoft.com/en-us/windows/forum/all/powershell-vs-sharepoint-online-management-shell/654ce759-0c15-4668-81d9-5db2c96e49e7
  4. Powershell vs Sharepoint Online Management Shell

    in Windows 10 Software and Apps
    Powershell vs Sharepoint Online Management Shell: What is the difference between powershell and sharepoint online management shell? https://answers.microsoft.com/en-us/windows/forum/all/powershell-vs-sharepoint-online-management-shell/654ce759-0c15-4668-81d9-5db2c96e49e7
  5. Powershell vs Sharepoint Online Management Shell

    in Windows 10 Customization
    Powershell vs Sharepoint Online Management Shell: What is the difference between powershell and sharepoint online management shell? https://answers.microsoft.com/en-us/windows/forum/all/powershell-vs-sharepoint-online-management-shell/654ce759-0c15-4668-81d9-5db2c96e49e7
  6. Sharepoint Online: Using the URL file preview from Details pane

    in Microsoft Office and 365
    Sharepoint Online: Using the URL file preview from Details pane: Hi everyone, crossposting this from Stack Exchange. I don't exactly expect an answer because of just how peculiar the question is but I'll try anyway. I'm trying to make a document library containing PDF files and URL files. I want previews/thumbnails for all of the files....
  7. File path lengths OneDrive sync from SharePoint online

    in Windows 10 Network and Sharing
    File path lengths OneDrive sync from SharePoint online: I have hunted around for a solution and can't find any recent posts. SP allows path lengths of 400 characters but synching to the OneDrive client runs into errors accessing files with paths over 260 characters. Has anyone found a viable fix for this? Our pilot folders 200GB...
  8. Edit PDF File from SharePoint Online Site

    in Microsoft Office and 365
    Edit PDF File from SharePoint Online Site: Hello, i stumbled over this article when i browsed facebook. And thought i will share it here *Smile Table of Contents Introduction Challenges that we had in PDF editing from SharePoint? Advantages of editing PDF from SharePoint Online. How to configure and integrate the...
  9. Map drive to Sharepoint Online

    in Windows 10 Customization
    Map drive to Sharepoint Online: We're using sharepoint online and would like to map a drive to a library which has a number of subfolders in it (5000+). When I map it I'm told the folder is empty. I'm able to map directly to one of the subfolders and see files but not to the root of the Library. Is there a...
  10. Increase in SharePoint Online storage allocation

    in Windows 10 News
    Increase in SharePoint Online storage allocation: Maybe - but Sharepoint itself is a bit of a cranky product. For instance it still has some features which only work with Internet Explorer - none of your new-fangled 'Edge' browsing! *Wink Yeah I know! Sometimes very frustrating, and some stuff didn't work properly...