Ir al contenido principal

Entradas

Mostrando las entradas etiquetadas como SharePoint 2010

PowerShell - SharePoint - How to get SPO site created date

You can get SPO site collection date by using below PowerShell script Get-SPSite -Limit All | % { $root = $_ . rootweb; $date = $root . created . toShortDateString();   Write-Host " $( $root . url) was created on $( $date ) " }    Fuente: https://www.c-sharpcorner.com/forums/how-to-get-spo-site-created-date 

PowerShell - Get Database Size for all SharePoint DBs via PowerShell

Get Database Size for all SharePoint DBs via PowerShell Add-PSSnapin microsoft.sharepoint.powershell $size = 0 foreach ( $db in Get-SPContentDatabase ) {     $size = $size + $db . DiskSizeRequired } $cdbs = "{0:N2}" -f ( $size / 1gb ) $ssa = Get-SPEnterpriseSearchServiceApplication $topo = $ssa | Get-SPEnterpriseSearchTopology   -Active $indexcomponent = ( Get-SPEnterpriseSearchComponent -SearchTopology $topo | ? { $_ . name -like "*index*" }) [ 0 ] $folder = $indexcomponent . RootDirectory $indexsize = "{0:N2}" -f (( Get-ChildItem $folder -Recurse | Measure-Object -sum   Length ) . sum / 1GB ) $dbs = Get-SPDatabase cls write-host "--------------------------------------------------------------------------------------" -fore green Get-Date write-host "" write-host "--------------------------------------------------------------------------------...

[IIS] Delete IIS Logs Using Task Scheduler

Deletes IIS log files that are more than "n" days old with Task Scheduler - Without VB and PS Scripts.Run Task Scheduler using the Windows interface Click the Start button. Click Control Panel . Click System and Maintenance . Click Administrative Tools . Double-click Task Sche Deletes IIS log files that are more than  n  days old with Task Scheduler - Without VB and PS Scripts. Run Task Scheduler using the Windows interface Click the  Start  button. Click  Control Panel  . Click  System and Maintenance  . Click  Administrative Tools  . Double-click  Task Scheduler  . To Run Task Scheduler from the Command Line Open a command prompt. To open a command prompt, click  Start  , click  All Programs  , click  Accessories  , and then click  Command Prompt  . At the command prompt, type  Taskschd.msc  . Create new Task and specify"Start a program" in Actions ...

Powershell script for SharePoint 2010 & SharePoint 2007 Site Usage report

SharePoint 2010 & SharePoint 2007  – Powershell script for finding site Url, Title,user Count, Primary & Secondary Site collection admins, Usage, Hits, views, Created Date, last modifed date [System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”) # get local farm $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local # get web services from local farm $websrvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]} # format for .csv file output $outputToCSV = @() function CheckedOutItems() {     # get all web services available in the farm       foreach ($websrvc in $websrvcs) {         # retrieve web applications         foreach ($webApp in $websrvc.WebApplications) {           ...

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...

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"         ...

Powershell script for SharePoint 2010 & SharePoint 2007 Site Usage report

SharePoint 2010 & SharePoint 2007  – Powershell script for finding site Url, Title,user Count, Primary & Secondary Site collection admins, Usage, Hits, views, Created Date, last modifed date [System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”) # get local farm $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local # get web services from local farm $websrvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]} # format for .csv file output $outputToCSV = @() function CheckedOutItems() {     # get all web services available in the farm       foreach ($websrvc in $websrvcs) {         # retrieve web applications         foreach ($webApp in $websrvc.WebApplications) {           ...