Chat now with support
Chat with Support

Metalogix StoragePoint 5.8 - PowerShell and API Reference Guide

PowerShell Guide
StoragePoint PowerShell Overview Getting Started Profile and Endpoint Management Cmdlets Timer Job Scheduling Cmdlets BLOB Information and Migration Cmdlets Miscellaneous SharePoint Utility Cmdlets PowerShell Script Examples StoragePoint API Reference

Set-ProfileEndPointSequence

This command allows users to change the sequence of endpoints associated to a profile.

Parameters

·ProfileName (p): The Id or name of the Profile. REQUIRED

·EndpointName (e): The Id or name of the endpoint. REQUIRED

·ProfileEndpointSequence (seq): Endpoint sequence or index number. The endpoint sequence start from 1 until n. REQUIRED

Examples

Move the Endpoint “EP1” to the first position

Set-ProfileEndpointSequence –p “ProfileName” –e “EP1” –seq 1

Move the Endpoint “EP1” to last position

Set-ProfileEndpointSequence –p “ProfileName” –e “EP1” –seq 1000

 

Set-ProfileArchiving

This command sets the Archiving feature to Yes on an existing profile. This is necessary to be able to use the Set-ArchivingRulesToProfile cmdlet, which is necessary for creating archiving conditions.

Parameters

·ProfileName (p): The Id or name of the Profile. REQUIRED

·Archiving (arch): Set to enable archiving. Use false to disable archiving.

Examples

Enable archiving on the profile

Set-ProfileArchiving –p “ProfileName”

Disable archiving on the profile

Set-ProfileArchiving –p “ProfileName” -arch:$false

Set-ArchiveRulesToProfile

This command allows archiving rules to be added to an existing profile. It can also be used to edit existing rules. Scopes and rules can be defined according to archiving restrictions.

·If archiving isn't enabled on a profile, use Set-ProfileArchiving before adding rules to the profile.

·After the rules are added, use Set-ArchvingMetadataJob, Set-ArchivingVersionJob, or Set-ArchivingAgingJob to process existing content.

Parameters

·ProfileName (p): The Id or name of the profile. REQUIRED

·RuleScope (rs): The scope of the archive rule. This cannot be broader than the scope of the profile. REQUIRED

owa:<Web Application Id>/cdb:<Content DB Id>/s:<site collection Id>/w:<web page id>/l:<list Id:>/c:<content type name string>

oThe profile scope ID along with the rule scope ID must be included. See examples below.

·ArchiveRuleType (art) : The type of archive rule - "age", metadata" or "version". REQUIRED

·RuleDefinitions (rds): Conditions for the type of archiving rule specified, in an XML format.

oAge - "<rules><age><DateProperty>Date Property ={created,modified}</DateProperty><Duration>integer value</Duration><Interval>interval value={day,month,year}</Interval><VersionOptions>version option = {major,minor,major-minor}</VersionOptions><MetadataProperty>Metadata Property Name</MetadataProperty><Operator>Operator Value</Operator><Value>Metadata Value</Value><DestinationEndpoint>Endpoint Name</DestinationEndpoint></age><rules>”

oMetadata - "<rules><metadata><VersionOptions>version option = {major,minor,major-minor}</VersionOptions><MetadataProperty>Metadata Property Name</MetadataProperty><Operator>Operator Value={=,<>,Contains,Begins,>=,<=}</Operator><Value>Metadata Value</Value><DestinationEndpoint>Endpoint Name</DestinationEndpoint></metadata></rules>”

§NOTE: For Operator, values (>=,<=,>,<, <>) cannot be entered directly; it will not work with the xml format. Instead, use the following syntax:

&lt; (<), &gt; (>).

oVersion -

§All But Current Versions - "<rules><version><VersionType>*</VersionType><MetadataProperty>Metadata Property Name</MetadataProperty><Operator>Operator Value</Operator><Value>Metadata Value</Value><DestinationEndpoint>Endpoint Name</DestinationEndpoint></version></rules>”

§Specific Versions - “<rules><version><VersionType>range</VersionType><From>From version value</From>/<To>To version Value</To></VersionOptions>Version options value={major, minor or major-minor}</VersionOptions><MetadataProperty>Metadata Property Name</MetadataProperty><Operator>Operator Value</Operator><Value>Metadata Value</Value><DestinationEndpoint>Endpoint Name</DestinationEndpoint></version></rules>”

·NOTE: For optional metadata criteria on Version and Age rules, <MetadataProperty>,<Operator> and <Value> need to be set as None if not being used.

Examples

The following examples shows how to add archive rules to a profile. .

Age rule (one condition). This example shows how to create an age rule with a web application scope.

Set-ArchiveRulesToProfile –p "SharePoint-30293" -RuleScope "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7" -ArchiveRuleType "age" –RuleDefinitions "<rules><age><DateProperty>Created</DateProperty><Duration>1</Duration><Interval>day</Interval><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>value metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></age></rules>"

Age rule (many conditions). This example shows how to create an age rule with a web application scope.

Set-ArchiveRulesToProfile –p "SharePoint-30293" -RuleScope "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7" -ArchiveRuleType "age" –RuleDefinitions "<rules><age><DateProperty>Created</DateProperty><Duration>1</Duration><Interval>day</Interval><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>value metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></age><age><DateProperty>Select</DateProperty><Duration>4</Duration><Interval>month</Interval><VersionOptions>major</VersionOptions><MetadataProperty>Name</MetadataProperty><operator>=</Operator><Value>value metadata</Value><DestinationEndpoint>EP2</DestinationEndpoint></age></rules>"

