Get-SPWordConversionJobStatus
Word Automation
Retrieves the conversion job status details.
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.
Get
SPWordConversionJobStatus
1.0.0.0
Retrieves the conversion job status details.
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.
Get-SPWordConversionJobStatus
Job
SPWordConversionJobPipeBind
AssignmentCollection
SPAssignmentCollection
Job
The conversion job whose status should be retrieved.
SPWordConversionJobPipeBind
SPWordConversionJobPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPWordConversionJobStatus -detailed". For technical information, type "Get-Help Get-SPWordConversionJobStatus -full".
------------------EXAMPLE------------------
PS C:\> $job = New-SPWordConversionJob -InputList "http://server_name/WordDocs" -OutputList "http://server_name/PDFDocs" -OutputFormt PDF -OutputSaveBehavior AppendIfPossible
PS C:\> Get-SPWordConversionJobStatus $job
This example converts the documents located in http://server_name/WordDocs and stores the converted items in http://server_name/PDFDocs and then outputs the jobs status.
New-SPWordConversionJob
New-SPWordConversionJob
Word Automation
Creates a new conversion job to convert one or more documents from one format to another.
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.
New
SPWordConversionJob
1.0.0.0
Creates a new conversion job to convert one or more documents from one format to another. This cmdlet leverages the Word Automation Service to do the conversion. Using Word Automation Services, you can convert from Open XML WordprocessingML to other document formats. For example, you may want to convert many documents to the PDF format and spool them to a printer or send them by e-mail to your customers. Or, you can convert from other document formats (such as HTML or Word 97-2003 binary documents) to Open XML word-processing documents. By default the timer job that does the conversions is schedule to run every 15 minutes - you can change this by editing the "Word Automation Services Timer Job" timer job (or manually tell it to run immediately). If you specified the Wait parameter then it may take up to 15 minutes to respond if you have not changed this default.
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.
New-SPWordConversionJob
InputList
SPListPipeBind
OutputList
SPListPipeBind
OutputFormat
Automatic | Document | DocumentMacroEnabled | Document97 | Template | TemplateMacroEnabled | Template97 | MHTML | PDF | RTF | XML | XPS | DocumentStrict
OutputSaveBehavior
AppendIfPossible | AlwaysOverwrite | AppendOnly | NeverOverwrite
CompatibilityMode
MaintainCurrentSetting | Word2003 | Word2007 | Word2010 | Word2013 | Current
AddThumbnail
SwitchParameter
UpdateFields
SwitchParameter
EmbedFonts
SwitchParameter
MarkupView
Comments | Ink | Text | Formatting
RevisionState
Final | Original | FinalShowingMarkup | OriginalShowingMarkup
SubsetEmbeddedFonts
SwitchParameter
Wait
SwitchParameter
AssignmentCollection
SPAssignmentCollection
New-SPWordConversionJob
InputFile
SPFilePipeBind
OutputFile
String
OutputFormat
Automatic | Document | DocumentMacroEnabled | Document97 | Template | TemplateMacroEnabled | Template97 | MHTML | PDF | RTF | XML | XPS | DocumentStrict
OutputSaveBehavior
AppendIfPossible | AlwaysOverwrite | AppendOnly | NeverOverwrite
CompatibilityMode
MaintainCurrentSetting | Word2003 | Word2007 | Word2010 | Word2013 | Current
AddThumbnail
SwitchParameter
UpdateFields
SwitchParameter
EmbedFonts
SwitchParameter
MarkupView
Comments | Ink | Text | Formatting
RevisionState
Final | Original | FinalShowingMarkup | OriginalShowingMarkup
SubsetEmbeddedFonts
SwitchParameter
Wait
SwitchParameter
AssignmentCollection
SPAssignmentCollection
New-SPWordConversionJob
InputFolder
SPFolderPipeBind
OutputFolder
SPFolderPipeBind
Recurse
SwitchParameter
OutputFormat
Automatic | Document | DocumentMacroEnabled | Document97 | Template | TemplateMacroEnabled | Template97 | MHTML | PDF | RTF | XML | XPS | DocumentStrict
OutputSaveBehavior
AppendIfPossible | AlwaysOverwrite | AppendOnly | NeverOverwrite
CompatibilityMode
MaintainCurrentSetting | Word2003 | Word2007 | Word2010 | Word2013 | Current
AddThumbnail
SwitchParameter
UpdateFields
SwitchParameter
EmbedFonts
SwitchParameter
MarkupView
Comments | Ink | Text | Formatting
RevisionState
Final | Original | FinalShowingMarkup | OriginalShowingMarkup
SubsetEmbeddedFonts
SwitchParameter
Wait
SwitchParameter
AssignmentCollection
SPAssignmentCollection
InputList
The input library whose items will be converted and copied to the output list.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
OutputList
The output library where the converted items will be stored.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
InputFile
The input file that will be converted and copied to the output file.
The value must be a valid URL in the form http://server_name
SPFilePipeBind
SPFilePipeBind
OutputFile
The output file where the converted item will be copied to.
The value must be a valid URL in the form http://server_name
String
String
InputFolder
The input library folder whose items will be converted and copied to the output list.
The value must be a valid URL in the form http://server_name
SPFolderPipeBind
SPFolderPipeBind
OutputFolder
The output library folder where the converted items will be stored.
The value must be a valid URL in the form http://server_name
SPFolderPipeBind
SPFolderPipeBind
Recurse
Recursively convert all items in the folder's sub-folders.
SwitchParameter
SwitchParameter
OutputFormat
Specifies the Save format for this conversion job. The extension associated with the Save format specified here is appended to the output file if the extension is not already present. For example, when converting to PDF, a document with the output file name http://contoso/output/output.pdf would remain unchanged; a document with the output file name http://contoso/output/output.docx would be changed to http://contoso/output/output.docx.pdf.
SaveFormat
SaveFormat
OutputSaveBehavior
Specifies the behavior that should be applied when saving converted files to existing file names.
SaveBehavior
SaveBehavior
CompatibilityMode
Specifies the appropriate compatibility mode for the output file. If the file is not an Open XML File format document, this setting is ignored. MaintainCurrentSetting specifies that files maintain their compatibility mode as follows:
• Binary files and files in Word 97-2003 compatibility mode stay in that mode.
• Word 2007 documents or documents in Word 2007 compatibility mode stay in that mode.
• Documents upgraded to Word 2010 stay upgraded.
CompatibilityMode
CompatibilityMode
AddThumbnail
Indicates whether the document is saved with an added thumbnail. Setting this property has the same effect as checking Save Thumbnail in the Save As dialog in Word.
SwitchParameter
SwitchParameter
UpdateFields
Indicates whether any fields in the document are automatically updated when the document is opened.
SwitchParameter
SwitchParameter
EmbedFonts
Indicates whether fonts used within the document are obfuscated and saved within the output. This setting uses the same obfuscation mechanisms as Word.
SwitchParameter
SwitchParameter
MarkupView
Specifies the type(s) of markup that should be shown in the document.The possible values for this property correspond to the options available on the ribbon (Tracking group, Show Markup dropdown). The default value for this property is @(Comments, Ink, Text, Formatting), which means all types of markup are shown.
MarkupTypes
MarkupTypes
RevisionState
Specifies the visibility of revisions in the document.
RevisionState
RevisionState
SubsetEmbeddedFonts
Indicates whether to restrict the characters that are included in the embedded font to only those characters that are required by the current document.
SwitchParameter
SwitchParameter
Wait
If specified then the cmdlet will block until the conversion completes.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPWordConversionJob -detailed". For technical information, type "Get-Help New-SPWordConversionJob -full".
------------------EXAMPLE 1-----------------------
PS C:\> New-SPWordConversionJob -InputList "http://server_name/WordDocs" -OutputList "http://server_name/PDFDocs" -OutputFormt PDF -OutputSaveBehavior AppendIfPossible -Wait
This example converts the documents located in http://server_name/WordDocs and stores the converted items in http://server_name/PDFDocs.
------------------EXAMPLE 2-----------------------
PS C:\> New-SPWordConversionJob -InputFile "http://server_name/WordDocs/report.docx" -OutputFile "http://server_name/PDFDocs/report.pdf" -OutputFormt PDF -OutputSaveBehavior AppendIfPossible -Wait
This example converts the document located in http://server_name/WordDocs/report.docx and stores the converted item as http://server_name/PDFDocs/report.pdf.
------------------EXAMPLE 3-----------------------
PS C:\> New-SPWordConversionJob -InputFolder "http://server_name/WordDocs/Reports" -OutputFolder "http://server_name/PDFDocs/Reports" -OutputFormt PDF -OutputSaveBehavior AppendIfPossible -Wait
This example converts the document located in http://server_name/WordDocs/Reports and stores the converted items in http://server_name/PDFDocs/Reports.
Get-SPList
Get-SPWordConversionJobStatus
Add-SPListViewWebPart
Web Parts
Adds an XSLT List View Web Part to the specified web part page.
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.
Add
SPListViewWebPart
1.0.0.0
Adds an XSLT List View Web Part to the specified web part page.
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.
Add-SPListViewWebPart
Manager
SPLimitedWebPartManagerPipeBind
Zone
String
ZoneIndex
Int32
List
SPListPipeBind
Web
SPWebPipeBind
WebPartTitle
String
ViewTitle
String
Publish
SwitchParameter
LinkTitle
SwitchParameter
JSLink
String
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Add-SPListViewWebPart
Manager
SPLimitedWebPartManagerPipeBind
Row
Int32
Column
Int32
AddSpace
SwitchParameter
List
SPListPipeBind
Web
SPWebPipeBind
WebPartTitle
String
ViewTitle
String
Publish
SwitchParameter
LinkTitle
SwitchParameter
JSLink
String
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Add-SPListViewWebPart
File
SPFilePipeBind
Zone
String
ZoneIndex
Int32
List
SPListPipeBind
Web
SPWebPipeBind
WebPartTitle
String
ViewTitle
String
Publish
SwitchParameter
LinkTitle
SwitchParameter
JSLink
String
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Add-SPListViewWebPart
File
SPFilePipeBind
Row
Int32
Column
Int32
AddSpace
SwitchParameter
List
SPListPipeBind
Web
SPWebPipeBind
WebPartTitle
String
ViewTitle
String
Publish
SwitchParameter
LinkTitle
SwitchParameter
JSLink
String
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Manager
The URL to a web part page or an instance of an SPLimitedWebPartManager object.
SPLimitedWebPartManagerPipeBind
SPLimitedWebPartManagerPipeBind
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
List
The list to whose view will be added to the page.
The value must be a valid URL in the form http://server_name/lists/listname or /lists/listname. If a server relative URL is provided then the Web parameter must be provided.
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the list whose view will be added to the page.
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.
SPWebPipeBind
SPWebPipeBind
WebPartTitle
The title to set the web part to. The list title will be used if not provided.
String
String
Zone
The name of the web part zone to add the list view web part to.
String
String
ZoneIndex
The index within the web part zone to add the list view web part to.
Int32
Int32
ViewTitle
The name of the view to use for the list view web part.
String
String
Publish
If specified, the page will be published after adding the list view web part.
SwitchParameter
SwitchParameter
LinkTitle
If specified, the web part title will link back to the default view for the list.
SwitchParameter
SwitchParameter
Row
The zone to add the web part to.
Int32
Int32
Column
The zone index to add the web part to.
Int32
Int32
AddSpace
Add some space before the web part.
SwitchParameter
SwitchParameter
JSLink
Set a specific JSLink file.
String
String
ChromeType
The chrome settings for the web part.
PartChromeType
PartChromeType
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Add-SPListViewWebPart -detailed". For technical information, type "Get-Help Add-SPListViewWebPart -full".
------------------EXAMPLE 1-----------------------
PS C:\> Add-SPListViewWebPart -File "http://portal/pages/default.aspx" -List http://portal/Lists/News -WebPartTitle "News" -ViewTitle "All Items" -Zone "Left" -ZoneIndex 0 -Publish
This example adds a news list view web part to the page http://portal/pages/default.aspx.
------------------EXAMPLE 2-----------------------
PS C:\> Add-SPListViewWebPart -File "http://portal/sitepages/home.aspx" -List http://portal/Lists/News -WebPartTitle "News" -ViewTitle "All Items" -Row "1" -Column 1 -AddSpace -Publish
This example adds a news list view web part to the wiki page http://portal/sitepages/home.aspx.
Get-SPLimitedWebPartManager
Get-SPPublishingPage
Get-SPFile
Copy-SPWebPart
Web Parts
Copies a web part from one file to another file.
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.
Copy
SPWebPart
1.0.0.0
Copies a web part from one file to another file.
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.
Copy-SPWebPart
WebPartId
String
SourceFile
SPFilePipeBind
TargetFile
SPFilePipeBind
Publish
SwitchParameter
Zone
String
ZoneIndex
Int32
AssignmentCollection
SPAssignmentCollection
Copy-SPWebPart
WebPartTitle
String
SourceFile
SPFilePipeBind
TargetFile
SPFilePipeBind
Publish
SwitchParameter
Zone
String
ZoneIndex
Int32
AssignmentCollection
SPAssignmentCollection
WebPartId
The ID of the Web Part to copy.
String
String
WebPartTitle
The title of the Web Part to copy.
String
String
SourceFile
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
TargetFile
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
Publish
If specified the target page will be published after copying the Web Part.
SwitchParameter
SwitchParameter
Zone
The name of the web part zone to copy the web part to.
String
String
ZoneIndex
The index within the web part zone to copy the web part to.
Nullable`1
Nullable`1
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Copy-SPWebPart -detailed". For technical information, type "Get-Help Copy-SPWebPart -full".
------------------EXAMPLE------------------
PS C:\> Copy-SPWebPart -SourceFile "http://server_name/pages/default.aspx" -TargetFile "http://server_name/pages/test.aspx" -WebPartTitle "My Web Part" -Publish
This example replaces all instances of the web part who's class name is ContentByQueryWebPart with the web part who's class name is MyContentByQueryWebPart.
Get-SPFile
Get-SPLimitedWebPartManager
Web Parts
Retrieves an SPLimitedWebPartManager object used for managing web parts on a page.
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.
Get
SPLimitedWebPartManager
1.0.0.0
Retrieves an SPLimitedWebPartManager object used for managing web parts on a page.
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.
Get-SPLimitedWebPartManager
Identity
SPLimitedWebPartManagerPipeBind
AssignmentCollection
SPAssignmentCollection
Identity
The URL to a web part page or an instance of an SPLimitedWebPartManager object.
SPLimitedWebPartManagerPipeBind
SPLimitedWebPartManagerPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPLimitedWebPartManager -detailed". For technical information, type "Get-Help Get-SPLimitedWebPartManager -full".
------------------EXAMPLE------------------
PS C:\> Start-SPAssignment -Global
PS C:\> $mgr = Get-SPLimitedWebPartManager "http://portal/pages/default.aspx"
PS C:\> Stop-SPAssignment -Global
This exmple retrieves the SPLimitedWebPartManager associated with http://portal/pages/default.aspx.
Get-SPPublishingPage
Get-SPFile
Get-SPWebPartList
Web Parts
Retrieves a listing of web parts on a page in XML format.
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.
Get
SPWebPartList
1.0.0.0
Retrieves a listing of web parts on a page in XML format.
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.
Get-SPWebPartList
Manager
SPLimitedWebPartManagerPipeBind
Minimal
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Get-SPWebPartList
File
SPFilePipeBind
Minimal
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Manager
The URL to a web part page or an instance of an SPLimitedWebPartManager object.
SPLimitedWebPartManagerPipeBind
SPLimitedWebPartManagerPipeBind
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
Minimal
Retrieves a minimal XML listing of the web parts on the page.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPWebPartList -detailed". For technical information, type "Get-Help Get-SPWebPartList -full".
------------------EXAMPLE 1-----------------------
PS C:\> $xml = Get-SPWebPartList -File "http://portal/pages/default.aspx"
This example retrieves a listing of web parts associated with the page http://portal/pages/default.aspx.
------------------EXAMPLE 2-----------------------
PS C:\> $xml = Get-SPLimitedWebPartManager "http://portal/pages/default.aspx" | Get-SPWebPartList
This example retrieves a listing of web parts associated with the page http://portal/pages/default.aspx.
Get-SPLimitedWebPartManager
Get-SPPublishingPage
Get-SPFile
Import-SPWebPart
Web Parts
Imports a web part to a page.
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.
Import
SPWebPart
1.0.0.0
Imports a web part to a page.
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.
Import-SPWebPart
Manager
SPLimitedWebPartManagerPipeBind
Zone
String
ZoneIndex
Int32
DeleteExisting
SwitchParameter
CustomReplaceText
PropertiesPipeBind
Identity
XmlDocumentPipeBind
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
Manager
SPLimitedWebPartManagerPipeBind
Row
Int32
Column
Int32
AddSpace
SwitchParameter
CustomReplaceText
PropertiesPipeBind
Identity
XmlDocumentPipeBind
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
Manager
SPLimitedWebPartManagerPipeBind
Zone
String
ZoneIndex
Int32
DeleteExisting
SwitchParameter
CustomReplaceText
PropertiesPipeBind
Assembly
String
TypeName
String
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
Manager
SPLimitedWebPartManagerPipeBind
Row
Int32
Column
Int32
AddSpace
SwitchParameter
Assembly
String
TypeName
String
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
File
SPFilePipeBind
Zone
String
ZoneIndex
Int32
DeleteExisting
SwitchParameter
CustomReplaceText
PropertiesPipeBind
Identity
XmlDocumentPipeBind
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
File
SPFilePipeBind
Row
Int32
Column
Int32
AddSpace
SwitchParameter
CustomReplaceText
PropertiesPipeBind
Identity
XmlDocumentPipeBind
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
File
SPFilePipeBind
Zone
String
ZoneIndex
Int32
DeleteExisting
SwitchParameter
CustomReplaceText
PropertiesPipeBind
Assembly
String
TypeName
String
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Import-SPWebPart
File
SPFilePipeBind
Row
Int32
Column
Int32
AddSpace
SwitchParameter
Assembly
String
TypeName
String
WebPartTitle
String
Publish
SwitchParameter
ChromeType
Default | TitleAndBorder | None | TitleOnly | BorderOnly
AssignmentCollection
SPAssignmentCollection
Manager
The URL to a web part page or an instance of an SPLimitedWebPartManager object.
SPLimitedWebPartManagerPipeBind
SPLimitedWebPartManagerPipeBind
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
WebPartTitle
The title to set the web part to.
String
String
Zone
The name of the web part zone to add the web part to.
String
String
ZoneIndex
The index within the web part zone to add the web part to.
Int32
Int32
Row
The zone to add the web part to.
Int32
Int32
Column
The zone index to add the web part to.
Int32
Int32
AddSpace
Add some space before the web part.
SwitchParameter
SwitchParameter
Publish
If specified, the page will be published after importing the web part.
SwitchParameter
SwitchParameter
DeleteExisting
If specified, any existing web parts with the same name as the imported one will be deleted.
SwitchParameter
SwitchParameter
CustomReplaceText
Each key represents the name of a string to replace with the specified value.
PropertiesPipeBind
PropertiesPipeBind
Identity
The path to the web part file or a valid web part file in the form of an XmlDocument object.
XmlDocumentPipeBind
XmlDocumentPipeBind
Assembly
Specify the full name of the assembly containing the web part class to add.
String
String
TypeName
Specify the full name of the web part class to add.
String
String
ChromeType
The chrome settings for the web part.
PartChromeType
PartChromeType
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Import-SPWebPart -detailed". For technical information, type "Get-Help Import-SPWebPart -full".
------------------EXAMPLE------------------
PS C:\> Import-SPWebPart -File "http://portal/pages/default.aspx" -Identity "c:\my.webpart" -WebPartTitle "My Web part" -Zone "Left" -ZoneIndex 0 -DeleteExisting -Publish
This example adds a web part to the page http://portal/pages/default.aspx.
Get-SPLimitedWebPartManager
Get-SPPublishingPage
Get-SPFile
Move-SPWebPart
Web Parts
Moves a web part on a page.
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.
Move
SPWebPart
1.0.0.0
Moves a web part on a page.
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.
Move-SPWebPart
WebPartId
String
File
SPFilePipeBind
Zone
String
ZoneIndex
Int32
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Move-SPWebPart
WebPartTitle
String
File
SPFilePipeBind
Zone
String
ZoneIndex
Int32
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
WebPartId
The ID of the Web Part to move.
String
String
WebPartTitle
The title of the Web Part to move.
String
String
Zone
The name of the web part zone to move the web part to.
String
String
ZoneIndex
The index within the web part zone to move the web part to.
Nullable`1
Nullable`1
Publish
If specified, the page will be published after moving the web part.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Move-SPWebPart -detailed". For technical information, type "Get-Help Move-SPWebPart -full".
------------------EXAMPLE------------------
PS C:\> Move-SPWebPart -File "http://server_name/pages/default.aspx" -WebPartTitle "My CQWP" -Zone "LeftZone" -ZoneIndex 0 -Publish
This example moves the web part My CQWP to the top of the LeftZone.
Get-SPList
Get-SPFile
Get-SPWebPartList
Get-SPWeb
Get-SPSite
Replace-SPWebPartContent
Web Parts
Replaces all occurances of the search string with the replacement string. Supports the use of regular expressions. Use -WhatIf to verify your replacements before executing.
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.
Replace
SPWebPartContent
1.0.0.0
Replaces all occurances of the search string with the replacement string. Supports the use of regular expressions. Use -WhatIf to verify your replacements before executing.
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.
Replace-SPWebPartContent
Page
SPFilePipeBind
SearchString
String
ReplaceString
String
WebPartName
String
Publish
SwitchParameter
UnsafeXml
SwitchParameter
LogFile
String
AssignmentCollection
SPAssignmentCollection
Replace-SPWebPartContent
Web
SPWebPipeBind
SearchString
String
ReplaceString
String
WebPartName
String
Publish
SwitchParameter
UnsafeXml
SwitchParameter
LogFile
String
AssignmentCollection
SPAssignmentCollection
Replace-SPWebPartContent
Site
SPSitePipeBind
SearchString
String
ReplaceString
String
WebPartName
String
Publish
SwitchParameter
UnsafeXml
SwitchParameter
LogFile
String
AssignmentCollection
SPAssignmentCollection
Replace-SPWebPartContent
WebApplication
SPWebApplicationPipeBind
SearchString
String
ReplaceString
String
WebPartName
String
Publish
SwitchParameter
UnsafeXml
SwitchParameter
LogFile
String
AssignmentCollection
SPAssignmentCollection
Replace-SPWebPartContent
Farm
SPFarmPipeBind
SearchString
String
ReplaceString
String
WebPartName
String
Publish
SwitchParameter
UnsafeXml
SwitchParameter
LogFile
String
AssignmentCollection
SPAssignmentCollection
SearchString
A regular expression search string.
String
String
ReplaceString
The string to replace the match with.
String
String
WebPartName
The name of the web part to update within the scope.
String
String
Publish
Publish or check-in the file after updating the contents.
SwitchParameter
SwitchParameter
UnsafeXml
Perform a replace on XML fields without iterating through the elements of the XML (do a straight search and replace on the XML string without going through the DOM)
SwitchParameter
SwitchParameter
LogFile
The log file to store all change records to.
String
String
Page
The URL to the page containing the web parts whose content will be replaced.
SPFilePipeBind
SPFilePipeBind
Web
Specifies the URL or GUID of the Web containing the web parts whose content will be replaced.
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.
SPWebPipeBind
SPWebPipeBind
Site
The site containing the web parts whose content will be replaced.
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.
SPSitePipeBind
SPSitePipeBind
WebApplication
The web application containing the web parts whose content will be replaced.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Farm
Provide the SPFarm object to replace matching content in all web parts throughout the farm.
SPFarmPipeBind
SPFarmPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Replace-SPWebPartContent -detailed". For technical information, type "Get-Help Replace-SPWebPartContent -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://portal | Replace-SPWebPartContent -SearchString "(?i:old product name)" -ReplaceString "New Product Name" -Publish
This example does a case-insensitive search for "old product name" and replaces with "New Product Name" and publishes the changes after completion.
Get-SPLimitedWebPartManager
Get-SPWebPartList
Get-SPPublishingPage
Get-SPFile
Get-SPFarm
Get-SPWebApplication
Get-SPSite
Get-SPWeb
Replace-SPWebPartType
Web Parts
Replaces instances of one web part type with another web part type.
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.
Replace
SPWebPartType
1.0.0.0
Replaces instances of one web part type with another web part type.
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.
Replace-SPWebPartType
File
SPFilePipeBind
OldType
TypePipeBind
NewType
TypePipeBind
Title
String
Properties
Hashtable
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
OldType
The web part type to replace.
TypePipeBind
TypePipeBind
NewType
The web part type to replace the old type with.
TypePipeBind
TypePipeBind
Title
The web part title to restrict the replacement to.
String
String
Properties
Additional properties to set or override after copying the old web part properties.
Hashtable
Hashtable
Publish
If specified the page will be published after adjusting the Web Part.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Replace-SPWebPartType -detailed". For technical information, type "Get-Help Replace-SPWebPartType -full".
------------------EXAMPLE------------------
PS C:\> Replace-SPWebPartType -File "http://server_name/pages/default.aspx" -OldType "Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" -NewType "MyContentByQueryWebPart, MyCompany.SharePoint.WebParts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4ec4b9177b831752" -Publish
This example replaces all instances of the web part who's class name is ContentByQueryWebPart with the web part who's class name is MyContentByQueryWebPart.
Get-SPFile
Set-SPContentQueryWebPartTarget
Web Parts
Retargets a Content Query web part (do not provide list or site if you wish to show items from all sites in the containing site collection).
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.
Set
SPContentQueryWebPartTarget
1.0.0.0
Retargets a Content Query web part (do not provide list or site if you wish to show items from all sites in the containing site collection).
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.
Set-SPContentQueryWebPartTarget
WebPartId
String
Site
SPSitePipeBind
File
SPFilePipeBind
ListType
String
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPContentQueryWebPartTarget
WebPartId
String
List
SPListPipeBind
Web
SPWebPipeBind
File
SPFilePipeBind
ListType
String
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPContentQueryWebPartTarget
WebPartTitle
String
AllMatching
SwitchParameter
Site
SPSitePipeBind
File
SPFilePipeBind
ListType
String
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPContentQueryWebPartTarget
WebPartTitle
String
AllMatching
SwitchParameter
List
SPListPipeBind
Web
SPWebPipeBind
File
SPFilePipeBind
ListType
String
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
WebPartId
The ID of the Web Part to update.
String
String
WebPartTitle
The title of the Web Part to update.
String
String
AllMatching
If more than one Content Query Web Part is found matching the title then update all matches. If not specified then an exception is thrown.
SwitchParameter
SwitchParameter
Site
Specifies the URL or GUID of the Site to show items from.
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.
SPSitePipeBind
SPSitePipeBind
List
The list to point the CQWP to.
SPListPipeBind
SPListPipeBind
Web
The web containing the list. This parameter is required if the List parameter is a relative URL to a list.
SPWebPipeBind
SPWebPipeBind
ListType
The list type, or template, to show items from.
String
String
Publish
If specified the page will be published after adjusting the Web Part.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPContentQueryWebPartTarget -detailed". For technical information, type "Get-Help Set-SPContentQueryWebPartTarget -full".
------------------EXAMPLE------------------
PS C:\> Set-SPContentQueryWebPartTarget -List "http://server_name/lists/mylist" -File "http://server_name/pages/default.aspx" -WebPartTitle "My CQWP" -AllMatching -Publish
This example targets the web part My CQWP to the list mylist.
Get-SPList
Get-SPFile
Get-SPWebPartList
Get-SPWeb
Get-SPSite
Set-SPWebPart
Web Parts
Sets the state of the web part including adding, moving, opening, closing, deleting, or updating web part properties.
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.
Set
SPWebPart
1.0.0.0
Sets the state of the web part including adding, moving, opening, closing, deleting, or updating web part properties.
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.
Set-SPWebPart
WebPartId
String
File
SPFilePipeBind
Properties
PropertiesPipeBind
Action
Delete | Open | Close | Update
Zone
String
ZoneIndex
Int32
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPWebPart
WebPartTitle
String
File
SPFilePipeBind
Properties
PropertiesPipeBind
Action
Delete | Open | Close | Update
Zone
String
ZoneIndex
Int32
Publish
SwitchParameter
AssignmentCollection
SPAssignmentCollection
File
The URL to a web part page or an instance of an SPFile object.
SPFilePipeBind
SPFilePipeBind
WebPartId
The ID of the Web Part to update.
String
String
WebPartTitle
The title of the Web Part to update.
String
String
Properties
A hash table where each key represents the name of a property whose value should be set to the corresponding key value. Alternatively, provide the path to a file with XML property settings (<Properties><Property Name="Name1">Value1</Property><Property Name="Name2">Value2</Property></Properties>).
PropertiesPipeBind
PropertiesPipeBind
Action
Specify whether to add, close, open, delete, or update the web part.
SetWebPartStateAction
SetWebPartStateAction
Zone
The name of the web part zone to move the web part to.
String
String
ZoneIndex
The index within the web part zone to move the web part to.
Nullable`1
Nullable`1
Publish
If specified the page will be published after adjusting the Web Part.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPWebPart -detailed". For technical information, type "Get-Help Set-SPWebPart -full".
------------------EXAMPLE------------------
PS C:\> Set-SPWebPart -File "http://server_name/pages/default.aspx" -WebPartTitle "My CQWP" -Action Update -Properties @{"ItemXslLink"="/Style Library/MyXsl/ItemStyle.xsl"} -Publish
This sets the ItemXslLink property of a content query web part to point to a custom XSL file.
Get-SPList
Get-SPFile
Get-SPWebPartList
Get-SPWeb
Get-SPSite
Add-SPWebApplicationUserPolicy
Web Applications
Adds a new user policy to the specified web application.
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.
Add
SPWebApplicationUserPolicy
1.0.0.0
Adds a new user policy to the specified web application.
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.
Add-SPWebApplicationUserPolicy
User
SPUserPipeBind
Web
SPWebPipeBind
WebApplication
SPWebApplicationPipeBind
Zone
SPUrlZone[]
RoleName
String[]
AssignmentCollection
SPAssignmentCollection
Add-SPWebApplicationUserPolicy
UserLogin
String
WebApplication
SPWebApplicationPipeBind
Zone
SPUrlZone[]
RoleName
String[]
AssignmentCollection
SPAssignmentCollection
User
SPUserPipeBind
SPUserPipeBind
Web
Specifies the URL or GUID of the Web to which the user belongs.
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.
SPWebPipeBind
SPWebPipeBind
UserLogin
The user login in the form domain\user.
String
String
WebApplication
The web application to which the user policy will be added.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Zone
The zone to add the policy to. To add to all zones to not set this parameter. Valid values are "Custom", "Default", "Intranet", "Internet", "Extranet".
SPUrlZone[]
SPUrlZone[]
RoleName
The roles name(s) to assign the user to. Default values are "Full Control", "Full Read","Deny Write", and "Deny All".
String[]
String[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Add-SPWebApplicationUserPolicy -detailed". For technical information, type "Get-Help Add-SPWebApplicationUserPolicy -full".
------------------EXAMPLE------------------
PS C:\> Add-SPWebApplicationUserPolicy -WebApplication http://portal -UserLogin "user\domain" -RoleName "Full Read","Deny Write"
This example grants user\domain full read and deny write access to http://portal.
Get-SPWebApplication
Get-SPWeb
Get-SPUser
Set-SPBackConnectionHostNames
Web Applications
Sets the back connection host names on the local server or all servers in the farm. An IIS reset will be necessary after the cmdlet completes.
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.
Set
SPBackConnectionHostNames
1.0.0.0
Sets the back connection host names on the local server or all servers in the farm. An IIS reset will be necessary after the cmdlet completes.
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.
Set-SPBackConnectionHostNames
UpdateFarm
SwitchParameter
FarmCredentials
PSCredential
WebApplication
SPWebApplicationPipeBind
AssignmentCollection
SPAssignmentCollection
Set-SPBackConnectionHostNames
WebApplication
SPWebApplicationPipeBind
AssignmentCollection
SPAssignmentCollection
UpdateFarm
Update all servers in the farm.
SwitchParameter
SwitchParameter
FarmCredentials
The credentials to use on the remote servers to perform the update.
PSCredential
PSCredential
WebApplication
The web application whose URLs will be added to the set of back connection host names.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPBackConnectionHostNames -detailed". For technical information, type "Get-Help Set-SPBackConnectionHostNames -full".
------------------EXAMPLE 1-----------------------
PS C:\> Set-SPBackConnectionHostNames
This example sets the back connection host names for all web applications in the farm on the local server only.
------------------EXAMPLE 2-----------------------
PS C:\> Set-SPBackConnectionHostNames -UpdateFarm -FarmCredentials (Get-Credential)
This example sets the back connection host names for all web applications in the farm on all servers in the farm using the provided credentials.
Get-SPWebApplication
Remove-SPAllUsers
Users
Deletes all Site Collection users. Will not delete site administrators.
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.
Remove
SPAllUsers
1.0.0.0
Deletes all Site Collection users. Will not delete site administrators.
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.
Remove-SPAllUsers
Site
SPSitePipeBind
Site
Specifies the URL or GUID of the Site whose users will be deleted.
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.
SPSitePipeBind
SPSitePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Remove-SPAllUsers -detailed". For technical information, type "Get-Help Remove-SPAllUsers -full".
------------------EXAMPLE------------------
PS C:\> Remove-SPAllUsers -Site "http://demo"
This example removes all site users from the http://demo site.
Get-SPUserProfileChanges
User Profiles
Retrieves user profile property changes for the given interval and context.
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.
Get
SPUserProfileChanges
1.0.0.0
Retrieves user profile property changes for the given interval and context.
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.
Get-SPUserProfileChanges
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Interval
Int32
IncludeSingleValuePropertyChanges
SwitchParameter
IncludeMultiValuePropertyChanges
SwitchParameter
IncludeAnniversaryChanges
SwitchParameter
IncludeColleagueChanges
SwitchParameter
IncludeOrganizationMembershipChanges
SwitchParameter
IncludeDistributionListMembershipChanges
SwitchParameter
IncludePersonalizationSiteChanges
SwitchParameter
IncludeSiteMembershipChanges
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Get-SPUserProfileChanges
ContextSite
SPSitePipeBind
Interval
Int32
IncludeSingleValuePropertyChanges
SwitchParameter
IncludeMultiValuePropertyChanges
SwitchParameter
IncludeAnniversaryChanges
SwitchParameter
IncludeColleagueChanges
SwitchParameter
IncludeOrganizationMembershipChanges
SwitchParameter
IncludeDistributionListMembershipChanges
SwitchParameter
IncludePersonalizationSiteChanges
SwitchParameter
IncludeSiteMembershipChanges
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Interval
The interval, in minutes, to retrieve changes from.
Int32
Int32
UserProfileServiceApplication
Specifies the service application that contains the user profile manager to retrieve.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the user profile manager to retrieve.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
IncludeSingleValuePropertyChanges
Include single-value property changes.
SwitchParameter
SwitchParameter
IncludeMultiValuePropertyChanges
Include multi-value property changes.
SwitchParameter
SwitchParameter
IncludeAnniversaryChanges
Include anniversary property changes.
SwitchParameter
SwitchParameter
IncludeColleagueChanges
Include colleague property changes.
SwitchParameter
SwitchParameter
IncludeOrganizationMembershipChanges
Include organization membership property changes.
SwitchParameter
SwitchParameter
IncludeDistributionListMembershipChanges
Include distribution list membership property changes.
SwitchParameter
SwitchParameter
IncludePersonalizationSiteChanges
Include personalization site property changes.
SwitchParameter
SwitchParameter
IncludeSiteMembershipChanges
Include site membership property changes.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPUserProfileChanges -detailed". For technical information, type "Get-Help Get-SPUserProfileChanges -full".
------------------EXAMPLE------------------
PS C:\> Get-SPUserProfileChanges -Site "http://site/" -IncludeSingleValueProperty -IncludeMultiValueProperty
This example retrieves all single and multi-value property changes for the User Profile Application associated with the "http://site/" context.
Get-SPProfileServiceApplication
Set-SPProfilePictureUrl
User Profiles
Sets the picture URL path for user profiles. The following variables may be used for dynamic replacement: "@(username)", "@(domain)", "@(email)", "@(firstname)", "@(lastname)", "@(employeeid)".
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.
Set
SPProfilePictureUrl
1.0.0.0
Sets the picture URL path for user profiles. The following variables may be used for dynamic replacement: "@(username)", "@(domain)", "@(email)", "@(firstname)", "@(lastname)", "@(employeeid)".
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.
Set-SPProfilePictureUrl
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Username
String
Path
String
Overwrite
SwitchParameter
IgnoreMissingData
SwitchParameter
ValidateUrl
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPProfilePictureUrl
ContextSite
SPSitePipeBind
Username
String
Path
String
Overwrite
SwitchParameter
IgnoreMissingData
SwitchParameter
ValidateUrl
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPProfilePictureUrl
UserProfile
UserProfile
Path
String
Overwrite
SwitchParameter
IgnoreMissingData
SwitchParameter
ValidateUrl
SwitchParameter
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the user profiles to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the user profiles to update.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Username
The username corresponding to the user profile to update in the form domain\username.
String
String
UserProfile
The user profile to update.
UserProfile
UserProfile
Path
Path to new photo (i.e., "http://intranet/hr/EmployeePictures/@(username).jpg") - leave blank to clear.The path to the images. To substitute dynamic data use the following strings variables within the path: @(username), @(domain), @(email), @(firstname), @(lastname), @(employeeid). The variable names are case sensitive.
String
String
Overwrite
If provided then existing data values will be overwritten. If omitted then any profile objects with existing data will be ignored.
SwitchParameter
SwitchParameter
IgnoreMissingData
If specified then do not error if a specified variable value cannot be found. Note that if the value is not found then the property value will not be set.
SwitchParameter
SwitchParameter
ValidateUrl
If specified then perform a web request to see if the resultant URL is valid. If the result is not valid then the property value will be set to an empty string.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPProfilePictureUrl -detailed". For technical information, type "Get-Help Set-SPProfilePictureUrl -full".
------------------EXAMPLE------------------
PS C:\> Set-SPProfilePictureUrl -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Username "domain\username" -Path "http://intranet/hr/EmployeePictures/@(username).jpg" -Overwrite -ValidateUrl
This example sets the picture url of a user in the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
Get-SPServiceApplication
Get-SPRunningTimerJobs
Timer Jobs
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.
Get
SPRunningTimerJobs
1.0.0.0
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.
Get-SPRunningTimerJobs
Identity
SPTimerJobPipeBind
AssignmentCollection
SPAssignmentCollection
Identity
SPTimerJobPipeBind
SPTimerJobPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPRunningTimerJobs -detailed". For technical information, type "Get-Help Get-SPRunningTimerJobs -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPRunningTimerJobs | ? {((Get-Date).ToUniversalTime() - $_.StartTime).TotalHours -gt 4}
This example returns back all running timer jobs and filters to the results to show only those that have been running for more than four hours.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPTimerJob | ?{$_.Name -like {"*User Profile*"} | Get-SPRunningTimerJobs
This example returns back all running user profile timer jobs.
Get-SPTimerJob
Start-SPAdminJob2
Timer Jobs
Immediately starts any waiting administrative job on the local computer and triggers the jobs to run on all other servers in the farm if applicable.
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.
Start
SPAdminJob2
1.0.0.0
Use the Start-SPAdminJob2 cmdlet to execute all administrative timer jobs immediately rather than waiting for the timer job to run.
When the process account for the SharePoint 2010 Administration service (SPAdminV4)) is disabled (necessary in some installations for security reasons), the Start-SPAdminJob2 cmdlet triggers all administrative tasks to run immediately on all servers to allow provisioning and other administrative tasks that SPAdmin ordinarily handles.
When you run this cmdlet in person (not in script), use the Verbose parameter to see the individual administrative operations that are run.
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.
Start-SPAdminJob2
Local
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Local
Providing this parameter causes the cmdlet to behave just like the built-in Start-SPAdminJob cmdlet.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Start-SPAdminJob2 -detailed". For technical information, type "Get-Help Start-SPAdminJob2 -full".
------------------EXAMPLE------------------
PS C:\> Start-SPAdminJob2 -Verbose
This example runs all waiting administrative jobs on all servers and shows verbose output to the administrator.
Start-SPAdminJob
Reset-SPTheme
Themes
Resets a theme by applying all user specified theme configuration settings to the original source files. This is particularly helpful when the original source files have changed to a Feature upgrade.
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.
Reset
SPTheme
1.0.0.0
Resets a theme by applying all user specified theme configuration settings to the original source files. This is particularly helpful when the original source files have changed to a Feature upgrade.
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.
Reset-SPTheme
Web
SPWebPipeBind
SetSubWebsToInherit
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Reset-SPTheme
Site
SPSitePipeBind
SetSubWebsToInherit
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web containing the theme 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.
SPWebPipeBind
SPWebPipeBind
Site
The site containing the theme(s) to reset. If specified, all webs that have a unique theme will be reset.
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.
SPSitePipeBind
SPSitePipeBind
SetSubWebsToInherit
If specified, all child webs will be reset to inherit the theme of the specified web or root web.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Reset-SPTheme -detailed". For technical information, type "Get-Help Reset-SPTheme -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPWeb http://server_name/sub-web | Reset-SPTheme
This example resets the theme for the web http://server_name/sub-web.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPSite http://server_name | Reset-SPTheme -SetSubWebsToInherit
This example resets the theme for the site collection http://server_name and resets all child webs to inherit from the root web.
Get-SPWeb
Get-SPSite
Clear-SPHttpContext
Site Collections
Clears the HTTP Context. Run this cmdlet when finished with an HTTP Context created by Set-SPHttpContext.
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.
Clear
SPHttpContext
1.0.0.0
Clears the HTTP Context. Run this cmdlet when finished with an HTTP Context created by Set-SPHttpContext. The HTTP Context is cleared by setting the static System.Web.HttpContext.Current property to $null (this can be done explicitly or via this cmdlet).
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.
Clear-SPHttpContext
AssignmentCollection
SPAssignmentCollection
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Clear-SPHttpContext -detailed". For technical information, type "Get-Help Clear-SPHttpContext -full".
------------------EXAMPLE------------------
PS C:\> $web = Set-SPHttpContext "http://demo/"
PS C:\> Write-Host "do something with the web"
PS C:\> Clear-SPHttpContext
This example clears the HttpContext.
Set-SPHttpContext
ConvertTo-SPSite
Site Collections
Converts a sub-site to a site collection.
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.
ConvertTo
SPSite
1.0.0.0
Converts a sub-site to a site collection.
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.
ConvertTo-SPSite
SourceWeb
SPWebPipeBind
TargetUrl
String
OwnerLogin
String
OwnerEmail
String
SecondaryEmail
String
SecondaryOwnerLogin
String
ContentDatabase
SPContentDatabasePipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Name
String
Language
UInt32
Description
String
ExportedFile
String
NoFileCompression
SwitchParameter
SuppressAfterEvents
SwitchParameter
DeleteSource
SwitchParameter
CreateManagedPath
SwitchParameter
HaltOnWarning
SwitchParameter
HaltOnFatalError
SwitchParameter
IncludeUserSecurity
SwitchParameter
HostHeaderWebApplication
SPWebApplicationPipeBind
QuotaTemplate
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
SourceWeb
Specifies the URL or GUID of the Web to be converted.
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.
SPWebPipeBind
SPWebPipeBind
TargetUrl
The target URL of the new site collection. Example: http://server_name/sites/newsite1
String
String
OwnerLogin
The site collection's owner login in the form domain\user.
String
String
OwnerEmail
The owner's email in the form user@domain.com
String
String
SecondaryEmail
The secondary owner's email in the form user@domain.com
String
String
SecondaryOwnerLogin
The seconary owner's login in the form domain\user.
String
String
ContentDatabase
The content database to store the new site collection within.
SPContentDatabasePipeBind
SPContentDatabasePipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
Name
The name or title of the new site collection.
String
String
Language
UInt32
UInt32
Description
String
String
ExportedFile
If an export of the source web was already performed provide the path to the exported file to prevent another export from occuring.
String
String
NoFileCompression
SwitchParameter
SwitchParameter
SuppressAfterEvents
SwitchParameter
SwitchParameter
DeleteSource
Delete the source web after the conversion completes.
SwitchParameter
SwitchParameter
CreateManagedPath
Create a managed path for the new site collection.
SwitchParameter
SwitchParameter
HaltOnWarning
Halt the export or import operation on warning.
SwitchParameter
SwitchParameter
HaltOnFatalError
Halt the export or import operation on error.
SwitchParameter
SwitchParameter
IncludeUserSecurity
SwitchParameter
SwitchParameter
HostHeaderWebApplication
SPWebApplicationPipeBind
SPWebApplicationPipeBind
QuotaTemplate
The quota template to assign to the new site collection.
SPQuotaTemplatePipeBind
SPQuotaTemplatePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help ConvertTo-SPSite -detailed". For technical information, type "Get-Help ConvertTo-SPSite -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://portal/subweb1 | ConvertTo-SPSite -TargetUrl "http://portal/sites/newsitecoll" -OwnerLogin domain\user
This example converts the web located at http://portal/subweb1 to a site collection located at http://portal/sites/newsitecoll
Repair-SPMigratedSite
Export-SPWeb2
Import-SPWeb2
Export-SPWeb
Import-SPWeb
Export-SPNavigation
Site Collections
Export the navigation settings of a publishing site.
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.
Export
SPNavigation
1.0.0.0
Export the navigation settings of a publishing site.
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.
Export-SPNavigation
Site
SPSitePipeBind
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPNavigation
Web
SPWebPipeBind
IncludeChildren
SwitchParameter
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Site
Specifies the URL or GUID of the Site whose navigation settings will be exported.
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.
SPSitePipeBind
SPSitePipeBind
Web
Specifies the URL or GUID of the Web whose navigation settings will be exported.
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.
SPWebPipeBind
SPWebPipeBind
OutputFile
The path to the file to save the navigation settings to.
String
String
IncludeChildren
Include all child webs of the specified Web.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPNavigation -detailed". For technical information, type "Get-Help Export-SPNavigation -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPSite "http://server_name/" | Export-SPNavigation -OutputFile "c:\nav.xml"
This example exports the navigation settings from the site collection and saves to c:\nav.xml.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWeb "http://server_name/subsite" | Export-SPNavigation -OutputFile "c:\nav.xml"
This example exports the navigation settings for http://server_name/subsite and saves to c:\nav.xml.
------------------EXAMPLE 3-----------------------
PS C:\> Get-SPWeb "http://server_name/subsite" | Export-SPNavigation -OutputFile "c:\nav.xml" -IncludeChildren
This example exports the navigation settings for http://server_name/subsite and all its sub-sites and saves to c:\nav.xml.
Import-SPNavigation
Get-SPAvailableWebTemplates
Site Collections
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.
Get
SPAvailableWebTemplates
1.0.0.0
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.
Get-SPAvailableWebTemplates
Web
SPWebPipeBind
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web for which the available site templates will be returned.
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.
SPWebPipeBind
SPWebPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPAvailableWebTemplates -detailed". For technical information, type "Get-Help Get-SPAvailableWebTemplates -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://portal | Get-SPAvailableWebTemplates
This example returns back all available site templates for http://portal.
Get-SPWeb
Import-SPNavigation
Site Collections
Export the security settings and permissions from a list.
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.
Import
SPNavigation
1.0.0.0
Export the security settings and permissions from a list.
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.
Import-SPNavigation
Site
SPSitePipeBind
InputFile
String
DeleteExistingGlobal
SwitchParameter
DeleteExistingCurrent
SwitchParameter
BackupFile
String
AssignmentCollection
SPAssignmentCollection
Import-SPNavigation
Web
SPWebPipeBind
IncludeChildren
SwitchParameter
InputFile
String
DeleteExistingGlobal
SwitchParameter
DeleteExistingCurrent
SwitchParameter
BackupFile
String
AssignmentCollection
SPAssignmentCollection
Site
Specifies the URL or GUID of the Site whose navigation settings will be updated.
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.
SPSitePipeBind
SPSitePipeBind
Web
Specifies the URL or GUID of the Web whose navigation settings will be updated.
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.
SPWebPipeBind
SPWebPipeBind
InputFile
The path to the file containing the navigation settings to import.
String
String
IncludeChildren
Include all child webs of the specified Web.
SwitchParameter
SwitchParameter
DeleteExistingGlobal
Delete the existing glboal navigation settings.
SwitchParameter
SwitchParameter
DeleteExistingCurrent
Delete the existing current navigation settings.
SwitchParameter
SwitchParameter
BackupFile
The path to the backup file to save the navigation settings to prior to importing.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Import-SPNavigation -detailed". For technical information, type "Get-Help Import-SPNavigation -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPSite "http://server_name/" | Import-SPNavigation -InputFile "c:\nav.xml"
This example imports the navigation settings from the c:\nav.xml to the specified site collection.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWeb "http://server_name/subsite" | Import-SPNavigation -InputFile "c:\nav.xml"
This example imports the navigation settings from the c:\nav.xml to http://server_name/subsite.
------------------EXAMPLE 3-----------------------
PS C:\> Get-SPWeb "http://server_name/subsite" | Import-SPNavigation -InputFile "c:\nav.xml" -IncludeChildren
This example imports the navigation settings from the c:\nav.xml to http://server_name/subsite and all of its sub-sites.
Export-SPNavigation
Move-SPWeb
Site Collections
Move an SPWeb from one URL to another.
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.
Move
SPWeb
1.0.0.0
Move an SPWeb from one URL to another.
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.
Move-SPWeb
UrlName
String
Identity
Specifies the URL or GUID of the existing Web to move.
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.
SPWebPipeBind
SPWebPipeBind
Parent
Specifies the URL of the parent Web to move the Web to. This will not change the URL name of the current Web.
SPWebPipeBind
SPWebPipeBind
UrlName
Specifies the URL name of the Web. If not specified then the current URL name is used. For example, if moving http://portal/foo/bar, "bar" is the URL name of the Web.
String
String
HaltOnWarning
When moving to a new Site Collection, halts the export or import of the Web if an warning occurs.
SwitchParameter
SwitchParameter
HaltOnFatalError
When moving to a new Site Collection, halts the export or import of the Web if an error occurs.
SwitchParameter
SwitchParameter
IncludeUserSecurity
When moving to a new Site Collection, includes user security.
SwitchParameter
SwitchParameter
SuppressAfterEvents
When moving to a new Site Collection, disable the firing of "After" events when creating or modifying list items.
SwitchParameter
SwitchParameter
RetainObjectIdentity
When moving to a new Site Collection, retains the identity of all (lists and sub-webs).
SwitchParameter
SwitchParameter
TempPath
When moving to a new Site Collection, the -TempPath parameter specifies where the export files will be stored.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Move-SPWeb -detailed". For technical information, type "Get-Help Move-SPWeb -full".
------------------EXAMPLE 1-----------------------
PS C:\> Move-SPWeb -Identity "http://portal/foo/bar" -Parent "http://portal/"
This example moves the Web located at http://portal/foo/bar to http://portal/bar.
------------------EXAMPLE 2-----------------------
PS C:\> Move-SPWeb -Identity "http://portal/foo/bar" -Parent "http://portal/" -UrlName "foobar"
This example moves the Web located at http://portal/foo/bar to http://portal/foobar.
------------------EXAMPLE 3-----------------------
PS C:\> Move-SPWeb -Identity "http://portal/foo/bar" -UrlName "foobar"
This example moves the Web located at http://portal/foo/bar to http://portal/foo/foobar.
Remove-SPList
Copy-SPList
Copy-SPListSecurity
Export-SPListSecurity
Get-SPWeb
Start-SPAssignment
Stop-SPAssignment
Repair-SPMigratedSite
Site Collections
Repair a site collection that was created using the export of a web. This cmdlet is the equivalent to the SharePoint 2010 Repair-SPSite cmdlet - it was renamed because SharePoint 2013 introduced a Repair-SPSite cmdlet which does different things.
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.
Repair
SPMigratedSite
1.0.0.0
Repair a site collection that was created using the export of a web. This cmdlet is the equivalent to the SharePoint 2010 Repair-SPSite cmdlet - it was renamed because SharePoint 2013 introduced a Repair-SPSite cmdlet which does different things.
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.
Repair-SPMigratedSite
TargetSite
SPSitePipeBind
SourceSite
SPSitePipeBind
AssignmentCollection
SPAssignmentCollection
TargetSite
The site to repair.
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.
SPSitePipeBind
SPSitePipeBind
SourceSite
The model or source site collection to use as the basis for the repairs.
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.
SPSitePipeBind
SPSitePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Repair-SPMigratedSite -detailed". For technical information, type "Get-Help Repair-SPMigratedSite -full".
------------------EXAMPLE------------------
PS C:\> Get-SPSite http://portal/sites/newsitecoll | Repair-SPMigratedSite -SourceSite "http://portal/"
This example repairs the site collection located at http://portal/sites/newsitecoll using the site collection http://portal as the model site for the repairs.
ConvertTo-SPSite
Export-SPWeb2
Import-SPWeb2
Export-SPWeb
Import-SPWeb
Set-SPHttpContext
Site Collections
Sets the HTTP Context for a given Site and returns a new SPWeb object associated with the new context. When done with a given Site be sure to run Clear-SPHttpContext in order to remove the context.
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.
Set
SPHttpContext
1.0.0.0
Many native SharePoint objects, such as Web Parts, require a valid HTTP Context in order for certain properties to be available. When working within PowerShell there is no HTTP Context so it is necessary to create one. This is accomplished by setting the System.Web.HttpContext.Current static property to a valid object instantiated using the provided SPWeb object. Once created there are SharePoint specific properties that must be set on this object. This cmdlet sets the following (where $context is the HttpContext object):
1. $context.Items["FormDigestValidated"] = true;
2. $context.User = System.Threading.Thread.CurrentPrincipal;
3. $context.Items["Microsoft.SharePoint.SPServiceContext"] = Microsoft.SharePoint.SPServiceContext.GetContext($web.Site);
4. Microsoft.SharePoint.Web.Controls.SPControl.SetContextSite($context, $web.Site);
5. Microsoft.SharePoint.Web.Controls.SPControl.SetContextWeb($context, $web);
When you are finished working with a given Site run Clear-SPHttpContext to set the HttpContext object back to null.
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.
Set-SPHttpContext
Identity
SPWebPipeBind
AssignmentCollection
SPAssignmentCollection
Identity
The web to set the HTTP Context to.
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.
SPWebPipeBind
SPWebPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPHttpContext -detailed". For technical information, type "Get-Help Set-SPHttpContext -full".
------------------EXAMPLE------------------
PS C:\> $web = Set-SPHttpContext "http://demo/"
PS C:\> Write-Host "do something with the web"
PS C:\> Clear-SPHttpContext
This example sets the HttpContext to http://demo.
Clear-SPHttpContext
Get-SPWeb
Get-SPQuotaTemplate
Quotas
Retrieve one or more quota templates.
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.
Get
SPQuotaTemplate
1.0.0.0
Retrieve one or more quota templates.
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.
Get-SPQuotaTemplate
Identity
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
Identity
The name of the quota template to return.
SPQuotaTemplatePipeBind
SPQuotaTemplatePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPQuotaTemplate -detailed". For technical information, type "Get-Help Get-SPQuotaTemplate -full".
------------------EXAMPLE 1-----------------------
PS C:\> $quotas = Get-SPQuotaTemplate
This example retrieves all quota templates.
------------------EXAMPLE 2-----------------------
PS C:\> $quota = Get-SPQuotaTemplate "Portal"
This example retrieves the "Portal" quota template.
New-SPQuotaTemplate
Set-SPQuota
Set-SPQuotaTemplate
New-SPQuotaTemplate
Quotas
Creates a new quota template.
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.
New
SPQuotaTemplate
1.0.0.0
Creates a new quota template.
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.
New-SPQuotaTemplate
StorageMaximumLevel
Int64
StorageWarningLevel
Int64
UserCodeMaximumLevel
Double
UserCodeWarningLevel
Double
Name
String
Quota
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
StorageMaximumLevel
Specify whether to limit the amount of storage available on a Site Collection, and set the maximum amount of storage. When the warning level or maximum storage level is reached, an e-mail is sent to the site administrator to inform them of the issue.
Nullable`1
Nullable`1
StorageWarningLevel
Specify whether to limit the amount of storage available on a Site Collection, and set the warning level. When the warning level or maximum storage level is reached, an e-mail is sent to the site administrator to inform them of the issue.
Nullable`1
Nullable`1
UserCodeMaximumLevel
Specifies whether sandboxed solutions with code are allowed for this site collection. When the maximum usage limit is reached, sandboxed solutions with code are disabled for the rest of the day and an e-mail is sent to the site administrator.
Nullable`1
Nullable`1
UserCodeWarningLevel
Specifies whether sandboxed solutions with code are allowed for this site collection. When the warning level is reached, an e-mail is sent.
Nullable`1
Nullable`1
Name
The name of the new quota template to create.
String
String
Quota
An existing quota template to base the new template off of.
SPQuotaTemplatePipeBind
SPQuotaTemplatePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPQuotaTemplate -detailed". For technical information, type "Get-Help New-SPQuotaTemplate -full".
------------------EXAMPLE 1-----------------------
PS C:\> $quota = New-SPQuotaTemplate -Name "Portal" -StorageMaximumLevel 15GB -StorageWarningLevel 13GB
This example creates a new quota template with a max storage value of 15GB and a warning value of 13GB.
------------------EXAMPLE 2-----------------------
PS C:\> $quota = Get-SPQuotaTemplate "Portal" | New-SPQuotaTemplate -Name "Teams"
This example creates a new quota template based on the existing Portal quota template.
Get-SPQuotaTemplate
Set-SPQuota
Set-SPQuotaTemplate
Set-SPQuota
Quotas
Synchronizes all assigned quotas with the corresponding quota template.
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.
Set
SPQuota
1.0.0.0
Synchronizes all assigned quotas with the corresponding quota template.
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.
Set-SPQuota
SyncExistingOnly
SwitchParameter
Site
SPSitePipeBind
AssignmentCollection
SPAssignmentCollection
Set-SPQuota
SyncExistingOnly
SwitchParameter
WebApplication
SPWebApplicationPipeBind
AssignmentCollection
SPAssignmentCollection
Set-SPQuota
SyncExistingOnly
SwitchParameter
Farm
SPFarmPipeBind
AssignmentCollection
SPAssignmentCollection
Set-SPQuota
WebApplication
SPWebApplicationPipeBind
QuotaTemplate
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
Set-SPQuota
Site
SPSitePipeBind
QuotaTemplate
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
Set-SPQuota
Farm
SPFarmPipeBind
QuotaTemplate
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
SyncExistingOnly
Synchronize site collection quota settings with the associated template only (do not assign the template if missing).
SwitchParameter
SwitchParameter
WebApplication
The web application containing the sites whose quota will be set or synchronized.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Site
The site whose quota will be set or synchronized.
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.
SPSitePipeBind
SPSitePipeBind
Farm
Set or synchronize all site collection quotas within the farm.
SPFarmPipeBind
SPFarmPipeBind
QuotaTemplate
The quota template to associate with the site collections in the scope.
SPQuotaTemplatePipeBind
SPQuotaTemplatePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPQuota -detailed". For technical information, type "Get-Help Set-SPQuota -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPWebApplication http://server_name | Set-SPQuota -SyncExistingOnly
This example synchronizes all site collections in http://server_name with the assigned quota template.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWebApplication http://server_name | Set-SPQuota -QuotaTempate (Get-SPQuotaTemplate "Portal")
This example sets all site collections in http://server_name with the Portal quota template.
Get-SPQuotaTemplate
Set-SPQuota
New-SPQuotaTemplate
Set-SPQuotaTemplate
Quotas
Updates an existing quota template.
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.
Set
SPQuotaTemplate
1.0.0.0
Updates an existing quota template.
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.
Set-SPQuotaTemplate
StorageMaximumLevel
Int64
StorageWarningLevel
Int64
UserCodeMaximumLevel
Double
UserCodeWarningLevel
Double
Identity
SPQuotaTemplatePipeBind
AssignmentCollection
SPAssignmentCollection
StorageMaximumLevel
Specify whether to limit the amount of storage available on a Site Collection, and set the maximum amount of storage. When the warning level or maximum storage level is reached, an e-mail is sent to the site administrator to inform them of the issue.
Nullable`1
Nullable`1
StorageWarningLevel
Specify whether to limit the amount of storage available on a Site Collection, and set the warning level. When the warning level or maximum storage level is reached, an e-mail is sent to the site administrator to inform them of the issue.
Nullable`1
Nullable`1
UserCodeMaximumLevel
Specifies whether sandboxed solutions with code are allowed for this site collection. When the maximum usage limit is reached, sandboxed solutions with code are disabled for the rest of the day and an e-mail is sent to the site administrator.
Nullable`1
Nullable`1
UserCodeWarningLevel
Specifies whether sandboxed solutions with code are allowed for this site collection. When the warning level is reached, an e-mail is sent.
Nullable`1
Nullable`1
Identity
The name of the quota template to update.
SPQuotaTemplatePipeBind
SPQuotaTemplatePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPQuotaTemplate -detailed". For technical information, type "Get-Help Set-SPQuotaTemplate -full".
------------------EXAMPLE 1-----------------------
PS C:\> $quota = Set-SPQuotaTemplate -Name "Portal" -StorageMaximumLevel 15GB -StorageWarningLevel 13GB
This example updates the Portal quota template and sets the max storage value to 15GB and warning value to 13GB.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPQuotaTemplate "Portal" | Set-SPQuotaTemplate -StorageMaximumLevel 15GB -StorageWarningLevel 13GB
This example updates the Portal quota template and sets the max storage value to 15GB and warning value to 13GB.
Get-SPQuotaTemplate
Set-SPQuota
New-SPQuotaTemplate
Add-SPWikiPageHtml
Wiki Pages
Sets the layout for a wiki page within an existing List.
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.
Add
SPWikiPageHtml
1.0.0.0
Sets the layout for a wiki page within an existing List.
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.
Add-SPWikiPageHtml
List
SPListPipeBind
Web
SPWebPipeBind
WikiPageName
String
Html
String
Row
Int32
Column
Int32
Prepend
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Add-SPWikiPageHtml
Folder
SPFolderPipeBind
Web
SPWebPipeBind
WikiPageName
String
Html
String
Row
Int32
Column
Int32
Prepend
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to create the wiki page in.
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.
SPWebPipeBind
SPWebPipeBind
List
Specifies the identity of the Site containing the file to update.
SPListPipeBind
SPListPipeBind
Folder
Specifies the Folder containing the file to update.
SPFolderPipeBind
SPFolderPipeBind
WikiPageName
The name of the wiki page to update.
String
String
Html
The HTML to add to the wiki page.
String
String
Row
The zone row to add the HTML to.
Int32
Int32
Column
The zone column to add the HTML to.
Int32
Int32
Prepend
Add some space before the web part.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Add-SPWikiPageHtml -detailed". For technical information, type "Get-Help Add-SPWikiPageHtml -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://server_name | Add-SPWikiPageHtml -List "Site Pages" -WikiPageName "MyWikiPage.aspx" -Html "<h1>Welcome!</h1>" -Prepend -Row 1 -Column 1
This example adds a welcome header to the wiki page.
Set-SPOWikiPageLayout
Get-SPWeb
Get-SPCustomizedPages
Pages
Retrieves all customized (unghosted) pages at the given scope. If not returning as a string using the Start-SPAssignment and Stop-SPAssignment cmdlets to dispose of all parent objects.
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.
Get
SPCustomizedPages
1.0.0.0
Retrieves all customized (unghosted) pages at the given scope. If not returning as a string using the Start-SPAssignment and Stop-SPAssignment cmdlets to dispose of all parent objects.
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.
Get-SPCustomizedPages
Web
SPWebPipeBind[]
Recurse
SwitchParameter
AsString
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Get-SPCustomizedPages
Site
SPSitePipeBind[]
AsString
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to retrieve customized pages from.
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.
SPWebPipeBind[]
SPWebPipeBind[]
Site
The site to retrieve customized pages from. 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.
SPSitePipeBind[]
SPSitePipeBind[]
Recurse
Iterate through all child-webs of the specified web.
SwitchParameter
SwitchParameter
AsString
Returns the results as a string. If this parameter is not provided the results will be returned as SPFile objects and the caller will be responsible for disposing the parent objects using the Start-SPAssignment and Stop-SPAssignment cmdlets.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPCustomizedPages -detailed". For technical information, type "Get-Help Get-SPCustomizedPages -full".
------------------EXAMPLE 1-----------------------
PS C:\> $pages = Get-SPWeb http://server_name/subweb | Get-SPCustomizedPages -Recurse
This example returns back all customized, or unghosted, pages from all webs under http://server_name/subweb, inclusive.
------------------EXAMPLE 2-----------------------
PS C:\> $pages = Get-SPSite http://server_name/ | Get-SPCustomizedPages
This example returns back all customized, or unghosted, pages from all webs at the site collection http://server_name/.
Reset-SPCustomizedPages
Get-SPWeb
Get-SPSite
Start-SPAssignment
Stop-SPAssignment
Get-SPPublishingPage
Pages
Retrieves all publishing pages from the specified source.
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.
Get
SPPublishingPage
1.0.0.0
Retrieves all publishing pages from the specified source.
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.
Get-SPPublishingPage
Web
SPWebPipeBind[]
PageName
String[]
AssignmentCollection
SPAssignmentCollection
Get-SPPublishingPage
Identity
SPFilePipeBind[]
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to retrieve publishing pages from.
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.
SPWebPipeBind[]
SPWebPipeBind[]
PageName
The name of the publishing page to return. Example: default.aspx
String[]
String[]
Identity
The path to the publishing page to return.
SPFilePipeBind[]
SPFilePipeBind[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPPublishingPage -detailed". For technical information, type "Get-Help Get-SPPublishingPage -full".
------------------EXAMPLE 1-----------------------
PS C:\> $pages = Get-SPWeb http://server_name | Get-SPPublishingPage
This example returns back all publishing pages in the http://server_name web.
------------------EXAMPLE 2-----------------------
PS C:\> $page = Get-SPPublishingPage "http://server_name/pages/default.aspx"
This example returns back the default.aspx publishing pages from the http://server_name web.
------------------EXAMPLE 3-----------------------
PS C:\> $page = $Get-SPWeb http://server_name | Get-SPPublishingPage -PageName "default.aspx"
This example returns back the default.aspx publishing pages from the http://server_name web.
Get-SPPublishingPageLayout
Repair-SPPageLayoutUrl
Get-SPWeb
Get-SPPublishingPageLayout
Pages
Retrieves all publishing page layouts from the specified source.
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.
Get
SPPublishingPageLayout
1.0.0.0
Retrieves all publishing page layouts from the specified source.
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.
Get-SPPublishingPageLayout
Web
SPWebPipeBind
PageLayout
SPPageLayoutPipeBind[]
AssociatedContentType
SPContentTypePipeBind
AssignmentCollection
SPAssignmentCollection
Get-SPPublishingPageLayout
Web
SPWebPipeBind
AssociatedContentType
SPContentTypePipeBind
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to retrieve publishing page layouts from.
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.
SPWebPipeBind
SPWebPipeBind
PageLayout
The name or path to the page layout to return. If the value is the page name only then the Web parameter must be provided.
Example: ArticleLeft.aspx or http://<site>/_catalogs/masterpage/articleleft.aspx.
SPPageLayoutPipeBind[]
SPPageLayoutPipeBind[]
AssociatedContentType
The associated content type to filter the returned page layouts by.
SPContentTypePipeBind
SPContentTypePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPPublishingPageLayout -detailed". For technical information, type "Get-Help Get-SPPublishingPageLayout -full".
------------------EXAMPLE 1-----------------------
PS C:\> $layouts = Get-SPWeb http://server_name | Get-SPPublishingPageLayout
This example returns back all page layouts from http://server_name.
------------------EXAMPLE 2-----------------------
PS C:\> $layout = Get-SPPublishingPageLayout "http://server_name/_catalogs/masterpage/articleleft.aspx"
This example returns back the articleleft.aspx page layout from the http://server_name web.
------------------EXAMPLE 3-----------------------
PS C:\> $layout = $Get-SPWeb http://server_name | Get-SPPublishingPageLayout -PageLayout "articleleft.aspx"
This example returns back the articleleft.aspx page layout from http://server_name.
Get-SPPublishingPage
Repair-SPPageLayoutUrl
Get-SPContentType
Get-SPWeb
New-SPPublishingPage
Pages
Creates a new publishing page.
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.
New
SPPublishingPage
1.0.0.0
Creates a new publishing page.
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.
New-SPPublishingPage
Web
SPWebPipeBind
PageName
String
Title
String
PageLayout
SPPageLayoutPipeBind
FieldData
Hashtable
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to create the publishing page in.
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.
SPWebPipeBind
SPWebPipeBind
PageName
The name of the publishing page to create. Example: default.aspx
String
String
Title
String
String
PageLayout
The filename of the page layout to use.
SPPageLayoutPipeBind
SPPageLayoutPipeBind
FieldData
Key/Value pairs of field names and values to set after the page is created.
Example: -FieldData @{"FieldName1"="Field Value 1";"FieldName2"="Field Value 2"}
Hashtable
Hashtable
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPPublishingPage -detailed". For technical information, type "Get-Help New-SPPublishingPage -full".
------------------EXAMPLE 1-----------------------
PS C:\> $page = Get-SPWeb http://server_name | New-SPPublishingPage -PageName "custom.aspx" -Title "Custom Page " -PageLayout "articleleft.aspx"
This example creates a page named custom.aspx at http://server_name.
------------------EXAMPLE 2-----------------------
PS C:\> $data = @{"FieldName1"="Field Value 1";"FieldName2"="Field Value 2"}
PS C:\> $page = Get-SPWeb http://server_name | New-SPPublishingPage -PageName "custom.aspx" -Title "Custom Page " -PageLayout "articleleft.aspx" -FieldData $data
This example creates a page named custom.aspx at http://server_name and sets two additional fields.
Get-SPPublishingPage
Get-SPPublishingPageLayout
Get-SPWeb
New-SPWikiPage
Pages
Creates a new wiki page.
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.
New
SPWikiPage
1.0.0.0
Creates a new wiki page.
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.
New-SPWikiPage
List
SPListPipeBind
Web
SPWebPipeBind
WikiPageName
String
WikiPageLayout
OneColumn | OneColumnSideBar | TwoColumns | TwoColumnsHeader | TwoColumnsHeaderFooter | ThreeColumns | ThreeColumnsHeader | ThreeColumnsHeaderFooter
AssignmentCollection
SPAssignmentCollection
New-SPWikiPage
Folder
SPFolderPipeBind
Web
SPWebPipeBind
WikiPageName
String
WikiPageLayout
OneColumn | OneColumnSideBar | TwoColumns | TwoColumnsHeader | TwoColumnsHeaderFooter | ThreeColumns | ThreeColumnsHeader | ThreeColumnsHeaderFooter
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to create the wiki page in.
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.
SPWebPipeBind
SPWebPipeBind
List
Specifies the List to add the file to.
SPListPipeBind
SPListPipeBind
Folder
Specifies the Folder to add the file to.
SPFolderPipeBind
SPFolderPipeBind
WikiPageName
The name of the wiki page to create.
String
String
WikiPageLayout
The page layout to set the wiki page to. The default value is "ThreeColumnsHeaderFooter".
WikiPageLayout
WikiPageLayout
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPWikiPage -detailed". For technical information, type "Get-Help New-SPWikiPage -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://server_name | New-SPWikiPage -List "Site Pages" -File "MyWikiPage.aspx"
This example creates a new wiki page within the Site Pages list under the root Site of the root Site Collection.
Set-SPOWikiPageLayout
Get-SPWeb
Repair-SPPageLayoutUrl
Pages
Fixes the Page Layout URL property of publishing pages which can get messed up during an upgrade or from importing into a new farm.
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.
Repair
SPPageLayoutUrl
1.0.0.0
Fixes the Page Layout URL property of publishing pages which can get messed up during an upgrade or from importing into a new farm.
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.
Repair-SPPageLayoutUrl
WebApplication
SPWebApplicationPipeBind
RegexSearchString
String
RegexReplaceString
String
FixContact
SwitchParameter
PageLayout
SPPageLayoutPipeBind
AssignmentCollection
SPAssignmentCollection
Repair-SPPageLayoutUrl
Site
SPSitePipeBind
RegexSearchString
String
RegexReplaceString
String
FixContact
SwitchParameter
PageLayout
SPPageLayoutPipeBind
AssignmentCollection
SPAssignmentCollection
Repair-SPPageLayoutUrl
Web
SPWebPipeBind
RegexSearchString
String
RegexReplaceString
String
FixContact
SwitchParameter
PageLayout
SPPageLayoutPipeBind
AssignmentCollection
SPAssignmentCollection
Repair-SPPageLayoutUrl
Page
SPFilePipeBind
RegexSearchString
String
RegexReplaceString
String
FixContact
SwitchParameter
PageLayout
SPPageLayoutPipeBind
AssignmentCollection
SPAssignmentCollection
RegexSearchString
Search pattern to use for a regular expression replacement of the page layout URL.
String
String
RegexReplaceString
Replace pattern to use for a regular expression replacement of the page layout URL.
String
String
FixContact
Attempt to fix any page contacts that are invalid.
SwitchParameter
SwitchParameter
WebApplication
The web application containing the pages to repair.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Site
The site containing the pages to repair.
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.
SPSitePipeBind
SPSitePipeBind
Web
Specifies the URL or GUID of the Web containing the pages to repair.
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.
SPWebPipeBind
SPWebPipeBind
Page
The URL to the page to repair.
SPFilePipeBind
SPFilePipeBind
PageLayout
URL of page layout to retarget page(s) to.
SPPageLayoutPipeBind
SPPageLayoutPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Repair-SPPageLayoutUrl -detailed". For technical information, type "Get-Help Repair-SPPageLayoutUrl -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPWebApplication "http://server_name" | Repair-SPPageLayoutUrl
This example automatically repairs all pages in http://server_name by analyzing the page layout name and fixing the path so it points to the appropriate location.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWeb "http://server_name" | Repair-SPPageLayoutUrl -RegexSearchString "(?:http://testserver/)" -RegexReplaceString "http://prodserver"
This example automatically repairs all pages in http://server_name replacing the value http://testserver with http://prodserver.
Get-SPPublishingPage
Get-SPPublishingPageLayout
Get-SPWebApplication
Get-SPSite
Get-SPWeb
Reset-SPCustomizedPages
Pages
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.
Reset
SPCustomizedPages
1.0.0.0
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.
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
Web
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.
SPWebPipeBind
SPWebPipeBind
Site
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.
SPSitePipeBind
SPSitePipeBind
File
The URL to the file to reset.
SPFilePipeBind
SPFilePipeBind
List
The URL to the list containing the files to reset.
SPListPipeBind
SPListPipeBind
WebApplication
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.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Recurse
Recurse all Webs.
SwitchParameter
SwitchParameter
HaltOnError
Abort execution if an error is encountered.
SwitchParameter
SwitchParameter
Force
Use of the Force parameter is not supported and should only be used as a last resort.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Reset-SPCustomizedPages -detailed". For technical information, type "Get-Help Reset-SPCustomizedPages -full".
------------------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.
Get-SPCustomizedPages
Get-SPList
Get-SPWeb
Get-SPSite
Get-SPWebApplication
Set-SPOWikiPageLayout
Wiki Pages
Sets the layout for a wiki page within an existing List.
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.
Set
SPOWikiPageLayout
1.0.0.0
Sets the layout for a wiki page within an existing List.
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.
Set-SPOWikiPageLayout
List
SPListPipeBind
Web
SPWebPipeBind
WikiPageName
String
WikiPageLayout
OneColumn | OneColumnSideBar | TwoColumns | TwoColumnsHeader | TwoColumnsHeaderFooter | ThreeColumns | ThreeColumnsHeader | ThreeColumnsHeaderFooter
AssignmentCollection
SPAssignmentCollection
Set-SPOWikiPageLayout
Folder
SPFolderPipeBind
Web
SPWebPipeBind
WikiPageName
String
WikiPageLayout
OneColumn | OneColumnSideBar | TwoColumns | TwoColumnsHeader | TwoColumnsHeaderFooter | ThreeColumns | ThreeColumnsHeader | ThreeColumnsHeaderFooter
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to create the wiki page in.
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.
SPWebPipeBind
SPWebPipeBind
List
Specifies the identity of the Site containing the file to update.
SPListPipeBind
SPListPipeBind
Folder
Specifies the Folder containing the file to update.
SPFolderPipeBind
SPFolderPipeBind
WikiPageName
The name of the wiki page to update.
String
String
WikiPageLayout
The page layout to set the wiki page to.
WikiPageLayout
WikiPageLayout
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPOWikiPageLayout -detailed". For technical information, type "Get-Help Set-SPOWikiPageLayout -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://server_name | Set-SPWikiPageLayout -List "Site Pages" -WikiPageName "MyWikiPage.aspx" -WikiPageLayout "OneColumnSideBar"
This example sets the layout of an existing wiki page within the Site Pages list under the root Site of the root Site Collection.
Set-SPOWikiPageLayout
Get-SPWeb
Export-SPTerms
Managed Metadata
Export the Managed Metadata Terms.
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.
Export
SPTerms
1.0.0.0
Export the Managed Metadata Terms.
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.
Export-SPTerms
TaxonomySession
SPTaxonomySessionPipeBind
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPTerms
TermStore
SPTaxonomyTermStorePipeBind
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPTerms
Group
SPTaxonomyGroupPipeBind
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPTerms
TermSet
SPTaxonomyTermSetPipeBind
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPTerms
Term
SPTaxonomyTermPipeBind
OutputFile
String
AssignmentCollection
SPAssignmentCollection
TaxonomySession
The TaxonomySession object containing the Term Stores to export.
SPTaxonomySessionPipeBind
SPTaxonomySessionPipeBind
TermStore
The TermStore object containing the terms to export.
SPTaxonomyTermStorePipeBind
SPTaxonomyTermStorePipeBind
Group
The Group object containing the terms to export.
SPTaxonomyGroupPipeBind
SPTaxonomyGroupPipeBind
TermSet
The TermSet object containing the terms to export.
SPTaxonomyTermSetPipeBind
SPTaxonomyTermSetPipeBind
Term
The Term object containing the terms to export.
SPTaxonomyTermPipeBind
SPTaxonomyTermPipeBind
OutputFile
The path to the file to save the terms to.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPTerms -detailed". For technical information, type "Get-Help Export-SPTerms -full".
------------------EXAMPLE 1-----------------------
PS C:\> Export-SPTerms -TaxonomySession "http://site/" -OutputFile "c:\terms.xml"
This example exports the terms for all term stores associated with the site and saves to c:\terms.xml.
------------------EXAMPLE 2-----------------------
PS C:\> Export-SPTerms -Group (Get-SPTaxonomySession -Site "http://site/").TermStores[0].Groups[0] -OutputFile "c:\terms.xml"
This example exports the first Group of the first Term Store and saves to c:\terms.xml.
Import-SPTerms
Get-SPTaxonomySession
Import-SPTerms
Managed Metadata
Import the Managed Metadata Terms.
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.
Import
SPTerms
1.0.0.0
Import the Managed Metadata Terms.
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.
Import-SPTerms
TaxonomySession
SPTaxonomySessionPipeBind
InputFile
XmlDocumentPipeBind
AssignmentCollection
SPAssignmentCollection
Import-SPTerms
ParentTermStore
SPTaxonomyTermStorePipeBind
InputFile
XmlDocumentPipeBind
AssignmentCollection
SPAssignmentCollection
Import-SPTerms
ParentGroup
SPTaxonomyGroupPipeBind
InputFile
XmlDocumentPipeBind
AssignmentCollection
SPAssignmentCollection
Import-SPTerms
ParentTermSet
SPTaxonomyTermSetPipeBind
InputFile
XmlDocumentPipeBind
AssignmentCollection
SPAssignmentCollection
Import-SPTerms
ParentTerm
SPTaxonomyTermPipeBind
InputFile
XmlDocumentPipeBind
AssignmentCollection
SPAssignmentCollection
TaxonomySession
The TaxonomySession object to import Term Stores into.
SPTaxonomySessionPipeBind
SPTaxonomySessionPipeBind
ParentTermStore
The TermStore object to import Groups into.
SPTaxonomyTermStorePipeBind
SPTaxonomyTermStorePipeBind
ParentGroup
The Group object to import Term Sets into.
SPTaxonomyGroupPipeBind
SPTaxonomyGroupPipeBind
ParentTermSet
The TermSet object to import Terms into.
SPTaxonomyTermSetPipeBind
SPTaxonomyTermSetPipeBind
ParentTerm
The Term object to import Terms into.
SPTaxonomyTermPipeBind
SPTaxonomyTermPipeBind
InputFile
The path to the file containing the terms to import or an XmlDocument object or XML string.
XmlDocumentPipeBind
XmlDocumentPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Import-SPTerms -detailed". For technical information, type "Get-Help Import-SPTerms -full".
------------------EXAMPLE 1-----------------------
PS C:\> Import-SPTerms -TaxonomySession "http://site/" -InputFile "c:\terms.xml"
This example imports the terms from c:\terms.xml to the Term Store associated with http://site.
------------------EXAMPLE 2-----------------------
PS C:\> Import-SPTerms -ParentTermStore (Get-SPTaxonomySession -Site "http://site/").TermStores[0] -InputFile "c:\terms.xml"
This example imports the Group from c:\terms.xml to the first Term Store.
Export-SPTerms
Get-SPTaxonomySession
Add-SPEventReceiver
Lists
Adds an event receiver to a web, list, or content type.
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.
Add
SPEventReceiver
1.0.0.0
Adds an event receiver to a web, list, or content type.
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.
Add-SPEventReceiver
Web
SPWebPipeBind
Name
String
Assembly
String
ClassName
String
Type
SPEventReceiverType[]
Sequence
Int32
AssignmentCollection
SPAssignmentCollection
Add-SPEventReceiver
List
SPListPipeBind
Name
String
Assembly
String
ClassName
String
Type
SPEventReceiverType[]
Sequence
Int32
AssignmentCollection
SPAssignmentCollection
Add-SPEventReceiver
ContentType
SPContentTypePipeBind
Name
String
Assembly
String
ClassName
String
Type
SPEventReceiverType[]
Sequence
Int32
AssignmentCollection
SPAssignmentCollection
Web
The web to add the event receiver to.
The value must be a valid URL in the form http://server_name
SPWebPipeBind
SPWebPipeBind
List
The list to add the event receiver to.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
ContentType
The name of the content type to return. The type must be a valid content type name; a valid content type ID, in the form 0x0123...; or an instance of an SPContentType object.
SPContentTypePipeBind
SPContentTypePipeBind
Name
The name to give to the event receiver. The name has no significance but can be useful when later listing the event receivers.
String
String
Assembly
The fully qualified assembly name containing the event receiver class to add.
String
String
ClassName
The fully qualified class name of the event receiver to add.
String
String
Type
The event type to add. The command does not validate that you are adding the correct type for the specified target or that the specified class contains handlers for the type specified.
SPEventReceiverType[]
SPEventReceiverType[]
Sequence
The sequence number specifies the order of execution of the event receiver.
Int32
Int32
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Add-SPEventReceiver -detailed". For technical information, type "Get-Help Add-SPEventReceiver -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPWeb http://demo | Add-SPEventReceiver -Name "My Cool Event Receivers" -Assembly "Falchion.SharePoint.MyCoolProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3216c23aba16db08" -ClassName "Falchion.SharePoint.MyCoolProject.MyCoolEventReceiver" -Type "WebProvisioned","WebDeleted"
This example adds WebProvisioned and WebDeleted event receivers to the http://demo site.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPList http://demo/Lists/MyList | Add-SPEventReceiver -Name "My Cool Event Receivers" -Assembly "Falchion.SharePoint.MyCoolProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3216c23aba16db08" -ClassName "Falchion.SharePoint.MyCoolProject.MyCoolEventReceiver" -Type "ItemUpdating","ItemAdding"
This example adds ItemUpdating and ItemAdding event receivers to the http://demo/Lists/MyList list.
------------------EXAMPLE 3-----------------------
PS C:\> Get-SPWeb http://demo | Get-SPContentType -Identity "My Content Type" | Add-SPEventReceiver -Name "My Cool Event Receivers" -Assembly "Falchion.SharePoint.MyCoolProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3216c23aba16db08" -ClassName "Falchion.SharePoint.MyCoolProject.MyCoolEventReceiver" -Type "ItemUpdating","ItemAdding"
This example adds ItemUpdating and ItemAdding event receivers to the "My Content Type" content type.
Get-SPList
Get-SPContentType
Get-SPWeb
Copy-SPList
Lists
Copy a list from one site to another. Wraps the functionality of the Export-SPWeb and Import-SPWeb cmdlets.
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.
Copy
SPList
1.0.0.0
Copy a list from one site to another. Wraps the functionality of the Export-SPWeb and Import-SPWeb cmdlets.
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.
Copy-SPList
SourceList
SPListPipeBind
TargetWeb
SPWebPipeBind
DeleteSource
SwitchParameter
Path
String
SuppressAfterEvents
SwitchParameter
RetargetLinks
SwitchParameter
RetainObjectIdentity
SwitchParameter
IncludeVersions
LastMajor | CurrentVersion | LastMajorAndMinor | All
IncludeDescendants
None | Content | All
UpdateVersions
Append | Overwrite | Ignore
CompressionSize
Int32
IncludeDependencies
SwitchParameter
ExcludeChildren
SwitchParameter
UseSqlSnapshot
SwitchParameter
Force
SwitchParameter
HaltOnError
SwitchParameter
HaltOnWarning
SwitchParameter
IncludeUserSecurity
SwitchParameter
NoFileCompression
SwitchParameter
NoLogFile
SwitchParameter
AssignmentCollection
SPAssignmentCollection
SourceList
The source list to copy.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
TargetWeb
Specifies the URL or GUID of the Web containing the list to be copied.
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.
SPWebPipeBind
SPWebPipeBind
DeleteSource
Delete the source list after the copy operation completes.
SwitchParameter
SwitchParameter
Path
Specifies the name of the export file.
If the NoFileCompression parameter is used, a directory must be specified; otherwise, any file format is valid.
String
String
SuppressAfterEvents
SwitchParameter
SwitchParameter
RetargetLinks
Iterate through all links pointing to the source and retarget to the new location.
SwitchParameter
SwitchParameter
RetainObjectIdentity
If specified, create the new list with the same ID as the source list. The target location must be in a different content database from the source list for this to work.
SwitchParameter
SwitchParameter
IncludeVersions
Indicates the type of file and list item version history to be included in the export operation. If the IncludeVersions parameter is absent, the Copy-SPList cmdlet by default uses a value of "LastMajor".
The type must be any one of the following versions:
-Last major version for files and list items (default)
-The current version, either the last major version or the last minor version
-Last major and last minor version for files and list items
-All versions for files and list items
Nullable`1
Nullable`1
IncludeDescendants
Nullable`1
Nullable`1
UpdateVersions
Nullable`1
Nullable`1
CompressionSize
Sets the maximum file size for the compressed export files. If the total size of the exported package is greater than this size, the exported package will be split into multiple files.
Int32
Int32
IncludeDependencies
SwitchParameter
SwitchParameter
ExcludeChildren
SwitchParameter
SwitchParameter
UseSqlSnapshot
Specifies a SQL Database Snapshot will be created when the export process begins, and all exported data will be retrieved directly from the database snapshot. This snapshot will be automatically deleted when export completes.
SwitchParameter
SwitchParameter
Force
Forcefully overwrites the export package if it already exists.
SwitchParameter
SwitchParameter
HaltOnError
Stops the export/import process when an error occurs.
SwitchParameter
SwitchParameter
HaltOnWarning
Stops the export/import process when a warning occurs.
SwitchParameter
SwitchParameter
IncludeUserSecurity
Preserves the user security settings.
SwitchParameter
SwitchParameter
NoFileCompression
Either enables or disables file compression in the export package. The export package is stored in the folder specified by thePath parameter or Identity parameter. We recommend that you use this parameter for performance reasons. If compression is enabled, the export process can increase by approximately 30 percent.
SwitchParameter
SwitchParameter
NoLogFile
Suppresses the generation of an export log file. If this parameter is not specified, the cmdlet will generate an export log file in the same location as the export package. The log file uses Unified Logging Service (ULS).
It is recommended to use this parameter. However, for performance reasons, you might not want to generate a log file.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Copy-SPList -detailed". For technical information, type "Get-Help Copy-SPList -full".
------------------EXAMPLE------------------
PS C:\> Get-SPList "http://server_name/sites/site1/lists/mylist" | Copy-SPList -TargetWeb "http://server_name/sites/sites2"
This example copies the mylist list from site1 to site2.
Export-SPWeb2
Import-SPWeb2
Get-SPList
Copy-SPListSecurity
Export-SPWeb
Import-SPWeb
Copy-SPListSecurity
Lists
Copy the security settings and permissions from one list to another.
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.
Copy
SPListSecurity
1.0.0.0
Copy the security settings and permissions from one list to another.
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.
Copy-SPListSecurity
SourceList
SPListPipeBind
TargetList
SPListPipeBind
IncludeItemSecurity
SwitchParameter
AssignmentCollection
SPAssignmentCollection
SourceList
The source list whose security will be copied.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
TargetList
The target list to apply the new security to.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
IncludeItemSecurity
In addition to the list level security copy the security settings of individual items.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Copy-SPListSecurity -detailed". For technical information, type "Get-Help Copy-SPListSecurity -full".
------------------EXAMPLE------------------
PS C:\> Get-SPList "http://server_name/lists/list1" | Copy-SPListSecurity -TargetList (Get-SPList "http://server_name/lists/list2")
This example copies the security settings and permissions from list1 to list2.
Export-SPListSecurity
Import-SPListSecurity
Get-SPList
Remove-SPList
Lists
Delete a list from a web site.
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.
Remove
SPList
1.0.0.0
Delete a list from a web site.
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.
Remove-SPList
Identity
SPListPipeBind
Web
SPWebPipeBind
Force
SwitchParameter
BackupDirectory
String
AssignmentCollection
SPAssignmentCollection
Identity
The list to delete.
The value must be a valid URL in the form http://server_name/lists/listname or /lists/listname. If a server relative URL is provided then the Web parameter must be provided.
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the list to be deleted.
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.
SPWebPipeBind
SPWebPipeBind
Force
Force the deletion of the list by overriding the AllowDeletion flag.
SwitchParameter
SwitchParameter
BackupDirectory
Export the list prior to deleting. The type must be a valid directory path.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Remove-SPList -detailed". For technical information, type "Get-Help Remove-SPList -full".
------------------EXAMPLE------------------
PS C:\> Get-SPList "http://server_name/lists/mylist" | Remove-SPList -BackupDirectory "c:\backups\mylist"
This example deletes the list mylist and creates a backup of the list in the c:\backups\mylist folder.
Get-SPList
Get-SPWeb
Download-SPFile
Lists
Save the file associated with the specified file or folder URL.
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.
Download
SPFile
1.0.0.0
Save the file associated with the specified file or folder URL.
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.
Download-SPFile
File
SPFilePipeBind[]
TargetFolder
String
Overwrite
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Download-SPFile
Folder
SPFolderPipeBind
Recursive
SwitchParameter
TargetFolder
String
Overwrite
SwitchParameter
AssignmentCollection
SPAssignmentCollection
File
The path to the file to save.
SPFilePipeBind[]
SPFilePipeBind[]
Folder
The path to the folder to save.
SPFolderPipeBind
SPFolderPipeBind
Recursive
Save all child folders and their files.
SwitchParameter
SwitchParameter
TargetFolder
The path to the folder to save the files to.
String
String
Overwrite
Overwrite existing files.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Download-SPFile -detailed". For technical information, type "Get-Help Download-SPFile -full".
------------------EXAMPLE 1-----------------------
PS C:\> Download-SPFile -File "http://server_name/pages/default.aspx" -TargetFolder "c:\temp"
This saves the default.aspx file from the http://server_name/pages library.
------------------EXAMPLE 2-----------------------
PS C:\> Download-SPFile "http://server_name/documents/" -TargetFolder "c:\temp" -Recursive
This example saves all files from the http://server_name/documents library.
Get-SPFile
Export-SPListSecurity
Lists
Export the security settings and permissions from a list.
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.
Export
SPListSecurity
1.0.0.0
Export the security settings and permissions from a list.
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.
Export-SPListSecurity
List
SPListPipeBind
OutputFile
String
IncludeItemSecurity
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Export-SPListSecurity
Web
SPWebPipeBind
OutputFile
String
IncludeItemSecurity
SwitchParameter
AssignmentCollection
SPAssignmentCollection
List
The list whose security will be exported.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the lists whose security will be exported.
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.
SPWebPipeBind
SPWebPipeBind
OutputFile
The path to the file to save the security to.
String
String
IncludeItemSecurity
In addition to the list level security copy the security settings of individual items.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPListSecurity -detailed". For technical information, type "Get-Help Export-SPListSecurity -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPList "http://server_name/lists/list1" | Export-SPListSecurity -OutputFile "c:\listsecurity.xml"
This example exports the security settings and permissions from list1 and saves to c:\listsecurity.xml.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWeb "http://server_name" | Export-SPListSecurity -OutputFile "c:\listsecurity.xml"
This example exports the security settings and permissions for all lists in http://server_name and saves to c:\listsecurity.xml.
Copy-SPListSecurity
Import-SPListSecurity
Get-SPList
Export-SPWeb2
Lists
The Export-SPWeb2 cmdlet exports a site collection, Web application, list, or library. This cmdlet extends the capabilities of the Export-SPWeb cmdlet by exposing additional parameters.
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.
Export
SPWeb2
1.0.0.0
The Export-SPWeb2 cmdlet exports a site collection, Web application, list, or library. This cmdlet extends the capabilities of the Export-SPWeb cmdlet by exposing additional parameters.
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.
Export-SPWeb2
Identity
SPWebPipeBind
CompressionSize
Int32
IncludeDependencies
SwitchParameter
ExcludeChildren
SwitchParameter
IncludeVersions
LastMajor | CurrentVersion | LastMajorAndMinor | All
IncludeDescendants
None | Content | All
ItemUrl
String
UseSqlSnapshot
SwitchParameter
Force
SwitchParameter
HaltOnError
SwitchParameter
HaltOnWarning
SwitchParameter
IncludeUserSecurity
SwitchParameter
NoFileCompression
SwitchParameter
NoLogFile
SwitchParameter
Path
String
AssignmentCollection
SPAssignmentCollection
Identity
Specifies the URL or GUID of the Web to be exported.
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.
SPWebPipeBind
SPWebPipeBind
CompressionSize
Sets the maximum file size for the compressed export files. If the total size of the exported package is greater than this size, the exported package will be split into multiple files.
Int32
Int32
IncludeDependencies
SwitchParameter
SwitchParameter
ExcludeChildren
SwitchParameter
SwitchParameter
IncludeVersions
Indicates the type of file and list item version history to be included in the export operation. If the IncludeVersions parameter is absent, the cmdlet by default uses a value of "LastMajor".
The type must be any one of the following versions:
-Last major version for files and list items (default)
-The current version, either the last major version or the last minor version
-Last major and last minor version for files and list items
-All versions for files and list items
SPIncludeVersions
SPIncludeVersions
IncludeDescendants
SPIncludeDescendants
SPIncludeDescendants
ItemUrl
Specifies the URL of the Web application, GUID, or object to be exported.
The type must be a valid URL; for example, http://server_name.
String
String
UseSqlSnapshot
Specifies a SQL Database Snapshot will be created when the export process begins, and all exported data will be retrieved directly from the database snapshot. This snapshot will be automatically deleted when export completes.
SwitchParameter
SwitchParameter
Force
Forcefully overwrites the export package if it already exists.
SwitchParameter
SwitchParameter
HaltOnError
Stops the export/import process when an error occurs.
SwitchParameter
SwitchParameter
HaltOnWarning
Stops the export/import process when a warning occurs.
SwitchParameter
SwitchParameter
IncludeUserSecurity
Preserves the user security settings.
SwitchParameter
SwitchParameter
NoFileCompression
Either enables or disables file compression in the export package. The export package is stored in the folder specified by thePath parameter or Identity parameter. We recommend that you use this parameter for performance reasons. If compression is enabled, the export process can increase by approximately 30 percent.
SwitchParameter
SwitchParameter
NoLogFile
Suppresses the generation of an export log file. If this parameter is not specified, the cmdlet will generate an export log file in the same location as the export package. The log file uses Unified Logging Service (ULS).
It is recommended to use this parameter. However, for performance reasons, you might not want to generate a log file.
SwitchParameter
SwitchParameter
Path
Specifies the name of the export file.
If the NoFileCompression parameter is used, a directory must be specified; otherwise, any file format is valid.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPWeb2 -detailed". For technical information, type "Get-Help Export-SPWeb2 -full".
Import-SPWeb2
Export-SPWeb
Import-SPWeb
Get-SPCheckedOutFiles
Lists
Retrieves check out details for a given List, Web, or Site Collection.
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.
Get
SPCheckedOutFiles
1.0.0.0
Retrieves check out details for a given List, Web, or Site Collection.
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.
Get-SPCheckedOutFiles
Site
SPSitePipeBind
AssignmentCollection
SPAssignmentCollection
Get-SPCheckedOutFiles
Web
SPWebPipeBind
ExcludeChildWebs
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Get-SPCheckedOutFiles
Web
SPWebPipeBind
List
SPListPipeBind
AssignmentCollection
SPAssignmentCollection
Site
Specifies the URL or GUID of the Site to inspect.
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.
SPSitePipeBind
SPSitePipeBind
Web
Specifies the URL or GUID of the Web to inspect.
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 SPWeb object.
SPWebPipeBind
SPWebPipeBind
List
The list whose checked out files are to be returned.
The value must be a valid URL in the form http://server_name/lists/listname or /lists/listname. If a server relative URL is provided then the Web parameter must be provided.
SPListPipeBind
SPListPipeBind
ExcludeChildWebs
Excludes all child sites and only considers the specified site.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPCheckedOutFiles -detailed". For technical information, type "Get-Help Get-SPCheckedOutFiles -full".
------------------EXAMPLE------------------
PS C:\> Get-SPCheckedOutFiles -Site "http://server_name/"
This example outputs a list of files that are checked out for the given Site Collection
Get-SPFile
Get-SPFile
Lists
Retrieves the SPFile object associated with the specified URL. Use the AssignmentCollection parameter to handle disposal of parent web and site objects.
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.
Get
SPFile
1.0.0.0
Retrieves the SPFile object associated with the specified URL. Use the AssignmentCollection parameter to handle disposal of parent web and site objects.
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.
Get-SPFile
Identity
SPFilePipeBind[]
AssignmentCollection
SPAssignmentCollection
Identity
The path to the publishing page to return.
SPFilePipeBind[]
SPFilePipeBind[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPFile -detailed". For technical information, type "Get-Help Get-SPFile -full".
------------------EXAMPLE 1-----------------------
PS C:\> $file = Get-SPFile "http://server_name/pages/default.aspx"
This example returns back the default.aspx file from the http://server_name/pages library.
------------------EXAMPLE 2-----------------------
PS C:\> $file = Get-SPFile "http://server_name/documents/HRHandbook.doc"
This example returns back the HRHandbook.doc file from the http://server_name/documents library.
Get-SPPublishingPage
Start-SPAssignment
Stop-SPAssignment
Get-SPList
Lists
Retrieve an SPList object by name or type. Use the AssignmentCollection parameter to ensure parent objects are properly disposed.
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.
Get
SPList
1.0.0.0
Retrieve an SPList object by name or type. Use the AssignmentCollection parameter to ensure parent objects are properly disposed.
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.
Get-SPList
Identity
SPListPipeBind
Web
SPWebPipeBind
AssignmentCollection
SPAssignmentCollection
Get-SPList
ListType
GenericList | DocumentLibrary | Unused | DiscussionBoard | Survey | Issue | UnspecifiedBaseType
Web
SPWebPipeBind
AssignmentCollection
SPAssignmentCollection
Identity
SPListPipeBind
SPListPipeBind
ListType
SPBaseType
SPBaseType
Web
Specifies the URL or GUID of the Web containing the list to be retrieved.
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.
SPWebPipeBind
SPWebPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPList -detailed". For technical information, type "Get-Help Get-SPList -full".
------------------EXAMPLE------------------
PS C:\> $list = Get-SPList "http://server_name/lists/mylist"
This example retrieves the list at http://server_name/lists/mylist.
Remove-SPList
Copy-SPList
Copy-SPListSecurity
Export-SPListSecurity
Get-SPWeb
Start-SPAssignment
Stop-SPAssignment
Get-SPListOverlays
Lists
Retrieve all SPList objects set as a calendar overlay on the given list.
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.
Get
SPListOverlays
1.0.0.0
Retrieve all SPList objects set as a calendar overlay on the given list.
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.
Get-SPListOverlays
Identity
SPListPipeBind
Web
SPWebPipeBind
AssignmentCollection
SPAssignmentCollection
Identity
The calendar whose calendar overlays will be retrieved.
The value must be a valid URL in the form http://server_name/lists/listname or /lists/listname. If a server relative URL is provided then the Web parameter must be provided.
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the calendar whose overlays will be retrieved.
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.
SPWebPipeBind
SPWebPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPListOverlays -detailed". For technical information, type "Get-Help Get-SPListOverlays -full".
------------------EXAMPLE------------------
PS C:\> $lists = Get-SPListOverlays "http://server_name/lists/mylist"
This example retrieves the calendar overlays for the calendar at http://server_name/lists/mycalendar.
Get-SPList
Set-SPListOverlay
Get-SPWeb
Import-SPListSecurity
Lists
Export the security settings and permissions from a list.
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.
Import
SPListSecurity
1.0.0.0
Export the security settings and permissions from a list.
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.
Import-SPListSecurity
List
SPListPipeBind
Input
XmlDocumentPipeBind
IncludeItemSecurity
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Import-SPListSecurity
Web
SPWebPipeBind
Input
XmlDocumentPipeBind
IncludeItemSecurity
SwitchParameter
AssignmentCollection
SPAssignmentCollection
List
The list whose security will be updated.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the lists whose security will be updated.
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.
SPWebPipeBind
SPWebPipeBind
Input
The path to the file containing the security settings to import.
XmlDocumentPipeBind
XmlDocumentPipeBind
IncludeItemSecurity
In addition to the list level security copy the security settings of individual items.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Import-SPListSecurity -detailed". For technical information, type "Get-Help Import-SPListSecurity -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPList "http://server_name/lists/list1" | Import-SPListSecurity -Path "c:\listsecurity.xml"
This example imports the security settings and permissions from c:\listsecurity.xml and applies them to list1.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWeb "http://server_name" | Import-SPListSecurity -Path "c:\listsecurity.xml"
This example imports the security settings and permissions from c:\listsecurity.xml and applies them to matching lists found in http://server_name.
Copy-SPListSecurity
Export-SPListSecurity
Get-SPList
Import-SPWeb2
Lists
The Import-SPWeb2 cmdlet imports a site collection, Web application, list, or library. This cmdlet extends the capabilities of the Import-SPWeb cmdlet by exposing additional parameters.
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.
Import
SPWeb2
1.0.0.0
The Import-SPWeb2 cmdlet imports a site collection, Web application, list, or library. This cmdlet extends the capabilities of the Import-SPWeb cmdlet by exposing additional parameters.
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.
Import-SPWeb2
Identity
SPWebPipeBind
RetainObjectIdentity
SwitchParameter
SuppressAfterEvents
SwitchParameter
UpdateVersions
Append | Overwrite | Ignore
Force
SwitchParameter
HaltOnError
SwitchParameter
HaltOnWarning
SwitchParameter
IncludeUserSecurity
SwitchParameter
NoFileCompression
SwitchParameter
NoLogFile
SwitchParameter
Path
String
AssignmentCollection
SPAssignmentCollection
Identity
Specifies the URL or GUID of the Web to be exported.
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.
SPWebPipeBind
SPWebPipeBind
RetainObjectIdentity
SwitchParameter
SwitchParameter
SuppressAfterEvents
SwitchParameter
SwitchParameter
UpdateVersions
SPUpdateVersions
SPUpdateVersions
Force
Forcefully overwrites the export package if it already exists.
SwitchParameter
SwitchParameter
HaltOnError
Stops the export/import process when an error occurs.
SwitchParameter
SwitchParameter
HaltOnWarning
Stops the export/import process when a warning occurs.
SwitchParameter
SwitchParameter
IncludeUserSecurity
Preserves the user security settings.
SwitchParameter
SwitchParameter
NoFileCompression
Either enables or disables file compression in the export package. The export package is stored in the folder specified by thePath parameter or Identity parameter. We recommend that you use this parameter for performance reasons. If compression is enabled, the export process can increase by approximately 30 percent.
SwitchParameter
SwitchParameter
NoLogFile
Suppresses the generation of an export log file. If this parameter is not specified, the cmdlet will generate an export log file in the same location as the export package. The log file uses Unified Logging Service (ULS).
It is recommended to use this parameter. However, for performance reasons, you might not want to generate a log file.
SwitchParameter
SwitchParameter
Path
Specifies the name of the export file.
If the NoFileCompression parameter is used, a directory must be specified; otherwise, any file format is valid.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Import-SPWeb2 -detailed". For technical information, type "Get-Help Import-SPWeb2 -full".
Export-SPWeb2
Export-SPWeb
Import-SPWeb
New-SPFile
Lists
Creates a new file within a list.
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.
New
SPFile
1.0.0.0
Creates a new file within a list.
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.
New-SPFile
List
SPListPipeBind
File
String
Overwrite
SwitchParameter
FieldValues
PropertiesPipeBind
AssignmentCollection
SPAssignmentCollection
New-SPFile
Folder
SPFolderPipeBind
File
String
Overwrite
SwitchParameter
FieldValues
PropertiesPipeBind
AssignmentCollection
SPAssignmentCollection
List
Specifies the List to add the file to.
The type must be a valid absolute URL, in the form http://contoso.sharepoint.com/site_name/lists/list_name, or an SPOList object, Microsoft.SharePoint.Client.List object, List title, or GUID representing the List ID.
SPListPipeBind
SPListPipeBind
Folder
Specifies the Folder to add the file to.
The type must be a valid SPOFolder object.
SPFolderPipeBind
SPFolderPipeBind
File
Specify the path to the file to add to the list.
String
String
Overwrite
Overwrite an existing file if present.
SwitchParameter
SwitchParameter
FieldValues
The collection of field values to set where the key is the internal field name. The type must be a hash table where each key represents the name of a field whose value should be set to the corresponding key value (e.g., @{"Field1"="Value1";"Field2"="Value2"}). Alternatively, provide the path to a file with XML property settings (<Properties><Property Name="Name1">Value1</Property><Property Name="Name2">Value2</Property></Properties>).
PropertiesPipeBind
PropertiesPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPFile -detailed". For technical information, type "Get-Help New-SPFile -full".
------------------EXAMPLE------------------
PS C:\> New-SPFile -List "http://server_name/documents" -File "c:\myfile.txt" -FieldValues @{"Title"="My new file"}
This example creates a new file within the List My List under the root Site of the current Site Collection.
Get-SPList
New-SPFolder
Lists
Creates a new folder within a list.
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.
New
SPFolder
1.0.0.0
Creates a new folder within a list.
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.
New-SPFolder
List
SPListPipeBind
Path
String
AssignmentCollection
SPAssignmentCollection
List
The list to add the field to.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
Path
The list relative folder path to create to create. Example: "TopLevelFolder/ChildFolder1"
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPFolder -detailed". For technical information, type "Get-Help New-SPFolder -full".
------------------EXAMPLE------------------
PS C:\> $folder = Get-SPList http://server_name/documents | New-SPFolder -Path "TopLevelFolder/ChildFolder1"
This example creates a TopLevelFolder with a sub-folder called ChildFolder1 at http://server_name/documents.
Get-SPList
New-SPList
Lists
Creates a new list.
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.
New
SPList
1.0.0.0
Creates a new list.
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.
New-SPList
Web
SPWebPipeBind
Title
String
UrlName
String
FeatureId
Guid
TemplateType
Int32
Description
String
DocTemplateType
Int32
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web to create the list in.
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.
SPWebPipeBind
SPWebPipeBind
Title
The list title. Example: "My List"
String
String
UrlName
The URL name of the list to create. Example: "MyList"
String
String
FeatureId
The feature ID to which the list definition belongs.
Guid
Guid
TemplateType
An integer corresponding to the list definition type.
Int32
Int32
Description
The list description.
String
String
DocTemplateType
The ID for the document template type.
Int32
Int32
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPList -detailed". For technical information, type "Get-Help New-SPList -full".
------------------EXAMPLE------------------
PS C:\> $list = Get-SPWeb http://server_name | New-SPList -UrlName "MyDocs" -Title "My Docs" -FeatureId "00BFEA71-E717-4E80-AA17-D0C71B360101" -TemplateType 101 -DocTemplateType 100
This example creates a standard document library at http://server_name/MyDocs.
Get-SPList
Publish-SPListItems
Lists
Publish any draft or pending items.
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.
Publish
SPListItems
1.0.0.0
Publish any draft or pending items.
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.
Publish-SPListItems
TakeOverFilesWithNoCheckIn
SwitchParameter
FilterExpression
String
List
SPListPipeBind
LogFile
String
Comment
String
AssignmentCollection
SPAssignmentCollection
Publish-SPListItems
TakeOverFilesWithNoCheckIn
SwitchParameter
FilterExpression
String
Web
SPWebPipeBind
LogFile
String
Comment
String
AssignmentCollection
SPAssignmentCollection
Publish-SPListItems
TakeOverFilesWithNoCheckIn
SwitchParameter
FilterExpression
String
Site
SPSitePipeBind
LogFile
String
Comment
String
AssignmentCollection
SPAssignmentCollection
Publish-SPListItems
TakeOverFilesWithNoCheckIn
SwitchParameter
FilterExpression
String
WebApplication
SPWebApplicationPipeBind
LogFile
String
Comment
String
AssignmentCollection
SPAssignmentCollection
Publish-SPListItems
TakeOverFilesWithNoCheckIn
SwitchParameter
FilterExpression
String
Farm
SPFarmPipeBind
LogFile
String
Comment
String
AssignmentCollection
SPAssignmentCollection
Publish-SPListItems
ListItem
SPListItemPipeBind
ParentList
SPListPipeBind
LogFile
String
Comment
String
AssignmentCollection
SPAssignmentCollection
TakeOverFilesWithNoCheckIn
Take over ownership of any files that do not have an existing check-in.
SwitchParameter
SwitchParameter
FilterExpression
A regular expression to match against the file name. For example, to only publish Word and Excel files use the following expression: "\.((docx)|(xlsx))$". If specified, list items are ignored (only files are published).
String
String
LogFile
The filename to save all details to.
String
String
ListItem
The list item to publish.
SPListItemPipeBind
SPListItemPipeBind
ParentList
The list containing the item to publish.
SPListPipeBind
SPListPipeBind
List
The list containing the items to publish.
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the list items to publish.
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.
SPWebPipeBind
SPWebPipeBind
Site
The site containing the list items to publish.
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.
SPSitePipeBind
SPSitePipeBind
WebApplication
The web application containing the list items to publish.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Farm
A valid SPFarm object. All items in the farm will be published.
SPFarmPipeBind
SPFarmPipeBind
Comment
A comment to associated with each checked in, published, and approved item.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Publish-SPListItems -detailed". For technical information, type "Get-Help Publish-SPListItems -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPList "http://server_name/pages" | Publish-SPListItems -ListItem 1
This example publishes item with ID 1 in the pages library located at http://server_name.
------------------EXAMPLE 2-----------------------
PS C:\> Publish-SPListItems -ListItem "http://server_name/pages/default.aspx"
This example publishes http://server_name/pages/default.aspx.
------------------EXAMPLE 3-----------------------
PS C:\> Get-SPList "http://server_name/pages" | Publish-SPListItems
This example publishes all items in the pages library located at http://server_name.
------------------EXAMPLE 4-----------------------
PS C:\> Get-SPWeb "http://server_name/" | Publish-SPListItems
This example publishes all items in the web located at http://server_name. This will no recurse through sub-webs.
------------------EXAMPLE 5-----------------------
PS C:\> Get-SPSite "http://server_name/" | Publish-SPListItems
This example publishes all items in the site located at http://server_name. This will recurse through sub-webs.
------------------EXAMPLE 6-----------------------
PS C:\> Get-SPWebApplication "http://server_name/" | Publish-SPListItems
This example publishes all items in the web application located at http://server_name. This will recurse through all sites and sub-webs.
------------------EXAMPLE 7-----------------------
PS C:\> Get-SPFarm | Publish-SPListItems
This example publishes all items in the farm. This will recurse through all web applications, sites, and sub-webs.
Get-SPList
Get-SPWeb
Get-SPSite
Get-SPWebApplication
Get-SPFarm
Remove-SPField
Lists
The Remove-SPField cmdlet deletes the specified field from the given list or web.
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.
Remove
SPField
1.0.0.0
The Remove-SPField cmdlet deletes the specified field from the given list or web.
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.
Remove-SPField
Web
SPWebPipeBind
InternalFieldName
String
Force
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Remove-SPField
List
SPListPipeBind
InternalFieldName
String
Force
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Remove-SPField
Field
SPField
Force
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Web
The web to remove the field from.
The value must be a valid URL in the form http://server_name
SPWebPipeBind
SPWebPipeBind
List
The list to remove the field from.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
Field
The field to remove.
The value must be a valid SPField object.
SPField
SPField
InternalFieldName
The internal name of the field to remove from the list.
String
String
Force
Used to force deletion if AllowDeletion property is false.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Remove-SPField -detailed". For technical information, type "Get-Help Remove-SPField -full".
------------------EXAMPLE 1-----------------------
PS C:\> Remove-SPField -Web "http://demo" -InternalFieldName "MyField"
This example deletes the "MyField" field from the web "http://demo".
------------------EXAMPLE 2-----------------------
PS C:\> Remove-SPField -List "http://demo/documents" -InternalFieldName "MyField"
This example deletes the "MyField" field from the list "http://demo/documents".
------------------EXAMPLE 3-----------------------
PS C:\> (Get-SPList "http://demo/documents").Fields.GetFieldByInternalName("MyField") | Remove-SPField -InternalFieldName "MyField"
This example deletes the "MyField" field from the list "http://demo/documents".
Get-SPList
Replace-SPListContent
Lists
Replaces all occurances of the search string with the replacement string. Supports the use of regular expressions. Use -WhatIf to verify your replacements before executing.
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.
Replace
SPListContent
1.0.0.0
Replaces all occurances of the search string with the replacement string. Supports the use of regular expressions. Use -WhatIf to verify your replacements before executing.
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.
Replace-SPListContent
InputFile
String
InputFileDelimiter
String
List
SPListPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
InputFile
String
InputFileDelimiter
String
Web
SPWebPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
InputFile
String
InputFileDelimiter
String
Site
SPSitePipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
InputFile
String
InputFileDelimiter
String
WebApplication
SPWebApplicationPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
InputFile
String
InputFileDelimiter
String
Farm
SPFarmPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
XmlInputFile
XmlDocumentPipeBind
List
SPListPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
XmlInputFile
XmlDocumentPipeBind
Web
SPWebPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
XmlInputFile
XmlDocumentPipeBind
Site
SPSitePipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
XmlInputFile
XmlDocumentPipeBind
WebApplication
SPWebApplicationPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
XmlInputFile
XmlDocumentPipeBind
Farm
SPFarmPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
SearchString
String
ReplaceString
String
List
SPListPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
SearchString
String
ReplaceString
String
Web
SPWebPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
SearchString
String
ReplaceString
String
Site
SPSitePipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
SearchString
String
ReplaceString
String
WebApplication
SPWebApplicationPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Replace-SPListContent
SearchString
String
ReplaceString
String
Farm
SPFarmPipeBind
Publish
SwitchParameter
LogFile
String
FieldName
String[]
UseInternalFieldName
SwitchParameter
AssignmentCollection
SPAssignmentCollection
InputFile
A file with search and replace strings, seperated by a "|" character (each search and replace string should be on a separate line).
String
String
InputFileDelimiter
The delimiter used within the input file specified by the -InputFile parameter (the default is "|" if not specified).
String
String
XmlInputFile
An XML file or XmlDocument containing the replacements to make: <Replacements><Replacement><SearchString>string</SearchString><ReplaceString>string</ReplaceString></Replacement></Replacements>
XmlDocumentPipeBind
XmlDocumentPipeBind
SearchString
A regular expression search string.
String
String
ReplaceString
The string to replace the match with.
String
String
List
The list whose content will be replaced.
The value must be a valid URL in the form http://server_name
SPListPipeBind
SPListPipeBind
Web
Specifies the URL or GUID of the Web containing the lists whose content will be replaced.
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.
SPWebPipeBind
SPWebPipeBind
Site
The site containing the lists whose content will be replaced.
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.
SPSitePipeBind
SPSitePipeBind
WebApplication
The web application containing the lists whose content will be replaced.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind
SPWebApplicationPipeBind
Farm
Provide the SPFarm object to replace matching content in all lists throughout the farm.
SPFarmPipeBind
SPFarmPipeBind
Publish
Publish or check-in the item after updating the contents.
SwitchParameter
SwitchParameter
LogFile
The log file to store all change records to.
String
String
FieldName
The name of the field to update.
String[]
String[]
UseInternalFieldName
If specified then the internal name of the field will be used; otherwise the display name will be used.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Replace-SPListContent -detailed". For technical information, type "Get-Help Replace-SPListContent -full".
------------------EXAMPLE------------------
PS C:\> Get-SPWeb http://portal | Replace-SPListContent -SearchString "(?i:old product name)" -ReplaceString "New Product Name" -Publish
This example does a case-insensitive search for "old product name" and replaces with "New Product Name" and publishes the changes after completion.
Get-SPList
Get-SPFarm
Get-SPWebApplication
Get-SPSite
Get-SPWeb
Set-SPListAudienceTargeting
Lists
Sets audience targeting for the specified list.
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.
Set
SPListAudienceTargeting
1.0.0.0
Sets audience targeting for the specified list.
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.
Set-SPListAudienceTargeting
Identity
SPListPipeBind
Web
SPWebPipeBind
Enabled
Boolean
AssignmentCollection
SPAssignmentCollection
Identity
The list to update.
SPListPipeBind
SPListPipeBind
Web
The web containing the list. This parameter is required if the Identity parameter is a relative URL to a list.
SPWebPipeBind
SPWebPipeBind
Enabled
Enable or disable audience targeting. Valid values are $true or $false.
Boolean
Boolean
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPListAudienceTargeting -detailed". For technical information, type "Get-Help Set-SPListAudienceTargeting -full".
------------------EXAMPLE------------------
PS C:\> Get-SPList "http://server_name/lists/mylist" | Set-SPListAudienceTargeting -Enabled $true
This example enables audience targeting on the mylist list.
Get-SPList
Get-SPWeb
Set-SPListOverlay
Lists
Sets calendar overlays for the given list.
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.
Set
SPListOverlay
1.0.0.0
Sets calendar overlays for the given list.
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.
Set-SPListOverlay
Color
LightYellow | LightGreen | Orange | LightTurquise | Pink | LightBlue | IceBlue1 | IceBlue2 | White
OverlayList
SPListPipeBind
OverlayTitle
String
OverlayDescription
String
TargetList
SPListPipeBind
ViewName
String
DoNotAlwaysShow
SwitchParameter
ClearExisting
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPListOverlay
Color
LightYellow | LightGreen | Orange | LightTurquise | Pink | LightBlue | IceBlue1 | IceBlue2 | White
OverlayTitle
String
OverlayDescription
String
OwaUrl
String
WebServiceUrl
String
TargetList
SPListPipeBind
ViewName
String
DoNotAlwaysShow
SwitchParameter
ClearExisting
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Set-SPListOverlay
OverlayLists
SPListPipeBind[]
TargetList
SPListPipeBind
ViewName
String
DoNotAlwaysShow
SwitchParameter
ClearExisting
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Color
The color to use for the overlay calendar.
CalendarOverlayColor
CalendarOverlayColor
TargetList
The calendar list to add the overlays to.
SPListPipeBind
SPListPipeBind
ViewName
The name of the view to add the overlays to. If not specified the default view will be used.
String
String
OverlayList
The calendar list to add as an overlay.
SPListPipeBind
SPListPipeBind
OverlayLists
The calendar lists to add as an overlay.
SPListPipeBind[]
SPListPipeBind[]
OverlayTitle
The title to give the overlay calendar when viewed in the target calendar.
String
String
OverlayDescription
The description to give the overlay calendar when viewed in the target calendar.
String
String
OwaUrl
Outlook Web Access URL.
String
String
WebServiceUrl
Exchange Web Service URL.
String
String
DoNotAlwaysShow
Don't always show the calendar overlay.
SwitchParameter
SwitchParameter
ClearExisting
Clear existing overlays. If not specified then all overlays will be appended to the list of existing overlays (up until 10 - anything after 10 will be ignored)
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPListOverlay -detailed". For technical information, type "Get-Help Set-SPListOverlay -full".
------------------EXAMPLE------------------
PS C:\> Get-SPList "http://server_name/lists/MyCalendar" | Set-SPListOverlay -TargetList "http://server_name/lists/MyOverlayCalendar" -Color "Pink" -ClearExisting
This example adds the MyOverlayCalendar calendar as an overlay to the MyCalendar list.
Get-SPList
Add-SPGroupPermission
Groups
Adds a permission to a SharePoint Group.
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.
Add
SPGroupPermission
1.0.0.0
Adds a permission to a SharePoint Group.
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.
Add-SPGroupPermission
Web
SPWebPipeBind
Identity
SPGroupPipeBind
Permission
String[]
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web containing the group to be created.
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.
SPWebPipeBind
SPWebPipeBind
Identity
Specifies the Name or ID of the Group to add the permission to.
The type must be a valid integer, or a valid group name (for example, Approvers); or an instance of a valid SPGroup object. If not an SPGroup object then the -Web parameter is required.
SPGroupPipeBind
SPGroupPipeBind
Permission
The permissions to assign to the group
String[]
String[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Add-SPGroupPermission -detailed". For technical information, type "Get-Help Add-SPGroupPermission -full".
------------------EXAMPLE------------------
PS C:\> Get-SPGroup -Web "http://demo" -Name "My Group" | Add-SPGroupPermission -Permission "Approve","Contribute"
This example adds the Approve and Contribute permissions to the "My Group" group in the http://demo site.
Get-SPGroup
New-SPGroup
Get-SPGroup
Groups
Retrieve a SharePoint Group from a Site.
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.
Get
SPGroup
1.0.0.0
Retrieve a SharePoint Group from a Site.
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.
Get-SPGroup
Web
SPWebPipeBind
Identity
SPGroupPipeBind[]
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web containing the group to be retrieved.
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.
SPWebPipeBind
SPWebPipeBind
Identity
Specifies the Name or ID of the Group to be retrieved.
The type must be a valid integer, or a valid group name (for example, Approvers); or an instance of a valid SPGroup object. If not an SPGroup object then the -Web parameter is required.
SPGroupPipeBind[]
SPGroupPipeBind[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPGroup -detailed". For technical information, type "Get-Help Get-SPGroup -full".
------------------EXAMPLE------------------
PS C:\> $group = Get-SPGroup -Web "http://demo" -Identity "Approvers"
This example retrieves the Approvers group from the http://demo site.
New-SPGroup
Remove-SPGroup
New-SPGroup
Groups
Creates a SharePoint Group in a Site.
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.
New
SPGroup
1.0.0.0
Creates a SharePoint Group in a Site.
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.
New-SPGroup
Web
SPWebPipeBind
Name
String
Owner
SPUserPipeBind
DefaultUser
SPUserPipeBind
Description
String
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web containing the group to be created.
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.
SPWebPipeBind
SPWebPipeBind
Name
Specifies the name of the group to create.
String
String
Owner
Specifies the owner of the new group.
SPUserPipeBind
SPUserPipeBind
DefaultUser
Specifies the default user to add to the new group. If not specified then the Owner will be used.
SPUserPipeBind
SPUserPipeBind
Description
Specifies the description of the group to create.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPGroup -detailed". For technical information, type "Get-Help New-SPGroup -full".
------------------EXAMPLE------------------
PS C:\> $group = New-SPGroup -Web "http://demo" -Name "My Group" -Owner "domain\user" -Member "domain\user"
This example creates the "My Group" group in the http://demo site.
Get-SPGroup
Remove-SPGroup
Remove-SPGroup
Groups
Removes a SharePoint Group from a Site.
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.
Remove
SPGroup
1.0.0.0
Removes a SharePoint Group from a Site.
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.
Remove-SPGroup
Web
SPWebPipeBind
Identity
SPGroupPipeBind
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web containing the group to be removed.
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.
SPWebPipeBind
SPWebPipeBind
Identity
Specifies the Name or ID of the Group to be removed.
The type must be a valid integer, or a valid group name (for example, Approvers); or an instance of a valid SPGroup object. If not an SPGroup object then the -Web parameter is required.
SPGroupPipeBind
SPGroupPipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Remove-SPGroup -detailed". For technical information, type "Get-Help Remove-SPGroup -full".
------------------EXAMPLE------------------
PS C:\> Remove-SPGroup -Web "http://demo" -Identity "Approvers"
This example removes the Approvers group from the http://demo site.
New-SPGroup
Get-SPGroup
Remove-SPGroupPermission
Groups
Removes a permission from a SharePoint Group.
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.
Remove
SPGroupPermission
1.0.0.0
Removes a permission from a SharePoint Group.
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.
Remove-SPGroupPermission
Web
SPWebPipeBind
Identity
SPGroupPipeBind
Permission
String[]
AssignmentCollection
SPAssignmentCollection
Web
Specifies the URL or GUID of the Web containing the group to be created.
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.
SPWebPipeBind
SPWebPipeBind
Identity
Specifies the Name or ID of the Group to add the permission to.
The type must be a valid integer, or a valid group name (for example, Approvers); or an instance of a valid SPGroup object. If not an SPGroup object then the -Web parameter is required.
SPGroupPipeBind
SPGroupPipeBind
Permission
The permissions to assign to the group
String[]
String[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Remove-SPGroupPermission -detailed". For technical information, type "Get-Help Remove-SPGroupPermission -full".
------------------EXAMPLE------------------
PS C:\> Remove-SPGroupPermission -Web "http://demo" -Group "My Group" -Permission "Approve","Contribute"
This example removes the Approve and Contribute permissions from the My Group group from the http://demo site.
New-SPGroup
Get-SPGroup
Disable-SPFeature2
Features
Deactivates a feature or features at a given scope.
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.
Disable
SPFeature2
1.0.0.0
Deactivates a feature or features at a given scope.
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.
Disable-SPFeature2
PassThru
SwitchParameter
Identity
SPFeatureDefinitionPipeBind
Url
String
Force
SwitchParameter
IgnoreNonActive
SwitchParameter
DeactivateAtScope
Farm | WebApplication | Site | Web | Feature
AssignmentCollection
SPAssignmentCollection
PassThru
If provided, the cmdlet outputs the Feature definition object after disabling.
SwitchParameter
SwitchParameter
Identity
Specifies the name of the Feature or GUID to uninstall.
The type must be the name of the Feature folder located in the 14\Template\Features folder or GUID, in the form 21d186e1-7036-4092-a825-0eb6709e9281.
SPFeatureDefinitionPipeBind
SPFeatureDefinitionPipeBind
Url
Specifies the URL of the Web application, site collection, or Web site for which the Feature is being deactivated.
The type must be a valid URL; for example, http://server_name.
String
String
Force
Forces the deactivation of a Feature. This causes any custom code associated with the Feature to rerun.
SwitchParameter
SwitchParameter
IgnoreNonActive
Ignore scopes where the feature is not already activated.
SwitchParameter
SwitchParameter
DeactivateAtScope
Deactivate features at the specified scope only. Valid values are Farm, WebApplication, Site, Web, and Feature
Nullable`1
Nullable`1
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Disable-SPFeature2 -detailed". For technical information, type "Get-Help Disable-SPFeature2 -full".
------------------EXAMPLE------------------
PS C:\> Get-SPFeature MyFeature | Disable-SPFeature2 -Url "http://server_name" -IgnoreNonActive -DeactivateAtScope WebApplication
This example deactivates all occurences of MyFeature in the http://server_name web application.
Enable-SPFeature2
Disable-SPFeature
Enable-SPFeature
Get-SPFeature
Enable-SPFeature2
Features
Activates a feature or features at a given scope.
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.
Enable
SPFeature2
1.0.0.0
Activates a feature or features at a given scope.
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.
Enable-SPFeature2
PassThru
SwitchParameter
Identity
SPFeatureDefinitionPipeBind
Url
String
Force
SwitchParameter
IgnoreNonActive
SwitchParameter
ActivateAtScope
Farm | WebApplication | Site | Web | Feature
AssignmentCollection
SPAssignmentCollection
PassThru
If provided, the cmdlet outputs the Feature definition object after enabling.
SwitchParameter
SwitchParameter
Identity
Specifies the name of the Feature or GUID to activate.
The type must be the name of the Feature folder located in the 14\Template\Features folder or GUID, in the form 21d186e1-7036-4092-a825-0eb6709e9281.
SPFeatureDefinitionPipeBind
SPFeatureDefinitionPipeBind
Url
Specifies the URL of the Web application, Site Collection, or Site for which the Feature is being activated.
The type must be a valid URL; for example, http://server_name.
String
String
Force
Forces the activation of a Feature. This causes any custom code associated with the Feature to rerun.
SwitchParameter
SwitchParameter
IgnoreNonActive
Ignore scopes where the feature is not already activated.
SwitchParameter
SwitchParameter
ActivateAtScope
Activate features at the specified scope only. Valid values are Farm, WebApplication, Site, Web, and Feature
Nullable`1
Nullable`1
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Enable-SPFeature2 -detailed". For technical information, type "Get-Help Enable-SPFeature2 -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPFeature MyFeature | Enable-SPFeature2 -Url "http://server_name" -ActivateAtScope WebApplication
This example activates MyFeature in the http://server_name web application. If the Feature is scoped to a site collection or web then it will activate at all sites or webs.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPFeature MyFeature | Enable-SPFeature2 -Url "http://server_name" -IgnoreNonActive -ActivateAtScope WebApplication
This example activates MyFeature in the http://server_name web application where it is already active thus causing any feature activation code to rerun.
Disable-SPFeature2
Disable-SPFeature
Enable-SPFeature
Get-SPFeature
Get-SPFeatureActivations
Features
Retrieves all publishing pages from the specified source.
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.
Get
SPFeatureActivations
1.0.0.0
Retrieves all publishing pages from the specified source.
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.
Get-SPFeatureActivations
Identity
SPFeatureDefinitionPipeBind[]
NeedsUpgrade
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Get-SPFeatureActivations
Solution
SPSolutionPipeBind[]
NeedsUpgrade
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Identity
Specifies the name of the Feature or GUID to activate.
The type must be the name of the Feature folder located in the 14\Template\Features folder or GUID, in the form 21d186e1-7036-4092-a825-0eb6709e9281.
SPFeatureDefinitionPipeBind[]
SPFeatureDefinitionPipeBind[]
Solution
Specifies the SharePoint Slution Package containing the Features whose activations will be retrieved.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a SharePoint Solution (for example, SPSolution1); or an instance of a valid SPSolution object.
SPSolutionPipeBind[]
SPSolutionPipeBind[]
NeedsUpgrade
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPFeatureActivations -detailed". For technical information, type "Get-Help Get-SPFeatureActivations -full".
------------------EXAMPLE 1-----------------------
PS C:\> $features = Get-SPFeatureActivations -Identity "TeamCollab" | select @{Expression={$_.Parent.Url}}
This example returns back all Feature activations for the Site-scoped Feature TeamCollab and displays the URL of the Site where the Feature is activated.
------------------EXAMPLE 2-----------------------
PS C:\> $features = Get-SPFeatureActivations -Solution "MyCustomSolution.wsp"
This example returns back all Feature activations for all Features defined by the MyCustomSolution.wsp Solution Package.
Enable-SPFeature2
Disable-SPFeature2
Get-SPFeature
Enable-SPFeature
Disable-SPFeature
Backup-SPSite2
Farm
The Backup-SPSite cmdlet performs a backup of the site collection when the Identity parameter is used.
By default, the site collection will be set to read-only for the duration of the backup to reduce the potential for user activity during the backup operation which could corrupt the backup. If you have SQL Server Enterprise Edition, we recommend that UseSqlSnapshot parameter be used because this ensures a valid backup while it allows users to continue reading and writing to the site collection during the backup.
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.
Backup
SPSite2
1.0.0.0
The Backup-SPSite cmdlet performs a backup of the site collection when the Identity parameter is used.
By default, the site collection will be set to read-only for the duration of the backup to reduce the potential for user activity during the backup operation which could corrupt the backup. If you have SQL Server Enterprise Edition, we recommend that UseSqlSnapshot parameter be used because this ensures a valid backup while it allows users to continue reading and writing to the site collection during the backup.
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.
Backup-SPSite2
Identity
SPSitePipeBind[]
IncludeIis
SwitchParameter
Overwrite
SwitchParameter
Path
String
NoSiteLock
SwitchParameter
UseSqlSnapshot
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Backup-SPSite2
WebApplication
SPWebApplicationPipeBind[]
IncludeIis
SwitchParameter
Overwrite
SwitchParameter
Path
String
NoSiteLock
SwitchParameter
UseSqlSnapshot
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Backup-SPSite2
Farm
SPFarmPipeBind
IncludeIis
SwitchParameter
Overwrite
SwitchParameter
Path
String
NoSiteLock
SwitchParameter
UseSqlSnapshot
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Identity
The site to backup.
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.
SPSitePipeBind[]
SPSitePipeBind[]
WebApplication
The web application to backup.
The type must be a valid URL, in the form http://server_name; or an instance of a valid SPWebApplication object.
SPWebApplicationPipeBind[]
SPWebApplicationPipeBind[]
Farm
A valid SPFarm object.
SPFarmPipeBind
SPFarmPipeBind
IncludeIis
Include IIS settings in the backup.
SwitchParameter
SwitchParameter
Overwrite
Overwrite existing backups.
SwitchParameter
SwitchParameter
Path
Specifies the full path to the backup file (that is, C:\Backup\site_name.bak).
String
String
NoSiteLock
Specifies the site collection to remain read and write during the backup.
If the NoSiteLock parameter is not specified, then a site collection that has a site collection lock setting of "none" or "no additions" will be temporarily set to "read only" while the site collection backup is performed. Once the backup has completed, the site collection lock will return to its original state. The backup package will record the original site collection lock state so that it is restored to that state.
If users are writing to the site collection while the site collection is being backed up, then the NoSiteLock parameter is not recommended for potential impact to backup integrity
SwitchParameter
SwitchParameter
UseSqlSnapshot
Specifies a SQL Database Snapshot will be created when the backup begins, and all site collection data will be retrieved directly from the database snapshot. This snapshot will be deleted automatically when the backup completes.
The UseSqlSnapshot parameter is recommended if the database server hosting your content database supports database snapshots such as such as SQL Server Enterprise Edition and SQL Server Developer Edition. This is because it will ensure a valid backup while allowing users to continue reading and writing to the site collection during the backup. It is not necessary to specify the NoSiteLock parameter when specifying the UseSqlSnapshot parameter.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Backup-SPSite2 -detailed". For technical information, type "Get-Help Backup-SPSite2 -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPSite "http://server_name" | Backup-SPSite2 -IncludeIis
This example backs up the site located at http://server_name along with the IIS settings for the host web application.
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPWebApplication "http://server_name" | Backup-SPSite2 -IncludeIis
This example backs up the web application located at http://server_name along with the IIS settings for the web application.
Get-SPSite
Backup-SPSite
Get-SPDeveloperDashboard
Farm
Retrieves the Developer Dashboard Settings object.
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.
Get
SPDeveloperDashboard
1.0.0.0
Retrieves the Developer Dashboard Settings object.
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.
Get-SPDeveloperDashboard
AssignmentCollection
SPAssignmentCollection
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPDeveloperDashboard -detailed". For technical information, type "Get-Help Get-SPDeveloperDashboard -full".
------------------EXAMPLE------------------
PS C:\> $dash = Get-SPDeveloperDashboard
This example returns back the developer dashboard settings object.
Set-SPDeveloperDashboard
Set-SPDeveloperDashboard
Farm
Sets the Developer Dashboard Settings.
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.
Set
SPDeveloperDashboard
1.0.0.0
Sets the Developer Dashboard Settings.
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.
Set-SPDeveloperDashboard
AutoLaunchEnabled
Boolean
DisplayLevel
Off | OnDemand | On
MaximumCriticalEventsToTrack
Int32
MaximumSQLQueriesToTrack
Int32
RequiredPermissions
EmptyMask | ViewListItems | AddListItems | EditListItems | DeleteListItems | ApproveItems | OpenItems | ViewVersions | DeleteVersions | CancelCheckout | ManagePersonalViews | ManageLists | ViewFormPages | AnonymousSearchAccessList | Open | ViewPages | AddAndCustomizePages | ApplyThemeAndBorder | ApplyStyleSheets | ViewUsageData | CreateSSCSite | ManageSubwebs | CreateGroups | ManagePermissions | BrowseDirectories | BrowseUserInfo | AddDelPrivateWebParts | UpdatePersonalWebParts | ManageWeb | AnonymousSearchAccessWebLists | UseClientIntegration | UseRemoteAPIs | ManageAlerts | CreateAlerts | EditMyUserInfo | EnumeratePermissions | FullMask
TraceEnabled
Boolean
AdditionalEventsToTrack
String[]
AssignmentCollection
SPAssignmentCollection
AutoLaunchEnabled
Indicates whether the developer dashboard can be auto launched.
Boolean
Boolean
DisplayLevel
Indicates whether the developer dashboard is set to Off, On, or On Demand.
SPDeveloperDashboardLevel
SPDeveloperDashboardLevel
MaximumCriticalEventsToTrack
The maximum number of critical events and asserts that will be recorded in a single transaction (i.e. one request or timer job). If a single transaction has more than this number of asserts the remainder will be ignored. This can be set to 0 to disable assert tracking.
Int32
Int32
MaximumSQLQueriesToTrack
The maximum number of SQL queries that will be recorded in a single transaction (i.e. one request or timer job). If a single transaction executes more than this number of requests the query will be counted but the query call stack and text will not be kept.
Int32
Int32
RequiredPermissions
A permission mask defining the permissions required to see the developer dashboard. This defaults to SPBasePermissions.AddAndCustomizePages.
SPBasePermissions
SPBasePermissions
TraceEnabled
Whether a link to display full verbose trace will be available at the bottom of the page when the developer dashboard is launched or not.
Boolean
Boolean
AdditionalEventsToTrack
A list of URL tags to track in addition to events with severity above High.
String[]
String[]
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPDeveloperDashboard -detailed". For technical information, type "Get-Help Set-SPDeveloperDashboard -full".
------------------EXAMPLE 1-----------------------
PS C:\> Set-SPDeveloperDashboard -DisplayLevel OnDemand -TraceEnabled $true
This example enables the developer dashboard.
------------------EXAMPLE 2-----------------------
PS C:\> Set-SPDeveloperDashboard -RequiredPermissions "ManageWeb,ManageSubwebs"
This example sets the required permissions to view the developer dashboard.
Get-SPDeveloperDashboard
Copy-SPContentType
Content Types
Copies all Content Types from one gallery to another.
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.
Copy
SPContentType
1.0.0.0
Copies all Content Types from one gallery to another.
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.
Copy-SPContentType
SourceContentType
SPContentTypePipeBind
SourceWeb
SPWebPipeBind
TargetWeb
SPWebPipeBind
NoWorkflows
SwitchParameter
NoDocTemplate
SwitchParameter
NoPolicies
SwitchParameter
NoDocInfoPanel
SwitchParameter
NoDocConversions
SwitchParameter
NoColumns
SwitchParameter
AssignmentCollection
SPAssignmentCollection
SourceContentType
The content type to copy. The type must be a valid content type name; a valid content type ID, in the form 0x0123...; or an instance of an SPContentType object.
SPContentTypePipeBind
SPContentTypePipeBind
SourceWeb
The source web containing the content type to copy.
The value must be a valid URL in the form http://server_name
SPWebPipeBind
SPWebPipeBind
TargetWeb
The target web containing to copy the content type to.
The value must be a valid URL in the form http://server_name
SPWebPipeBind
SPWebPipeBind
NoWorkflows
Do not copy any workflow associations.
SwitchParameter
SwitchParameter
NoDocTemplate
Do not copy the document template.
SwitchParameter
SwitchParameter
NoPolicies
Do not copy the information rights policies.
SwitchParameter
SwitchParameter
NoDocInfoPanel
Do not copy the document information panel.
SwitchParameter
SwitchParameter
NoDocConversions
Do not copy the document conversion settings.
SwitchParameter
SwitchParameter
NoColumns
Do not copy fields associated with the content type.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Copy-SPContentType -detailed". For technical information, type "Get-Help Copy-SPContentType -full".
------------------EXAMPLE------------------
PS C:\> Copy-SPContentType -SourceContentType ContentType1 -SourceWeb "http://server_name/sites/site1" -TargetWeb "http://server_name/sites/site2"
This example copies the ContentType1 content type from site1 to site2.
Export-SPContentType
Get-SPContentType
Propagate-SPContentType
Get-SPWeb
Export-SPContentType
Content Types
Exports a Content Types to an XML file or the pipeline.
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.
Export
SPContentType
1.0.0.0
Exports a Content Types to an XML file or the pipeline.
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.
Export-SPContentType
Web
SPWebPipeBind[]
ContentType
String
Group
String
ListName
String
ExcludeParentFields
SwitchParameter
IncludeFieldDefinitions
SwitchParameter
IncludeListBindings
SwitchParameter
RemoveEncodedSpaces
SwitchParameter
FeatureSafe
SwitchParameter
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPContentType
Web
SPWebPipeBind[]
Identity
SPContentTypePipeBind
ExcludeParentFields
SwitchParameter
IncludeFieldDefinitions
SwitchParameter
IncludeListBindings
SwitchParameter
RemoveEncodedSpaces
SwitchParameter
FeatureSafe
SwitchParameter
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPContentType
List
SPListPipeBind[]
ContentType
String
ExcludeParentFields
SwitchParameter
IncludeFieldDefinitions
SwitchParameter
IncludeListBindings
SwitchParameter
RemoveEncodedSpaces
SwitchParameter
FeatureSafe
SwitchParameter
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Export-SPContentType
List
SPListPipeBind[]
Identity
SPContentTypePipeBind
ExcludeParentFields
SwitchParameter
IncludeFieldDefinitions
SwitchParameter
IncludeListBindings
SwitchParameter
RemoveEncodedSpaces
SwitchParameter
FeatureSafe
SwitchParameter
OutputFile
String
AssignmentCollection
SPAssignmentCollection
Web
The source web containing the content type to export.
The value must be a valid URL in the form http://server_name
SPWebPipeBind[]
SPWebPipeBind[]
List
The source list containing the content type to export.
The value must be a valid URL in the form http://server_name
SPListPipeBind[]
SPListPipeBind[]
Identity
The name of the content type to export. The type must be a valid content type name; a valid content type ID, in the form 0x0123...; or an instance of an SPContentType object.
SPContentTypePipeBind
SPContentTypePipeBind
ContentType
The name of the content type to export.
String
String
Group
The content type group to export. Specifying this will filter the exported content types to just those items in the group.
String
String
ListName
The list name to filter by.
Specifying this along with the Web parameter will export content types from the list with the specified name only.
String
String
ExcludeParentFields
Exclude all fields defined in parent content types.
SwitchParameter
SwitchParameter
IncludeFieldDefinitions
Include the field definitions in the exported XML.
SwitchParameter
SwitchParameter
IncludeListBindings
Include the list bindings in the exported XML.
SwitchParameter
SwitchParameter
RemoveEncodedSpaces
Remove encoded spaces (_x0020_) in all field and content type names.
SwitchParameter
SwitchParameter
FeatureSafe
Remove any elements/attributes which are invalid in a SharePoint Solution Package Feature manifest file.
SwitchParameter
SwitchParameter
OutputFile
The path to the output file where the exported XML will be saved.
If omitted the output will be dumped to the pipeline.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPContentType -detailed". For technical information, type "Get-Help Export-SPContentType -full".
------------------EXAMPLE 1-----------------------
PS C:\> Export-SPContentType -ContentType "ContentType1" -Web "http://server_name/" -OutputFile "c:\contentTypes.xml"
This example exports the ContentType1 content type from http://server_name and saves it to contentTypes.xml.
------------------EXAMPLE 2-----------------------
PS C:\> Export-SPContentType -ContentType "ContentType1" -List "http://server_name/lists/mylist" -OutputFile "c:\contentTypes.xml"
This example exports the ContentType1 content type from the list located at http://server_name/lists/mylist and saves it to contentTypes.xml.
------------------EXAMPLE 3-----------------------
PS C:\> Get-SPWeb "http://server_name" | Export-SPContentType -Identity "ContentType1" -OutputFile "c:\contentTypes.xml"
This example exports ContentType1 from http://server_name and saves it to contentTypes.xml.
------------------EXAMPLE 4-----------------------
PS C:\> Get-SPList "http://server_name/lists/mylist/" | Export-SPContentType -Identity "ContentType1" -OutputFile "c:\contentTypes.xml"
This example exports ContentType1 from the list located at http://server_name/lists/mylist and saves them to contentTypes.xml.
------------------EXAMPLE 5-----------------------
PS C:\> Get-SPWeb "http://server_name/*" | Export-SPContentType -List "Documents" -OutputFile "c:\contentTypes.xml"
This example exports all content types from all lists named Documents in all webs at http://server_name/* and saves them to contentTypes.xml.
Copy-SPContentType
Get-SPContentType
Propagate-SPContentType
Get-SPList
Get-SPWeb
Get-SPContentType
Content Types
Retrieve an SPContentType object.
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.
Get
SPContentType
1.0.0.0
Retrieve an SPContentType object.
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.
Get-SPContentType
Web
SPWebPipeBind[]
Identity
SPContentTypePipeBind
AssignmentCollection
SPAssignmentCollection
Get-SPContentType
List
SPListPipeBind[]
Identity
SPContentTypePipeBind
AssignmentCollection
SPAssignmentCollection
Web
The source web containing the content type to retrieve.
The value must be a valid URL in the form http://server_name
SPWebPipeBind[]
SPWebPipeBind[]
List
The source list containing the content type to retrieve.
The value must be a valid URL in the form http://server_name
SPListPipeBind[]
SPListPipeBind[]
Identity
The name of the content type to return. The type must be a valid content type name; a valid content type ID, in the form 0x0123...; or an instance of an SPContentType object.
SPContentTypePipeBind
SPContentTypePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPContentType -detailed". For technical information, type "Get-Help Get-SPContentType -full".
------------------EXAMPLE 1-----------------------
PS C:\> $ct = Get-SPWeb "http://server_name" | Get-SPContentType -Identity "ContentType1"
This example retrieves ContentType1 from http://server_name.
------------------EXAMPLE 2-----------------------
PS C:\> $ct = Get-SPWeb "http://server_name" | Get-SPContentType
This example retrieves all content types from http://server_name.
------------------EXAMPLE 3-----------------------
PS C:\> $ct = Get-SPList "http://server_name/lists/mylist" | Get-SPContentType
This example retrieves all content types from http://server_name.
Copy-SPContentType
Export-SPContentType
Propagate-SPContentType
Get-SPList
Get-SPWeb
Get-SPContentTypeUsage
Content Types
Retrieve an SPContentTypeUsage object corresponding to the List or Site where a Content Type is utilized.
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.
Get
SPContentTypeUsage
1.0.0.0
Retrieve an SPContentTypeUsage object corresponding to the List or Site where a Content Type is utilized.
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.
Get-SPContentTypeUsage
Web
SPWebPipeBind[]
Identity
SPContentTypePipeBind
ListScopeOnly
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Web
The source web containing the content type usages to retrieve.
The value must be a valid URL in the form http://server_name
SPWebPipeBind[]
SPWebPipeBind[]
Identity
The name or ID of the Content Type to return associated usages.
SPContentTypePipeBind
SPContentTypePipeBind
ListScopeOnly
Specify to return only Content Type usages scoped to a list.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPContentTypeUsage -detailed". For technical information, type "Get-Help Get-SPContentTypeUsage -full".
------------------EXAMPLE------------------
PS C:\> $ct = Get-SPWeb "http://server_name" | Get-SPContentTypeUsage -Identity "ContentType1"
This example retrieves SPContentTypeUsage objects for all the Lists and Webs where ContentType1 is used.
Get-SPContentType
Get-SPList
Get-SPWeb
Propagate-SPContentType
Content Types
Propagates changes to a parent content type to all child content types.
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.
Propagate
SPContentType
1.0.0.0
Propagates changes to a parent content type to all child content types.
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.
Propagate-SPContentType
Site
SPSitePipeBind
Identity
SPContentTypePipeBind
UpdateFields
SwitchParameter
RemoveFields
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Site
The source site containing the content types to propagate.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The content type to propagate changes. The type must be a valid content type name; a valid content type ID, in the form 0x0123...; or an instance of an SPContentType object.
SPContentTypePipeBind
SPContentTypePipeBind
UpdateFields
Propagate changes to all fields.
SwitchParameter
SwitchParameter
RemoveFields
Remove fields defined in child content types which do not exist in the source content type.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Propagate-SPContentType -detailed". For technical information, type "Get-Help Propagate-SPContentType -full".
------------------EXAMPLE------------------
PS C:\> Get-SPSite "http://server_name" | Propagate-SPContentType -Identity "ContentType1" -UpdateFields
This example propgates changes to ContentType1 found in http://server_name to all child content types.
Copy-SPContentType
Export-SPContentType
Get-SPContentType
Get-SPSite
Export-SPAudienceRules
Audiences
Exports the rules for an audience.
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.
Export
SPAudienceRules
1.0.0.0
Exports the rules for an audience.
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.
Export-SPAudienceRules
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
Explicit
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Export-SPAudienceRules
ContextSite
SPSitePipeBind
Identity
String
Explicit
SwitchParameter
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience rules to export.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audience rules to export.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to export.
String
String
Explicit
Shows field and value attributes for every rule.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPAudienceRules -detailed". For technical information, type "Get-Help Export-SPAudienceRules -full".
------------------EXAMPLE 1-----------------------
PS C:\> $xml = Export-SPAudienceRules -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Name "Human Resources"
This example gets the rules for the "Human Resources" audience from the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
------------------EXAMPLE 2-----------------------
PS C:\> $xml = Get-SPServiceApplication | where {$_.TypeName -eq "User Profile Service Application"} | Export-SPAudienceRules -Name "Human Resources"
This example gets the rules for the "Human Resources" audience(s) from all configured user profile service applications.
Export-SPAudiences
Import-SPAudiences
Get-SPServiceApplication
Export-SPAudiences
Audiences
Exports the audience and corresponding rules to XML.
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.
Export
SPAudiences
1.0.0.0
Exports the audience and corresponding rules to XML.
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.
Export-SPAudiences
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
Explicit
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Export-SPAudiences
ContextSite
SPSitePipeBind
Identity
String
Explicit
SwitchParameter
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience to export.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to export.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to export.
String
String
Explicit
Shows field and value attributes for every rule.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Export-SPAudiences -detailed". For technical information, type "Get-Help Export-SPAudiences -full".
------------------EXAMPLE 1-----------------------
PS C:\> Export-SPAudiences -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Name "Human Resources" | Set-Content c:\audiences.xml
This example exports the audience definitions and rules for the "Human Resources" audience from the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a" to the audiences.xml file.
------------------EXAMPLE 2-----------------------
PS C:\> Export-SPAudiences -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" | Set-Content c:\audiences.xml
This example exports all audience definitions and rules from the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a" to the audiences.xml file.
Export-SPAudienceRules
Import-SPAudiences
Get-SPServiceApplication
Get-SPAudience
Audiences
The Get-SPAudience cmdlet returns back one or more audiences for a given User Profile Service Application.
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.
Get
SPAudience
1.0.0.0
The Get-SPAudience cmdlet returns back one or more audiences for a given User Profile Service Application.
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.
Get-SPAudience
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
AssignmentCollection
SPAssignmentCollection
Get-SPAudience
ContextSite
SPSitePipeBind
Identity
String
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience to retrieve.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to retrieve.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to retrieve.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPAudience -detailed". For technical information, type "Get-Help Get-SPAudience -full".
------------------EXAMPLE 1-----------------------
PS C:\> Get-SPAudience -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Name "Human Resources"
This example gets the "Human Resources" audience from the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
------------------EXAMPLE 2-----------------------
PS C:\> Get-SPServiceApplication | where {$_.TypeName -eq "User Profile Service Application"} | Get-SPAudience -Name "Human Resources"
This example gets the "Human Resources" audience(s) from all configured user profile service applications.
------------------EXAMPLE 3-----------------------
PS C:\> Get-SPServiceApplication | where {$_.TypeName -eq "User Profile Service Application"} | Get-SPAudience
This example gets all audiences from all configured user profile service applications.
Export-SPAudienceRules
Export-SPAudiences
Import-SPAudiences
New-SPAudience
New-SPAudienceRule
Remove-SPAudience
Set-SPAudience
Get-SPServiceApplication
Get-SPAudienceManager
Audiences
Gets the AudienceManager object which can be used to manage audiences and rules.
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.
Get
SPAudienceManager
1.0.0.0
Gets the AudienceManager object which can be used to manage audiences and rules.
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.
Get-SPAudienceManager
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
AssignmentCollection
SPAssignmentCollection
Get-SPAudienceManager
ContextSite
SPSitePipeBind
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience manager to retrieve.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audience manager to retrieve.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Get-SPAudienceManager -detailed". For technical information, type "Get-Help Get-SPAudienceManager -full".
------------------EXAMPLE------------------
PS C:\> Get-SPAudienceManager -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a"
This example gets the audience manager for the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
Export-SPAudienceRules
Export-SPAudiences
Import-SPAudiences
New-SPAudience
New-SPAudienceRule
Remove-SPAudience
Set-SPAudience
Get-SPServiceApplication
Import-SPAudiences
Audiences
Imports the audience and corresponding rules from an XML file to the specified user profile service application.
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.
Import
SPAudiences
1.0.0.0
Imports the audience and corresponding rules from an XML file to the specified user profile service application.
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.
Import-SPAudiences
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
DeleteExisting
SwitchParameter
Compile
SwitchParameter
InputFile
String
MapFile
String
AssignmentCollection
SPAssignmentCollection
Import-SPAudiences
ContextSite
SPSitePipeBind
DeleteExisting
SwitchParameter
Compile
SwitchParameter
InputFile
String
MapFile
String
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audiences to import.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to update.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
DeleteExisting
Delete existing audiences prior to import.
SwitchParameter
SwitchParameter
Compile
Compile the audiences after import.
SwitchParameter
SwitchParameter
InputFile
XML file containing all audiences to import. The file can be generated using Export-SPAudiences.
String
String
MapFile
Generate a map file to use for search and replace of Audience IDs. Must be a valid filename.
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Import-SPAudiences -detailed". For technical information, type "Get-Help Import-SPAudiences -full".
------------------EXAMPLE------------------
PS C:\> Import-SPAudiences -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -DeleteExisting -Compile -InputFile c:\audiences.xml
This example imports the audience definitions and rules from the audiences.xml file to the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
Export-SPAudienceRules
Export-SPAudiences
Get-SPServiceApplication
New-SPAudience
Audiences
Create a new audience in the specified user profile service application.
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.
New
SPAudience
1.0.0.0
Create a new audience in the specified user profile service application.
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.
New-SPAudience
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
Membership
None | Any | All | Mix
Owner
String
Description
String
AssignmentCollection
SPAssignmentCollection
New-SPAudience
ContextSite
SPSitePipeBind
Identity
String
Membership
None | Any | All | Mix
Owner
String
Description
String
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application where the new audience will be created.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to update.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to create.
String
String
Membership
The condition under which membership is met. Valid values are None, Any, All, Mix (default is Any)
RuleEnum
RuleEnum
Owner
The audience owner in the form domain\user
String
String
Description
The audience description
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPAudience -detailed". For technical information, type "Get-Help New-SPAudience -full".
------------------EXAMPLE------------------
PS C:\> New-SPAudience -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Identity "Human Resources" -Membership Any -Owner domain\user -Description "All members of the Human Resources department."
This example creates a new audience named "Human Resources" in the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
New-SPAudienceRule
Set-SPAudience
Get-SPServiceApplication
New-SPAudienceRule
Audiences
Create a new audience in the specified user profile service application.
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.
New
SPAudienceRule
1.0.0.0
Create a new audience in the specified user profile service application.
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.
New-SPAudienceRule
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
Clear
SwitchParameter
GroupExisting
SwitchParameter
Compile
SwitchParameter
Rules
XmlDocument
AppendOperator
AND | OR
AssignmentCollection
SPAssignmentCollection
New-SPAudienceRule
ContextSite
SPSitePipeBind
Identity
String
Clear
SwitchParameter
GroupExisting
SwitchParameter
Compile
SwitchParameter
Rules
XmlDocument
AppendOperator
AND | OR
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to update.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to update.
String
String
Clear
Clear existing rules.
SwitchParameter
SwitchParameter
GroupExisting
Wraps any existing rules in parantheses.
SwitchParameter
SwitchParameter
Compile
Compile the audiences after update.
SwitchParameter
SwitchParameter
Rules
The rules XML should be in the following format: <rules><rule op='' field='' value='' /></rules>
Values for the "op" attribute can be any of "=,>,>=,<,<=,<>,Contains,Not contains,Reports Under,Member Of,AND,OR,(,)"
The "field" attribute is not required if "op" is any of "Reports Under,Member Of,AND,OR,(,)"
The "value" attribute is not required if "op" is any of "AND,OR,(,)"
Note that if your rules contain any grouping or mixed logic then you will not be able to manage the rule via the browser.
Example: <rules><rule op='Member of' value='sales department' /><rule op='AND' /><rule op='Contains' field='Department' value='Sales' /></rules>
XmlDocument
XmlDocument
AppendOperator
Operator used to append to existing rules. Valid values are AND or OR. Default is AND
Nullable`1
Nullable`1
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help New-SPAudienceRule -detailed". For technical information, type "Get-Help New-SPAudienceRule -full".
------------------EXAMPLE------------------
PS C:\> [xml]$rules = "<rules><rule op='Member of' value='sales department' /><rule op='AND' /><rule op='Contains' field='Department' value='Human Resources' /></rules>"
PS C:\> New-SPAudienceRule -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Identity "Human Resources" -Clear -Compile" -Rules $rules
This example adds a new rule to the audience named "Human Resources" in the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
New-SPAudience
Set-SPAudience
Get-SPServiceApplication
Remove-SPAudience
Audiences
The Remove-SPAudience cmdlet deletes the specified audience from the given User Profile Service Application.
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.
Remove
SPAudience
1.0.0.0
The Remove-SPAudience cmdlet deletes the specified audience from the given User Profile Service Application.
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.
Remove-SPAudience
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
DeleteRulesOnly
SwitchParameter
AssignmentCollection
SPAssignmentCollection
Remove-SPAudience
ContextSite
SPSitePipeBind
Identity
String
DeleteRulesOnly
SwitchParameter
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience to remove.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to update.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to remove.
String
String
DeleteRulesOnly
Delete only the rules associated with the audience.
SwitchParameter
SwitchParameter
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Remove-SPAudience -detailed". For technical information, type "Get-Help Remove-SPAudience -full".
------------------EXAMPLE 1-----------------------
PS C:\> Remove-SPAudience -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Name "Human Resources"
This example deletes the "Human Resources" audience from the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
------------------EXAMPLE 2-----------------------
PS C:\> Remove-SPAudience -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Name "Human Resources" -DeleteRulesOnly
This example deletes only the rules from the "Human Resources" audience located in the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
Export-SPAudienceRules
Export-SPAudiences
Import-SPAudiences
New-SPAudience
New-SPAudienceRule
Set-SPAudience
Get-SPServiceApplication
Set-SPAudience
Audiences
Create a new audience in the specified user profile service application.
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.
Set
SPAudience
1.0.0.0
Create a new audience in the specified user profile service application.
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.
Set-SPAudience
UserProfileServiceApplication
SPServiceApplicationPipeBind
SiteSubscription
SPSiteSubscriptionPipeBind
Identity
String
Membership
None | Any | All | Mix
Owner
String
Description
String
AssignmentCollection
SPAssignmentCollection
Set-SPAudience
ContextSite
SPSitePipeBind
Identity
String
Membership
None | Any | All | Mix
Owner
String
Description
String
AssignmentCollection
SPAssignmentCollection
UserProfileServiceApplication
Specifies the service application that contains the audience to update.
The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a service application (for example, ServiceApp1); or an instance of a valid SPServiceApplication object.
SPServiceApplicationPipeBind
SPServiceApplicationPipeBind
SiteSubscription
Specifies the site subscription containing the audiences to update.
The type must be a valid URL, in the form http://server_name; a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a site subscription (for example, SiteSubscription1); or an instance of a valid SiteSubscription object.
SPSiteSubscriptionPipeBind
SPSiteSubscriptionPipeBind
ContextSite
Specifies the URL or GUID of the Site to use for retrieving the service context. Use this parameter when the service application is not associated with the default proxy group or more than one custom proxy groups.
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.
SPSitePipeBind
SPSitePipeBind
Identity
The name of the audience to update.
String
String
Membership
The condition under which membership is met. Valid values are None, Any, All, Mix (default is Any)
Nullable`1
Nullable`1
Owner
The audience owner in the form domain\user
String
String
Description
The audience description
String
String
AssignmentCollection
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.
SPAssignmentCollection
SPAssignmentCollection
For more information, type "Get-Help Set-SPAudience -detailed". For technical information, type "Get-Help Set-SPAudience -full".
------------------EXAMPLE------------------
PS C:\> Set-SPAudience -UserProfileServiceApplication "30daa535-b0fe-4d10-84b0-fb04029d161a" -Identity "Human Resources" -Membership Any -Owner domain\user -Description "All members of the Human Resources department."
This example updates the audience named "Human Resources" in the user profile service application with ID "30daa535-b0fe-4d10-84b0-fb04029d161a".
New-SPAudienceRule
New-SPAudience
Get-SPServiceApplication