Ir al contenido principal

Entradas

Mostrando las entradas etiquetadas como Contenido SharePoint

PowerShell - SPOnPremise - Calculate and Set Distributed Cache Size

#calculation from:  http://technet.microsoft.com/en-us/library/jj219613.aspx $membanks = get-wmiobject Win32_PhysicalMemory $sum = 0 $i = 1 foreach ( $membank in $membanks ) {   write-host "Capacity Memory $i = " ( $membank . capacity / 1024 / 1024 )   $sum = ( $membank . capacity / 1024 / 1024 ) + $sum   $i = $i + 1 } write-host "Sum of Memory = " $sum $cachesize = ( $sum - 2048 ) / 2 if ( $cachesize > 16384 )   {   $cachesize = 16384 #not more than 16GB   } write-host "Distributed Cachesize will be updated to: " $cachesize #Update-SPDistributedCacheSize -CacheSizeInMB $cachesize Fuente: https://blogs.technet.microsoft.com/sp/?p=213 

WSP no se implementa en todos los servidores de una granja de SharePoint 2013

Se tienen 2 servidores (servidor1, servidor2) en nuestra granja. El archivo WSP se implementa solo en 'Server2' y el estado se muestra como 'No implementado'.  El servicio de aplicación web de SharePoint, temporizador y el servicio de administración de SharePoint funciona bien.  La Administración Central se ejecuta  en el 'Servidor1' donde nuestra solución no se implementa.  Los siguientes fueron los pasos ejecutados:  Administrador central habilitado en ambos servidores.  Servicio de temporizador y servicio de administración SP se reiniciaron.   Se borró la memoria caché de SharePoint y se reiniciaron las máquinas.  Traté de usar "Install-SPSolution" con el parámetro '-local' en el servidor emitido (Server1). Esta solución de tiempo se implementó solo en Server1 y el estado se muestra como Implementado.  Cuando elimino el parámetro '-local' y hago "Install-SPSOlution", nuevamente se implementa e...

Powershell: Script to count number of list and library items in site collection

Fuente: https://social.technet.microsoft.com/Forums/en-US/f35cb3fa-f788-424a-9e91-317d8e374765/powershell-script-to-count-number-of-list-and-library-items-in-site-collection?forum=sharepointadminprevious Add-PSSnapin Microsoft.Sharepoint.Powershell $ListsInfo = @{} $TotalItems = 0 $SiteCollection = Get-SPSite "http://intranet/" ForEach ($Site in $SiteCollection.AllWebs) {     ForEach ($List in $Site.Lists)     {         $ListsInfo.Add($Site.Url + " - " + $List.Title, $List.ItemCount)         $TotalItems += $List.ItemCount     } } $ListsInfo.GetEnumerator() | sort name | Format-Table -Autosize Write-Host "Total number of Lists: " $ListsInfo.Count Write-Host "Total number of ListItems: " $TotalItems

How To Export/Import a List Using PowerShell

Here is the sample that explains the syntax: Export-SPWeb -Identity “ http://sp.dev/subsite ” -ItemUrl “/subsite/lists/List Title here” -path “c:\temp\tempfile.txt” Some Where Options: -Identity: full url (absolute) of the site where the list exists -ItemUrl:  relative path of the list from subsite level. Do not forget to include the leading “/” -path: path of the output file to save the data in. This does not need any extension but I usually give it .txt. There are lot more additional parameters but above are the minimum for copying a list To recreate the list in other environment – I used Import-SPWeb command. PowerShell Script automatic export / import multiple lists #This is the source web that is hosting the lists to move    $sourceWebUrl = "http://source_web"          #This is the destination web, where the lists will be copied to     $destWebUrl = "http://destination_web"         ...

How to Backup/Restore Managed Metadata from one farm/environment to another

What? SharePoint 2010 -2013 How to Backup/Restore Managed Metadata from one farm/environment to another? Why? You will be amazed by the lack of proper import/export functionality. It is quite a general requirement to migrate Managed Metadata Service / Termsets from one environment to the other. There are a few approaches to backup/restore managed metadata between environments. OOB, SharePoint 2010 allows for ONLY importing managed metadata in CSV format. You are required to use Powershell / Object Model to build the csv file. Here is a script that can do it. Managed metadata terms and termsets each have a unique guid. If you take a backup of a site that is using managed metadata in some columns and restore this site into another environment, the guids don't match up. You will have to go through and re click each term and "wire it back up" so it's okay and doesn't show in red text. Paul Culmsee did a good job of explaining the same with nice ...

¿Cómo puedo evitar que Sharepoint deje de preguntar por descargar los archivos html o xml a mi máquina local?

  Básicamente, es una característica de seguridad (que puede ser desactivado, si acepta la implicación), que impiden que algunos archivos que se muestran en el navegador directamente. Por lo general, lo que impediría que alguien ponga un poco de javascript en el archivo html y obtener privilegios del usuario que está viendo. Hay una manera más limpia para solucionar este comportamiento. En lugar de deshabilitar esta configuración de seguridad, se debe permitir que sólo los tipos MIME que desea permitir se vean en el navegador Aquí hay una pequeña función de utilidad PowerShell: function Add -SPAllowedInlineDownloadedMimeType{ [CmdLetBinding()] param( [ Parameter (Mandatory=$ true , Position =0, ValueFromPipeLine=$ true )] [Microsoft.SharePoint.PowerShell.SPWebApplicationPipeBind]$WebApplication, [ Parameter (Mandatory=$ true , Position =1)] [string]$MimeType ) process{ $actualWebApp = $WebApplication. Read () if...

PowerShell Script to delete items from SharePoint List

  The outcome of the below script is to delete items that are created 7 days before: Add -PSSnapin Microsoft.SharePoint.PowerShell   [System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $web = Get -SPWeb "YOUR SHAREPOINT SITE" $list = $web.Lists["YOUR LIST NAME"] $DeleteBeforeDate = [Microsoft.SharePoint.Utilities.SPUtility]::CreateISO8601DateTimeFromSystemDateTime([DateTime]::Now.AddDays(-7)) $caml= '<Where> <Lt> <FieldRef Name="Created" /><Value Type="DateTime">{0}</Value> </Lt> </Where> ' -f $DeleteBeforeDate $query= new - object Microsoft.SharePoint.SPQuery $query.Query=$caml $col=$list.GetItems($query) Write - Host $col. Count $col | % {$list.GetItemById($_.Id). Delete ()} $web.Dispose() Fuente: http://social.technet.microsoft.com/wiki/contents/articles/17895.powershell-script-to-delete-items-from-sharepoint-list.aspx

Import user profile pictures to SharePoint using PowerShell

  Best solution to create Automatic UserProfile Import to SharePoint Create folder “ImportProfileImages” Create subfolder “ProfileImages” Create “Drive:\ImportProfileImages\UpdateUserProfiles.ps1″   cls if ((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell" }) -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell; }   #--------------------------------------------------------------------------------- # Default Values #---------------------------------------------------------------------------------   $spNotFoundMsg = "Unable to connect to SharePoint. Please verify that the site '$siteUrl' is hosted on the local machine." ;   #----------------------------------------------------- # Load Assemblies #-----------------------------------------------------   if ([Reflection.Assembly]::LoadWithPartialName( "Microsoft.SharePoint" ) -eq $null) { throw $spNotFoundMsg; } if ([Reflection.Assembly]::LoadWithPartialNam...