A problem in Powershell

Mustafa Zeyad 20 Reputation points
2023-12-25T07:36:19.8833333+00:00

Uninstall-Module -Name SharePointPnPPowerShellOnline - Allversions - Force. PackageManagement\Uninstall- Package:No match was found for the specified search criteria and module names 'SharePointPnPPowerShellonline'. At C:\Program Files\Windows PowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1: 2194 char: 21 + $null =

Microsoft 365 and Office SharePoint For business Windows
Microsoft Security Microsoft Graph
{count} votes

Accepted answer
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2023-12-26T18:55:25.6466667+00:00

    Hi @Mustafa Zeyad@Mustafa Zeyad

    If the Uninstall-Module generate a error you can delete manually the entire folder (SharePointPnPPowerShellOnline) folder .

    To identify the Path of (SharePointPnPPowerShellOnline) folder you can use the following command :

    Get-Module -Name SharePointPnPPowerShellOnline | select Name,version,Path

    If you want reintall the domain you need just execute the following command :

    Install-Module -Name SharePointPnPPowerShellOnline


    Please don't forget to accept helpful answer

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Bjoern Peters 8,921 Reputation points
    2023-12-25T20:45:40.41+00:00

    Hi Mustafa
    Welcome to the Q&A Forum; this is a great place to get support, answers, and tips.

    Thank you for posting your question; I'll be more than glad to help you out.

    First, to make sure it is only a "Copy&Paste" error... There shouldn't be a space between the dashes, Allversions, and Force.

    Secondly, according to the MSFT documentation, -Force isn't working on that command.
    https://learn.microsoft.com/en-us/powershell/module/powershellget/uninstall-module?view=powershellget-3.x

    Your post is missing the screenshot. What are the results of a Get-InstalledModule?

    I hope my answer is helpful to you,

    Your

    Bjoern Peters

    If the reply was helpful, please upvote and/or accept it as an answer, as this helps others in the community with similar questions. Thanks!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.