Following are the PowerShell cmdlet parameters and xml syntax for the ControlPoint Delete Site action.
PowerShell Parameters
|
Parameter |
Description |
|---|---|
|
Delete-Site |
The cmdlet name |
|
-Type |
The level of the hierarchy containing the SharePoint object(s) that will be acted on. Valid values are: §FARM §WAP §SITE §WEB |
|
-Url |
The url of the SharePoint object to act on. NOTE: For FARM, WAP, or SITE, you can use the url for any site within the scope. |
|
-IncludeChildren |
This parameter must be explicitly included in the command with a value of $true. |
|
-DeleteAll |
If -Type is FARM, this parameter must be included with a value of $true for the action to be processed. NOTE: This parameter does not apply when type is WAP, SITE, or WEB. |
|
-DoBackup (Optional) |
An indication of whether the site(s) should be backed up before deletion. Valid values are: §$true §$false NOTE: If you omit this parameter, a value of false will be assumed. |
|
-BackupSecurity (Optional) |
If -DoBackup is set to true, an indication of whether site security (which includes timestamps, security, and user information) should be backed up as well. Valid values are An indication of whether the site(s) should be backed up before deletion. Valid values are: §$true §$false NOTE: If you omit this parameter, a value of false will be assumed. |
|
-Compress (Optional) |
If -DoBackup is set to true, an indication of whether you want each site backup to be compressed into a CAB file (with a .cmp extension). Valid values are: §$true §$false NOTE: If you omit this parameter, a value of false will be assumed. |
|
-ExportPath |
If DoBackup is set to true, the directory to which you want site content to be exported. |
|
-TaskAuditPath (Optional) |
If you want to save a ControlPoint Task Audit for the action as a .pdf file, the path to the directory where you want the file to be saved. |
Delete-Site -Type WEB -url http://sbellum:8080/sites/alpha/skunkworks/ -IncludeChildren $true -DoBackup $true -BackupSecurity $true -ExportPath C:\Temp\Site_Backups
-TaskAuditPath C:\Temp\Task Audits
xml Tags
|
Tags |
Description |
|---|---|
|
<DeleteSiteContract...> |
The action to be performed |
|
<SharePointObjects> |
The container for all of the objects that you want to include in the operation. |
|
<SharePointObject> |
The container for the current object. |
|
<SPHierarchyLevel> |
The level of the hierarchy for the SharePoint object(s) that will be acted on. Valid values are: §FARM §WAP §SITE §WEB |
|
<Url> |
The url of the SharePoint object to act on. NOTE: For FARM, WAP, or SITE, you can use the url for any site within the scope. |
|
<IncludeChildren> |
For this action, the only valid value is true. |
|
<DoBackup> |
An indication of whether the site(s) should be backed up before deletion. Valid values are: §true §false |
|
<BackupSecurity> |
If DoBackup is set to true, an indication of whether site security (which includes timestamps, security, and user information) should be backed up as well. Valid values are §true §false |
|
<Compress> (Optional) |
If DoBackup is set to true, an indication of whether you want each site backup to be compressed into a CAB file (with a .cmp extension). Valid values are: §true §false |
|
<ExportPath> |
If DoBackup is set to true, an indication of whether you want each site backup to be compressed into a CAB file (with a .cmp extension). Valid values are: §true §false |
|
<TaskAuditPath> (Optional) |
If you want to save a ControlPoint Task Audit for the action as a .pdf file, the path to the directory where you want the file to be saved. |
Example xml File Contents
PowerShell Command to Run xml
Delete-Site -FilePath C:\xml\DeleteSite.xml