Enable-SPFeature: The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url

After running the following command

Enable-SPFeature-Identity DocumentSet-URL http://url

I received the following error

Enable-SPFeature: The Feature is not a Farm Level Feature and is not found in a Site level defined by the Url ...

Why ???

It happened to me because I copied some files at the time manually (not using the solution).
The team system locks the files to ReadOnly.
And the command fails (the readonly found only a deep excavation in the log files of sharepoint)



The solution: Disables the ReadOnly for all the files in sub folders.
It can be found here:

Uncheck read only file for all sub folder with PowerShell

I use this code at 14\Template folder
Thanks,
Roi

Comments

  1. Thanks for the fix. It worked. But the Remove Read Only powershell script has issue.

    ReplyDelete
  2. Can you Post the readoly script please?

    ReplyDelete
  3. the readonly script

    $Path = "your root folder"
    $Files = Get-ChildItem $Path -Recurse
    ForEach ($File in $Files)
    {
    Write-Host "File: " $File "IsReadOnly: " $File.IsReadOnly
    if ($File.Attributes -ne "Directory" -and $File.Attributes -ne "Directory, Archive")
    {
    if ($File.IsReadOnly -eq $true )
    {
    try
    {
    Set-ItemProperty -path $File.FullName -name IsReadOnly -value $false
    write-host "file:" $File.FullName "is now false read only" -foregroundcolor "magenta"
    }
    catch [Exception]
    {
    Write-Host "Error at file " $Path "\" $File
    Write-Host $_.Exception.Message
    }
    }
    }
    }

    ReplyDelete

Post a Comment

Popular posts from this blog

A sharepoint list view of the current month

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

Export SharePoint 2010 List to Excel with PowerShell