|
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>]] Parameters1 Parameter | Required | Type | Description |
---|
Web | True | SPWebPipeBind | 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. | Recurse | False | SwitchParameter | Recurse all Webs. | HaltOnError | False | SwitchParameter | Abort execution if an error is encountered. | Force | False | SwitchParameter | Use of the Force parameter is not supported and should only be used as a last resort. | AssignmentCollection | False | SPAssignmentCollection | 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 Parameter | Required | Type | Description |
---|
Web | True | SPWebPipeBind | 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. | List | True | SPListPipeBind | The URL to the list containing the files to reset. | HaltOnError | False | SwitchParameter | Abort execution if an error is encountered. | Force | False | SwitchParameter | Use of the Force parameter is not supported and should only be used as a last resort. | AssignmentCollection | False | SPAssignmentCollection | 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 Parameter | Required | Type | Description |
---|
Site | True | SPSitePipeBind | 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. | HaltOnError | False | SwitchParameter | Abort execution if an error is encountered. | Force | False | SwitchParameter | Use of the Force parameter is not supported and should only be used as a last resort. | AssignmentCollection | False | SPAssignmentCollection | 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 Parameter | Required | Type | Description |
---|
File | True | SPFilePipeBind | The URL to the file to reset. | HaltOnError | False | SwitchParameter | Abort execution if an error is encountered. | Force | False | SwitchParameter | Use of the Force parameter is not supported and should only be used as a last resort. | AssignmentCollection | False | SPAssignmentCollection | 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 Parameter | Required | Type | Description |
---|
WebApplication | True | SPWebApplicationPipeBind | 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. | HaltOnError | False | SwitchParameter | Abort execution if an error is encountered. | Force | False | SwitchParameter | Use of the Force parameter is not supported and should only be used as a last resort. | AssignmentCollection | False | SPAssignmentCollection | 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 DescriptionResets 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 ------------------EXAMPLE 2----------------------- PS C:\> Get-SPSite http://server_name | Reset-SPCustomizedPages ------------------EXAMPLE 3----------------------- PS C:\> Reset-SPCustomizedPages -File http://server_name/pages/default.aspx
|