Age rule (without metadata). This example shows how to create an age rule with a web application scope.

Set-ArchiveRulesToProfile –p "SharePoint-30293" -RuleScope "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7" -art "age" –RuleDefinitions "<rules><age><DateProperty>Created</DateProperty><Duration>1</Duration><Interval>day</Interval><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>value metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></age><age><DateProperty>Select</DateProperty><Duration>4</Duration><Interval>month</Interval><VersionOptions>major</VersionOptions><MetadataProperty>None</MetadataProperty><Operator>None</Operator><Value>None</Value><DestinationEndpoint>EP2</DestinationEndpoint></age></rules>"

Metadata Rule (one condition). This example shows how to a create metadata rule with a web application scope:

Set-ArchiveRulesToProfile –p "SharePoint-30293" -RuleScope "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7/cdb:51764237-af67-4f92-a570-a8abac87627b" -art "metadata" –RuleDefinitions "<rules><metadata><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>test metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></metadata></rules>"

Metadata Rule (one condition). This example shows how to a create metadata rule with a Web Application scope and using operator <>.

Set-ArchiveRulesToProfile –p "SharePoint-30293" -rs "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7" -art "metadata" –RuleDefinitions "<rules><metadata><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>&lt; &gt;</Operator><Value>test metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></metadata></rules>"

Metadata Rule (many conditions). This example shows how to  a create metadata rule with a Web Application scope and Content DataBase:

Set-ArchiveRulesToProfile –p "SharePoint-30293" -rs "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7/cdb:51764237-af67-4f92-a570-a8abac87627b" -art "metadata" –RuleDefinitions "<rules><metadata><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>test metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></metadata><metadata><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>test metadata</Value><DestinationEndpoint>EP1</DestinationEndpoint></metadata></rules>"

Version Rule (one condition). This example shows how to create a  version rule with Web Application scope:

Set-ArchiveRulesToProfile –p "SharePoint-30293" -rs "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7" -art "version" –RuleDefinitions "<rules><version><VersionType>range</VersionType><From>1</From><To>5</To><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>test rest</Value><DestinationEndpoint>EP1</DestinationEndpoint></version></rules>"

Version Rule (many conditions). This example shows how to create a version rule with Web Application scoped profile and Content Database scoped archiving rule:

Set-ArchiveRulesToProfile –p "SharePoint-30293" -rs "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7/cdb:51764237-af67-4f92-a570-a8abac87627b" -art "version" –rds “<rules><version><VersionType>*</VersionType><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>test rest</Value><DestinationEndpoint>EP1</DestinationEndpoint></version><version><VersionType>range</VersionType><From>1</From><To>5</To><VersionOptions>major-minor</VersionOptions><MetadataProperty>Name</MetadataProperty><Operator>=</Operator><Value>test rest</Value><DestinationEndpoint>EP2</DestinationEndpoint></version></rules>”

Version Rule (many conditions and without metadata). This example shows how to create a version rule with Web Application scope and Content Database with 2 conditions and without metadata:

Set-ArchiveRulesToProfile –p "SharePoint-30293" -rs "wa:af97b4e9-7ef8-4d38-8df4-ec6082a10ad7/cdb:51764237-af67-4f92-a570-a8abac87627b" -art "version" –rds “<rules><version><VersionType>*</VersionType><MetadataProperty>None</MetadataProperty><Operator>None</Operator><Value>None</Value><DestinationEndpoint>EP1</DestinationEndpoint></version><version><VersionType>range</VersionType><From>1</From><To>5</To><VersionOptions>major-minor</VersionOptions><MetadataProperty>None</MetadataProperty><Operator>None</Operator><Value>None</Value><DestinationEndpoint>EP2</DestinationEndpoint></version></rules>”

Set-RMToProfile

This command configures Record Management rules for migrating BLOBs based on declaring or undeclaring a record. After these are configured, existing records can be migrated using Set-MigrateRecordsJob.

Parameters

·ProfileName (p): The Id or name of the profile. REQUIRED

·Enabled : True or false, to enable or disable records management on the profile.

·Scope (s) : The scope of the records management rule. This cannot be broader than the scope of the profile.

owa:<Web Application Id>/cdb:<Content DB Id>/s:<site collection Id>

·DeclaredAsRecord : True or False, whether to migrate a BLOB when the item is declared a record.

·DeclaredAsRecordEndpoint (de) : Name of the endpoint where BLOBs should be stored when declared a record.

·UndeclaredAsRecord : True or False, whether to migrate the BLOB when the item is no longer declared a record.

·UndeclaredAsRecordEndpoint : Name of the endpoint where BLOBs should be stored when no longer declared a record.

Examples

The following example shows how to enable and add Records Management rules to a profile.

Set-RMToProfile -p "Main Profile" -Enabled:$true -Scope "cdb:c54827c2-ff44-4569-86c0-d15e348ac71c/s:2dac99fe-b477-451a-bb1e-8f5279694a7d" -DeclaredAsRecord:$true -DeclaredAsRecordEndpoint "EP2" -UndeclaredAsRecord:$true -UndeclaredAsRecordEndpoint "EP1"

Related Documents