Forum Discussion
Using PnP PowerShell Apply label to items in this list or library
Hi harishpatil,
It appears that some of the commands in this module might already exist in your PowerShell environment, causing a conflict.
To resolve this, you can try installing the module with the -AllowClobber parameter. This parameter allows the module to override existing commands with the same names, potentially resolving conflicts. Here's how you can do it:
Install-Module -Name SharePointPnPPowerShellOnline -Force -AllowClobber
Adding the -AllowClobber parameter should help you install the module without conflicts. After that, you can proceed with the rest of the PowerShell script as previously provided.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
I have check on Google also regarding tag Get-PnPComplianceTag but not able to find anything regarding the same.
Also in PowerShell also not able to get that tag. Is this related with PnP PowerShell?
Which version I need to use for the same for PnP PowerShell? I have installed below version on my machine.
PS C:\Users\z003ve3v> Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending
Name Version
---- -------
SharePointPnPPowerShellOnline 3.29.2101.0
SharePointPnPPowerShell2013 3.29.2101.0
SharePointPnPPowerShellOnline 3.29.2101.0
- LeonPavesicSep 21, 2023Silver Contributor
Hi harishpatil,
The Get-PnPComplianceTag cmdlet is a new cmdlet that was introduced in PnP PowerShell version 3.29.2101.0. If you are using an older version of PnP PowerShell, then you will not have this cmdlet and you will need to upgrade to a newer version.
To check the version of PnP PowerShell that you are using, run the following command:
Get-Module SharePointPnPPowerShellOnline -ListAvailable | Select-Object VersionIf you are not using PnP PowerShell version 3.29.2101.0 or higher, then you can upgrade to the latest version by running the following command:
Install-Module SharePointPnPPowerShellOnline -ForceOnce you have upgraded to the latest version of PnP PowerShell, you should be able to run the Get-PnPComplianceTag cmdlet without any errors.
If you are still having problems, please try the following:
- Make sure that you are running the PowerShell script as an administrator.
- Restart your computer.
- Try running the PowerShell script in a different PowerShell console.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
- HerschelJApr 22, 2024Brass ContributorI am getting the same error as harishpatil. I am trying to run the code you added above, and have the lastest version of SharePointPnPPowerShellOnline, but get the error: The term 'Get-PnPComplianceTag' is not recognized as the name of a cmdlet...
- harishpatilSep 22, 2023Brass ContributorHi Leon,
I have followed all steps you mentioned also restarting machine, run as Administrator. I have tried all the things.
I found that if I uninstall the All Version still I can see the below version. Not able to understant from where it takes. Also not getting any solution how to remove that. If I again try to uninstall same command then it says below message:
PackageManagement\Uninstall-Package : No match was found for the specified search criteria and module names 'SharePointPnPPowerShellOnline'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:12733 char:21
Still shows below version:
Name Version
---- -------
SharePointPnPPowerShellOnline 3.29.2101.0
Is there any way how we can remove the same or any other solution for the same.