Reset-SPCustomizedPages

Resets customized (unghosted) pages to their site definition.

Reset-SPCustomizedPages -Web <SPWebPipeBind> [-Recurse [<SwitchParameter>]] [-HaltOnError [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-AssignmentCollection [<SPAssignmentCollection>]]

Reset-SPCustomizedPages -Web <SPWebPipeBind> -List <SPListPipeBind> [-HaltOnError [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-AssignmentCollection [<SPAssignmentCollection>]]

Reset-SPCustomizedPages -Site <SPSitePipeBind> [-HaltOnError [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-AssignmentCollection [<SPAssignmentCollection>]]

Reset-SPCustomizedPages -File <SPFilePipeBind> [-HaltOnError [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-AssignmentCollection [<SPAssignmentCollection>]]

Reset-SPCustomizedPages -WebApplication <SPWebApplicationPipeBind> [-HaltOnError [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-AssignmentCollection [<SPAssignmentCollection>]]

Parameters

1

ParameterRequiredTypeDescription
WebTrueSPWebPipeBind

Specifies the URL or GUID of the Web containing the pages to reset.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of Microsoft SharePoint Foundation 2010 Web site (for example, MySPSite1); or an instance of a valid SPWeb object.

RecurseFalseSwitchParameter

Recurse all Webs.

HaltOnErrorFalseSwitchParameter

Abort execution if an error is encountered.

ForceFalseSwitchParameter

Use of the Force parameter is not supported and should only be used as a last resort.

AssignmentCollectionFalseSPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

2

ParameterRequiredTypeDescription
WebTrueSPWebPipeBind

Specifies the URL or GUID of the Web containing the pages to reset.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of Microsoft SharePoint Foundation 2010 Web site (for example, MySPSite1); or an instance of a valid SPWeb object.

ListTrueSPListPipeBind

The URL to the list containing the files to reset.

HaltOnErrorFalseSwitchParameter

Abort execution if an error is encountered.

ForceFalseSwitchParameter

Use of the Force parameter is not supported and should only be used as a last resort.

AssignmentCollectionFalseSPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

3

ParameterRequiredTypeDescription
SiteTrueSPSitePipeBind

The site containing the pages to reset. All sub-webs will be iterated through.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

HaltOnErrorFalseSwitchParameter

Abort execution if an error is encountered.

ForceFalseSwitchParameter

Use of the Force parameter is not supported and should only be used as a last resort.

AssignmentCollectionFalseSPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

4

ParameterRequiredTypeDescription
FileTrueSPFilePipeBind

The URL to the file to reset.

HaltOnErrorFalseSwitchParameter

Abort execution if an error is encountered.

ForceFalseSwitchParameter

Use of the Force parameter is not supported and should only be used as a last resort.

AssignmentCollectionFalseSPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

5

ParameterRequiredTypeDescription
WebApplicationTrueSPWebApplicationPipeBind

The web application containing the files to reset.

The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.

HaltOnErrorFalseSwitchParameter

Abort execution if an error is encountered.

ForceFalseSwitchParameter

Use of the Force parameter is not supported and should only be used as a last resort.

AssignmentCollectionFalseSPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Detailed Description

Resets customized (unghosted) pages to their site definition.

Copyright 2016 Falchion Consulting, LLC

> For more information on this cmdlet and others:

> http://blog.falchionconsulting.com/

> Use of this cmdlet is at your own risk.

> Gary Lapointe assumes no liability.

Examples

------------------EXAMPLE 1-----------------------

PS C:\> Get-SPWeb http://server_name | Reset-SPCustomizedPages

This example resets all unghosted pages in http://server_name without updating any child webs.

------------------EXAMPLE 2-----------------------

PS C:\> Get-SPSite http://server_name | Reset-SPCustomizedPages

This example resets all unghosted pages in http://server_name including all child webs.

------------------EXAMPLE 3-----------------------

PS C:\> Reset-SPCustomizedPages -File http://server_name/pages/default.aspx

This example resets the unghosted page http://server_name/pages/default.aspx.