惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
U
Unit 42
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
P
Privacy International News Feed
T
Threatpost
Microsoft Azure Blog
Microsoft Azure Blog
NISL@THU
NISL@THU
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
L
Lohrmann on Cybersecurity
The Last Watchdog
The Last Watchdog
AWS News Blog
AWS News Blog
C
Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
Y
Y Combinator Blog
人人都是产品经理
人人都是产品经理
C
Cybersecurity and Infrastructure Security Agency CISA
D
Darknet – Hacking Tools, Hacker News & Cyber Security
G
GRAHAM CLULEY
Google DeepMind News
Google DeepMind News
H
Help Net Security
A
Arctic Wolf
Stack Overflow Blog
Stack Overflow Blog
S
Security Affairs
S
Securelist
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
L
LangChain Blog
博客园 - 【当耐特】
L
LINUX DO - 最新话题
Security Archives - TechRepublic
Security Archives - TechRepublic
Blog — PlanetScale
Blog — PlanetScale
N
News | PayPal Newsroom
B
Blog RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
S
Security @ Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog

博客园 - 努力学习的小熊

SharePoint - Another Way to Delete Site Collection Exchange - Add Owner of Distribution Group Exchange Online Mailbox Restoration OUTLOOK - Unable to Delete Meetings Outlook Error: The Delegates settings were not saved correctly. Cannot activate send-on-behalf-of list. Office365 OneDrive Geo Move SharePoint Excel Service - Couldn't Open the Workbook. User Get 'Access Denied' with Excel Service WebPart How To Search and Restore files from Site Collection Recycle Bin How To Restart timer service on all servers in farm How to Operate SharePoint User Alerts with PowerShell How to get Timer Job History Synchronization Service Manager SharePoint 2007 Full Text Searching PowerShell and CS file content with SharePoint Search 0x80040E14 Caused by Max Url Length bug SharePoint 2007 User Re-created in AD with new SID issue on MySite SharePoint 2007 Prompt for Credentials When Accessing FQDN Sites From a Windows Vista or Windows 7 Computer SharePoint 2010 找回丢失的Social Collaboration Web Parts SharePoint 客户端经常弹出Windows验证登录框问题
How To Collect ULS Log from SharePoint Farm
努力学习的小熊 · 2015-12-11 · via 博客园 - 努力学习的小熊

2015-12-11 15:15  努力学习的小熊  阅读(682)  评论()    收藏  举报

We can use below command to collect SharePoint ULS log from all servers in the Farm in PowerShell.

Merge-SPLogFile

--------------EXAMPLE 1-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite

This example merges the last hour of log data from all farm computers with no filtering.

--------------EXAMPLE 2-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Area Search

This example merges the last hour of log data from the Search area.

--------------EXAMPLE 3-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Area "SharePoint Foundation","Web Analytics Services"

This example merges the last hour of log data from the SharePoint Foundation and Web Analytics Services areas.

--------------EXAMPLE 4-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Level High

This example merges the log data of level High or higher.

--------------EXAMPLE 5-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -StartTime "06/09/2008 16:00" - EndTime "06/09/2008 16:15"

This example merges the log data for events in a particular time range, which is culture-specific to the United States.

--------------EXAMPLE 6-----------------

Merge-SPLogFile -Path "C:\Logs\FarmMergedLog.log" -Overwrite -Message "*permission changed*"

This example merges the log data for events with permission changed in the message text.

--------------EXAMPLE 7-----------------

Merge-SPLogFile -Overwrite -Path d:\1.log -ContextFilter "name=timer job*" -Area "*search*"

This example merges the log data for all search timer jobs.

--------------EXAMPLE 8-----------------

Merge-SPLogFile -Overwrite -Path d:\2.log -ContextFilter "user=contoso?joeuser"

This example shows how to merge the log data for all user names that have a contoso\joeuser or Contoso/joeuser format.

Merge-SPLogFile -Correlation {Correlation ID} -Path D:\MergedLogs.log -StartTime "11/21/2015 13:00:00" -EndTime "11/21/2015 14:00:00"

Reference:https://technet.microsoft.com/en-us/library/ff607721.aspx