Ir al contenido principal

Entradas

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

PowerShell - USING MERGE-SPLOGFILE TO FIND CORRELATION ID

When you are hit with a problem in SharePoint 2010 - 2013  you get notified to use a correlation id to check for further details in the trace logs (ULS logs). So you hopefully start up ULS Viewer and open up the relevant logs and search like a mad man after this specified correlation id. Sometimes you don’t find the provided correlation id in the log file you opened. Is there a easier way? Yes and that is to use the SharePoint PowerShell command Merge-SPLogFile. According to the description of Merge-SPLogFile on Microsoft TechNet: “Combines trace log entries from all farm computers into a single log file on the local computer.” Let me explain how you can use this powerful command. Basic Usage Lets visualise a simple farm. As the example Farm image above we have two frontend servers, application server and database server. If I wanted to consolidated the last hour of SharePoint log entries from the front-end server and application server I would o...

SharePoint: User Permissions detail report for a Web Application

fuente:  http://mstechtalk.com/sharepoint-user-permissions-detail-report-for-a-web-application/ Overview: A site administrator can easily verify and check user permissions from site settings page, steps are quite simple: Go to  Site Settings  –>  Site Permissions  –> Click on Check  Permissions Button  and enter user name, this will list the user rights for a single user. But what if it is required to list access permission details for all the users in a SharePoint site, this is not possible Out of the Box. The below listed script methods are helpful is this scenario, it will list  all users with their permissions and security group detail. The script will generate a detail drill down report for a Web Application which include all sites, sub sites, lists/libraries and items (if inheritance is break). PowerShell #Script written and modified by Adnan Amin #Blog: http://mstechtalk.com #twitter: @adnan_amin #facebook: https://www.fac...

Get SharePoint List Inventory using PowerShell

FUENTE: http://mstechtalk.com/get-sharepoint-list-inventory-using-powershell/  PowerShell scripts are very useful to generate some amazing reports, recently I have written a PowerShell script which retrieves all lists and libraries for a  SharePoint  site collection under all sub sites with item count and versioning enabled. This is a report which can be very useful when you are going to the delta/cutover migration and you can get the details for list and libraries recently modified and also item count. Use this report to compare list count including item count in each list for different sites (useful in migrations). You can download the script directly from GitHub repository. Include the reference SharePoint PowerShell. if ((Get-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin “Microsoft.SharePoint.PowerShell” } I am going to create a function name “ GetListInventory ” which...

PowerShell script to list all installed Microsoft Windows Updates

Fuente: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-script-to-list-0955fe87 Why use this script? The PowerShell cmdlet 'get-hotfix' sometimes does not draw-out 'installedon' information. win32-Quickfixengineering class does not have that information either. What does this script offer? The above void can be filled by using the good old 'wmic qfe list' command. But, the output of the legacy command is mere text and cannot be easily interrogated like objects in PowerShell.  The attached script converts the output string of 'wmic qfe list' command into versatile PowerShell objects, which can be used within other scripts. Note:  Do not forget to include the attached powershell script. The below POSH oneliner lists all updates installed in the last 2 days and tabulates properties: Computername, KBArticle,InstalledOn, HotFixID and InstalledBy. PowerShell Get - MSHotfix | Where - Object { $_ .Installedon  - gt...

SharePoint 2013: Continuous Crawl - Clear Incremental Crawl

Cuando tenemos implementado en una granja de SharePoint todos los  Content Source en Continuous Crawl  y se requiere modificar el job de Full Crawl al guardar nos damos cuenta que automáticamente se nos programa el job de Incremental Crawl y esto no es lo adecuado, es por ello que debemos optar por eliminar la programación de este ultimo pero la forma de hacerlo no nos deja por la interfaz gráfica. Para ello podemos utilizar los siguientes scripts Para consultar que Jobs tenemos programados con  IncrementalCrawl $SSA =  Get-SPEnterpriseSearchServiceApplication $SPContentSources = $SSA | Get-SPEnterpriseSearchCrawlContentSource foreach ($cs in $SPContentSources) {   $cs.IncrementalCrawlSchedule }  Para eliminar todos los Jobs  IncrementalCrawl  de los  Content Source # Propiedad Intelectual: Omar Molinares $SSA =  Get-SPEnterpriseSearchServiceApplication $SPContentS...