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

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - sumh

用Openxml获取本地文件的扩展信息 用PowerShell批量删除未部署的wsp包 用PowerShell批量部署wsp包 WSS3.0升级到Foundation 2010 PowerShell 操作bcs PowerShell搜索元数据 开发,部署,监视SharePoint 2010的沙盒解决方案 修改MOSS的RTF字段的上传图片功能 高权限的工作流 可重用声明性工作流 站点工作流 工作流事件 可插接式的工作流服务 sharepoint 2010 beta Workflow WF4的新功能 介绍WF4 用Aspx页面做流程表单的一些感想 创建网站集的内容类型 创建Infopath表单数据源的详细步骤图解
用PowerShell批量收回wsp包
sumh · 2011-07-26 · via 博客园 - sumh

提供wsp部署的参数:$wspnames:路径下的所有wsp文件名用逗号隔开,如“sumhtestwsp.wsp,sumhtestwsp123.wsp,sumhtestwsp456.wsp,sumhtestwsp789.wsp”

方法:

function recoverWSP([string] $wspnames)

{

$PSSnapinSharePoin = Get-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction silentlycontinue

if( $PSSnapinSharePoin -eq $Null)

{

Add-PSSnapin Microsoft.SharePoint.PowerShell;

}

foreach($wspname in $wspnames.split(','))

{

$gspsolution = Get-SPSolution -Identity $wspname

if($gspsolution -ne $null)

{

if($gspsolution.Deployed)

{

Uninstall-SPSolution -AllWebApplications -Identity $wspname

}

}

}

}

例如:

recoverWSP -wspnames  "sumhtestwsp.wsp,sumhtestwsp123.wsp,sumhtestwsp456.wsp"