zoukankan      html  css  js  c++  java
  • SharePoint场管理-PowerShell(二)

    1. 合并Log文件

    Merge-SPLogFile –Path E:LogsMergedLog.log –StartTime "1/19/2010"
    –Overwrite

    2. 结束当前的Log文件

    New-SPLogFile

    3. 查看SPD设置

    Get-SPDesignerSettings –WebApplication "SharePoint – 80"

    4. 修改SPD设置

    Set-SPDesignerSettings –WebApplication "SharePoint – 80"
    –AllowDesigner:$true –AllowMasterPageEditing:$false
    –AllowRevertFromTemplate:$false –ShowURLStructure:$true

    AllowDesigner:表示Web应用程序中的网站是否允许用SPD编辑,默认值为True,用户执行该操作必须有相应的权限。

    AllowMasterPageEditing:默认值为True,表示Web应用程序中网站的母版页和页面布局是否可以用SPD编辑。

    AllowRevertFromTemplate:表示是否可以使用SPD将网站页面从网站定义中分离,默认值为Ture。

    ShowURLStructure:表示Web应用程序的URL结构是否可以修改,默认值为True。

    5. 查看工作流配置

    Get-SPWorkflowConfig –WebApplication "SharePoint – 80"

    查看Web应用程序的工作流配置

    Get-SPWorkflowConfig –SiteCollection http://sp2010

    查看网站集的工作流配置

    6. 修改工作流配置

    Set-SPWorkflowConfig –WebApplication "SharePoint – 80"
    –DeclarativeWorkflowsEnabled:$true
    –EmailNoPermissionParticipantsEnabled:$false
    –SendDocumentToExternalParticipants:$false

    修改Web应用程序的工作流配置

    Set-SPWorkflowConfig –SiteCollection "http://sp2010"
    –DeclarativeWorkflowsEnabled:$true
    –EmailNoPermissionParticipantsEnabled:$false
    –SendDocumentToExternalParticipants:$false

    修改网站集的工作流配置

    DeclarativeWorkflowEnabled:表示用户是否可以通过部署的托管代码定义工作流,默认值为True。

    EmailNoPermissionParticipantsEnabled:表示当一个任务指派给一个没有网站权限的用户时,他是否会收到邮件,默认值为True。

    SendDocumentToExternalParticipants:表示外部用户是否收到工作流文档的副本,默认值为False。

    7. 获取TimerJob信息

    Get-SPTimerJob

    8. 获取指定的TimerJob

    $timerJob = Get-SPTimerJob -Identity "DocIDEnable"

    9. 启用一个TimerJob

    $timerJob = Get-SPTimerJob -Identity "DocIDEnable"
    Enable-SPTimerJob $timerJob

    10. 禁用一个TimerJob

    $timerJob = Get-SPTimerJob -Identity "DocIDEnable"
    Disable-SPTimerJob $timerJob

    11. 启动一个TimerJob

    $timerJob = Get-SPTimerJob -Identity "DocIDEnable"
    Start-SPTimerJob $timerJob

    12. 设置TimerJob的时间表

    $timerJob = Get-SPTimerJob -Identity "DocIDEnable"
    Set-SPTimerJob –Identity $timerJob –Schedule "Daily at 18:00:00"

    Schedule:该参数是一个字符串,但是必须满足以下格式

    Every X minutes between 0 and 59.  
    Hourly between 0 and 59.  
    Daily at hh:mm:ss.  
    Weekly between <day> hh:mm:ss and <day> hh:mm:ss. (<day> is the three letter day of the week: Sun, Mon, Tue, Wed, Thu, Fri, or Sat.)  
    Monthly at dd hh:mm:ss.  
    Yearly at <month> dd hh:mm:ss. (<month> is the three letter month: Jan, Feb, Mar, and so on.)

  • 相关阅读:
    线程状态
    线程的两种实现方式
    设计模式
    移动端适配总结(补充一个移动端touch案例)
    echart.js组件编写
    vuex,文件夹整理
    rem初始化
    PC初始化
    移动端初始化
    三角形实现原理
  • 原文地址:https://www.cnblogs.com/dyllove98/p/3149540.html
Copyright © 2011-2022 走看看