内容仅供参考,需结合实际需求来处理。

=========SharePoint 环境下运行ps1文件,ps1内容如下=======

 Set-ExecutionPolicy ByPass
Add-PSSnapin Microsoft.SharePoint.PowerShell Add-SPSolution -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_Lib.wsp"
Add-SPSolution -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_FilterOfStaffList.wsp"
Add-SPSolution -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_Lookup_ListRelation.wsp" Install-SPSolution -Identity Custom_Lib.wsp -WebApplication http://win2012sp2013:1000/
Install-SPSolution -Identity Custom_WP_FilterOfStaffList.wsp -WebApplication http://win2012sp2013:1000/
Install-SPSolution -Identity Custom_Lookup_ListRelation.wsp -WebApplication http://win2012sp2013:1000/ Update-SPSolution -Identity Custom_ContentType.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_ContentType.wsp" -GACDeployment
Update-SPSolution -Identity Custom_RB_StaffList.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_RB_StaffList.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_RBPermissionOfStaffList.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_RBPermissionOfStaffList.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_SearchStaffList.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_SearchStaffList.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_SeatingPlan.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_SeatingPlan.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_StaffSearch.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_StaffSearch.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_IconandSloganbanner.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_IconandSloganbanner.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_NewAndEvent.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_NewAndEvent.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_DocumentSharing.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_DocumentSharing.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_TrainingCenter.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_TrainingCenter.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_ImageBanner.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_ImageBanner.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_OnlineSurvey.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_OnlineSurvey.wsp" -GACDeployment
Update-SPSolution -Identity Custom_WP_NewsArticles.wsp -LiteralPath "C:\Deploy_2013-08-21_v2.2\WSP\Custom_WP_NewsArticles.wsp" -GACDeployment

另外有用的语句:

 Uninstall-SPSolution –Identity Clone_List_Scheduler.wsp
Remove-SPSolution -Identity Clone_List_Scheduler.wsp
 

使用Windows Powershell ISE 64位,附加SharePoint环境的dll
 write-host
write-host "Loading PowerShell environment for SharePoint" -foregroundcolor Green
write-host
# unload & load the sharepoint powershell snapin
$snapin = Get-PSSnapin | where-object { $_.Name -eq 'Microsoft.SharePoint.PowerShell' }
if ($snapin -ne $null){
write-host "Unloading SharePoint PowerShell Snapin..." -foregroundcolor Blue
remove-pssnapin "Microsoft.SharePoint.PowerShell"
write-host "SharePoint PowerShell Snapin unloaded." -foregroundcolor Green
}
$snapin = Get-PSSnapin | where-object { $_.Name -eq 'Microsoft.SharePoint.PowerShell' }
if ($snapin -eq $null){
write-host "Loading SharePoint PowerShell Snapin..." -foregroundcolor Blue
add-pssnapin "Microsoft.SharePoint.PowerShell"
write-host "SharePoint PowerShell Snapin loaded." -foregroundcolor Green
}

