Restore NotionPage - fasteiner/Notion GitHub Wiki
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page schema: 2.0.0 Type: Command
Restores a Notion page by removing it from the trash or archive.
Restore-NotionPage [-PageId] <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]
The `Restore-NotionPage` function restores a Notion page by setting the `in_trash` and `archived` properties to `$false`. This function uses the Notion API to perform the restore operation and returns the restored page object.
Restore-NotionPage -PageId "12345abcde"
Restores the Notion page with the ID `12345abcde` by removing it from the trash.
Restore-NotionPage -PageId "67890fghij" -WhatIf
Simulates the restore operation for the Notion page with the ID `67890fghij` without making any changes.
Restore-NotionPage -PageId "67890fghij" -Confirm:$false
Restores the Notion page with the ID `67890fghij` without prompting for confirmation.
The unique identifier of the Notion page to be restored. This parameter is mandatory.
Type: String
Parameter Sets: (All)
Aliases: Id
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- The function supports `ShouldProcess` for confirmation and safety.
- Use this function cautiously, as it interacts with the Notion API to modify page properties.
[https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page](https://developers.notion.com/reference/patch-page https://developers.notion.com/reference/archive-a-page#example-request-restore-a-notion-page)