After running the following command
I received the following error
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
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
4 comments:
Thanks for the fix. It worked. But the Remove Read Only powershell script has issue.
I fixed the readonly script
Can you Post the readoly script please?
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
}
}
}
}
Post a Comment