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

=========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. DIV+CSS兼容解决DIV最大宽度和最小宽度问题

    在制作网页中,我们经常会碰到min/max-width,min/max-height在IE6底下是无效的,这也是web设计师最头疼的问题之一,以下的方法可以解决这些难题,并且比较简约.当然,如果你还有 ...

  2. visualstudio学习

    https://docs.microsoft.com/zh-CN/visualstudio/ide/get-started-with-visual-studio

  3. keras系列︱Application中五款已训练模型、VGG16框架(Sequential式、Model式)解读(二)

    引自:http://blog.csdn.net/sinat_26917383/article/details/72859145 中文文档:http://keras-cn.readthedocs.io/ ...

  4. 主流HTML5游戏框架的分析和对比

    本文主要选取了Construct2.ImactJS.LimeJS.GameMaker.CreateJS.lycheeJS.Crafty.three.js.melonJS.Turbulenz.Quint ...

  5. android开发(36) Android WebView背景设置为透明

    xml布局 <WebView android:id="@+id/wv_content" android:layout_width="match_parent&quo ...

  6. MSSQL跨服务器查询

    1.因为此功能服务器安全配置的一部分而被关闭,所以我们先开启 reconfigure reconfigure 2.如果需要关闭,执行 reconfigure reconfigure 3.查询语句 SE ...

  7. 【嵌入式】——对#define GPBCON (*(volatile unsigned long*)0x56000010)的理解

    #define GPBCON (*(volatile unsigned long*)0x56000010) 1:volatile 当计算机需要一个数值的时候,会先把内存中的值读取到寄存器,然后下次在使 ...

  8. ansible 配置了端口在host文件但是还要走22 ip:60001 ansible_ssh_port=60001

    fatal: [101.251.194.102]: UNREACHABLE! => {"changed": false, "msg": "Fai ...

  9. 解决EasyUi中的DataGrid删除一条记录后,被删除的数据仍处于被选中状态问题

    项目中遇到这么一个问题,在easyui的datagrid中,删除一条记录成功,重新加载datagrid后,去点编辑操作,仍可把之前删除掉的那条记录进行编辑操作,正常情况应该是,删除后再去点击“编辑”, ...

  10. jdbc读取百万条数据出现内存溢出的解决办法

    本人在做项目实施时,我们使用的是mysql数据库,在不到一个月的时间已经有了2千万条数据,查询的时候非常慢,就写了一个数据迁移的小项目,将这两千万条数据存放到MongoDB中看效率怎么样,再读取数据时 ...