当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 在 SharePoint 2016 中使用 PowerShell 删除 Web 应用程序

作者:精品下载站 日期:2024-12-14 14:01:46 浏览:14 分类:玩电脑

在 SharePoint 2016 中使用 PowerShell 删除 Web 应用程序


要使用 PowerShell 删除 SharePoint Web 应用程序,请使用以下 cmdlet:Remove-SPWebApplication

如何删除 Web 应用程序及其所有区域?


#Web Application URL to delete
$WebAppURL="https://sharepoint.company.com"

#sharepoint 2013 powershell delete web application
Remove-SPWebApplication -identity $WebAppURL -Confirm

这将删除整个 Web 应用程序及其所有区域:

删除 Web 应用程序及其所有数据库和 IIS 网站:

要删除 Web 应用程序及其内容数据库和 IIS 网站,请使用以下开关:-DeleteIISSite-删除内容数据库


#Web Application URL to delete
$WebAppURL="https://sharepoint.company.com" 

#Remove the web application and its databases & IIS Web Application
Remove-SPWebApplication -identity $WebAppURL -Confirm -DeleteIISSite -RemoveContentDatabases

[玩转系统] 在 SharePoint 2016 中使用 PowerShell 删除 Web 应用程序

删除扩展 Web 应用程序区域:

要删除扩展 Web 应用程序区域(例如“Internet”),请使用:


#Web Application URL to delete
$WebAppURL="https://sharepoint.company.com" 

#sharepoint 2013 powershell delete web app
Get-SPWebApplication https://sitename | Remove-SPWebApplication -Zone "Internet" -Confirm
确保您以具有“Shell 访问”权限的“场管理员”身份登录,以使用 PowerShell 删除 Web 应用程序

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