SharePoint PowerShell部署开发好的WebPart到服务器上的更多相关文章

  1. SharePoint 2013 图文开发系列之WebPart

    这是我们介绍SharePoint开发入门的第一篇,在这一篇里,我们会介绍SharePoint开发的几个关键物理路径,一些开发技巧和最基础的WebPart开发. 开发工具 在SharePoint 201 ...

  2. odoo开发笔记 -- 单台物理服务器上,利用docker部署多套odoo应用

    部署结构: 待更新! ----服务器硬件配置: 操作系统:ubuntu16.04-64bit CPU/内存:4核8G 1. 基础环境安装 nginx离线安装: docker环境安装: 2. 官方容器镜 ...

  3. VS2013开发 windows服务 挂到服务器上执行

    这是百度经验的链接,本人主要参考的他.http://jingyan.baidu.com/article/cd4c2979e9330d756f6e6070.html 1 创建windows服务项目 2 ...

  4. SharePoint 2013 图文开发系列之入门教程

    做了SharePoint有三年了,大家经常会问到,你的SharePoint是怎么学的,想想自己的水平,也不过是初级开发罢了.因为,SharePoint开发需要接触的东西太多了,Windows操作系统. ...

  5. SharePoint PowerShell 修改母版页

    前言 最近在群里帮忙回答问题,碰到这么一个尴尬的问题,有人创建了一个新母版页,然后引用了新的母版页,不知道怎么的母版页有问题了,再也进不去站点了,希望修改回旧的母版页. 看到问题,想了一下,其实两种方 ...

  6. Windows 上安装 Azure PowerShell及Azure PowerShell部署虚拟机

    一.Azure PowerShell部署   1.使用 PowerShellGet 在 Windows 上安装 Azure PowerShell 从 Azure PowerShell 版本 6.0 开 ...

  7. SharePoint PowerShell 批量删除遗弃视图

    前言 最近,给SharePoint升级了,然后发现,有一大批视图不需要了,而且,名字是一样的,想着怎么清理,然后,就想到了powershell. powershell 示例: $siteUrl = & ...

  8. 服务器上传大小限制 --- 来自 FastAdmin 项目开发的引发的问题 (TODO)

    服务器上传大小限制 --- 来自 FastAdmin 项目开发的引发的问题 服务器上传有几个地方修改. FastAdmin 的配置. php.ini 的配置. NGINX 的配置.

  9. centos 服务器上部署 xxl-job 通过 feign 访问 eureka 上注册的 service timeout

    部署方式 1.使用 jar 包部署 出现的问题 1.通过 feign 调用其他服务,出现超时的问题,该问题不是 ribbon.hystrix 没有配置导致的超时,经过测试,即使配置了也没有作用,该方法 ...

随机推荐

  1. jQuery 学习笔记1 弹出一个对话框

    这里推荐使用sublime text 2来写,外加zen coding. 首先是写html 只需要html:xt,然后tab就可以得到一个html的完整结构. <!DOCTYPE html PU ...

  2. 【转】jdbc:oracle:thin:@192.168.3.98:1521:orcl(详解)

    整理自互联网 一. jdbc:oracle:thin:@192.168.3.98:1521:orcljdbc:表示采用jdbc方式连接数据库oracle:表示连接的是oracle数据库thin:表示连 ...

  3. spring mvc之请求过程源码分析

    简介 上一篇,我们分析了spring mvc启动过程的源码,这一节,来一起分析下在用户请求controller的过程中,spring mvc做了什么事? 一.准备 我写这么一个controller p ...

  4. java jar包与配置文件的写法

    一个普通的java project,里面引用了config.properties配置文件,将项目打成Runnable jar,然后将config.properties放到打包后的jar路径下,执行该j ...

  5. swift-Xcode7.x(7.1,7.2,7.3)新建playground运行不能运行

    swift-Xcode7.xhtml, body {overflow-x: initial !important;}.CodeMirror { height: auto; } .CodeMirror- ...

  6. select 操作选中添加、删除操作Javascript

    //添加选中项 function addItem() { var myMember = document.getElementById("myMember"); var other ...

  7. am335x 配置 GPIO 为可输入也可输出

    主要配置设备树如下模式即可 0x1AC (PIN_INPUT_PULLUP | MUX_MODE7)

  8. PostgreSQL学习手册(数据表)<转>

    一.表的定义: 对于任何一种关系型数据库而言,表都是数据存储的最核心.最基础的对象单元.现在就让我们从这里起步吧.    1. 创建表:    CREATE TABLE products (      ...

  9. centos5中添加163yum源

    1.我们用linux系统的时候,经常需要使用yum.但是如果使用系统自带的yum源时,往往速度很慢,而且经常容易出错.其实国内有很多优秀的开源的yum源.比如(163,sohu,中科大).这里我以16 ...

  10. 【C】——使用creat()函数需要注意的事项

    #include<fcntl.h> int creat(const char *pathname, mode_t mode); 若成功则返回为只写打开的文件描述符,若出错则返回-1: 有时 ...