Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version:
schema: 2.0.0
---

# Add-SPOSiteToFileArchivePolicy

## SYNOPSIS
Adds a site to a File Archive Policy.

## SYNTAX

```
Add-SPOSiteToFileArchivePolicy -PolicyId <Guid> -Site <SpoSitePipeBind> [<CommonParameters>]
```

## DESCRIPTION
The `Add-SPOSiteToFileArchivePolicy` cmdlet adds a site to an existing File Archive Policy that has a PolicyType of "SelectedSites". The site must exist and be eligible for archiving. At least one site must be added before a "SelectedSites" policy can be activated.

You must be a SharePoint Administrator or Global Administrator to run this cmdlet.

## EXAMPLES

### Example 1
```powershell
PS C:\> Add-SPOSiteToFileArchivePolicy -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890" -Site "https://contoso.sharepoint.com/sites/marketing"
```

Adds the marketing site to the specified File Archive Policy.

## PARAMETERS

### -PolicyId
Specifies the unique identifier (GUID) of the policy to add the site to.

```yaml
Type: Guid
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Site
Specifies the URL of the site to add to the policy (e.g., "https://contoso.sharepoint.com/sites/marketing"). The site must exist and be eligible for archiving.

```yaml
Type: SpoSitePipeBind
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### System.Object
## NOTES

This cmdlet is part of the File Archive Policies feature which is currently in preview.

## RELATED LINKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version:
schema: 2.0.0
---

# Get-SPOFileArchivePolicy

## SYNOPSIS
Gets one or all File Archive Policies for the tenant.

## SYNTAX

```
Get-SPOFileArchivePolicy [-PolicyId <Guid>] [<CommonParameters>]
```

## DESCRIPTION
The `Get-SPOFileArchivePolicy` cmdlet retrieves the properties of File Archive Policies for the connected SharePoint Online tenant. If the `-PolicyId` parameter is specified, returns only the matching policy. If omitted, returns all File Archive Policies under the tenant.

You must be a SharePoint Administrator or Global Administrator to run this cmdlet.

## EXAMPLES

### Example 1
```powershell
PS C:\> Get-SPOFileArchivePolicy
```

Returns all File Archive Policies configured for the tenant.

### Example 2
```powershell
PS C:\> Get-SPOFileArchivePolicy -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```

Returns the File Archive Policy with the specified ID.

## PARAMETERS

### -PolicyId
Specifies the unique identifier (GUID) of the policy to retrieve. If not specified, all policies under the tenant are returned.

```yaml
Type: Guid
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### System.Object
## NOTES

This cmdlet is part of the File Archive Policies feature which is currently in preview.

## RELATED LINKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version:
schema: 2.0.0
---

# Get-SPOFileArchivePolicyReport

## SYNOPSIS
Gets run reports for a File Archive Policy.

## SYNTAX

```
Get-SPOFileArchivePolicyReport -PolicyId <Guid> [<CommonParameters>]
```

## DESCRIPTION
The `Get-SPOFileArchivePolicyReport` cmdlet retrieves the run reports for a File Archive Policy. Reports are kept for the past 12 months and include details about each policy run such as how many sites were processed, how many files were archived, and the total storage archived.

For policies running in WhatIf mode, reports show how many files and how much storage would have been archived instead.

You must be a SharePoint Administrator or Global Administrator to run this cmdlet.

## EXAMPLES

### Example 1
```powershell
PS C:\> Get-SPOFileArchivePolicyReport -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```

Returns all run reports for the specified File Archive Policy from the past 12 months.

## PARAMETERS

### -PolicyId
Specifies the unique identifier (GUID) of the policy to retrieve run reports for.

```yaml
Type: Guid
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### System.Object
## NOTES

This cmdlet is part of the File Archive Policies feature which is currently in preview.

## RELATED LINKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml
Module Name: Microsoft.Online.SharePoint.PowerShell
online version:
schema: 2.0.0
---

# Get-SPOFileArchivePolicySites

## SYNOPSIS
Gets the list of sites associated with a File Archive Policy.

## SYNTAX

```
Get-SPOFileArchivePolicySites -PolicyId <Guid> [<CommonParameters>]
```

## DESCRIPTION
The `Get-SPOFileArchivePolicySites` cmdlet retrieves the list of sites that have been added to a File Archive Policy. This is applicable to policies with a PolicyType of "SelectedSites".

You must be a SharePoint Administrator or Global Administrator to run this cmdlet.

## EXAMPLES

### Example 1
```powershell
PS C:\> Get-SPOFileArchivePolicySites -PolicyId "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
```

Returns all sites associated with the specified File Archive Policy.

## PARAMETERS

### -PolicyId
Specifies the unique identifier (GUID) of the policy to retrieve the site list for.

```yaml
Type: Guid
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None

## OUTPUTS

### System.Object
## NOTES

This cmdlet is part of the File Archive Policies feature which is currently in preview.

## RELATED LINKS
Loading