Remove NotionDatabaseProperty - fasteiner/Notion GitHub Wiki
Category: Commands external help file: Notion-help.xml Module Name: Notion online version: https://developers.notion.com/reference/update-property-schema-object schema: 2.0.0 Type: Command
Removes a specified property from a Notion database.
Remove-NotionDatabaseProperty [-DatabaseId] <String> -Property <String> [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]
The Remove-NotionDatabaseProperty function removes a property from a Notion database by setting the property to null. It uses the Notion API to update the database.
Remove-NotionDatabaseProperty -DatabaseId "12345678-1234-1234-1234-1234567890ab" -Property "PropertyName"
This example removes the property named "PropertyName" from the specified Notion database.
(Get-NotionDatabase -DatabaseId "12345678-1234-1234-1234-1234567890ab").Properties.Values.Name | Remove-NotionDatabaseProperty -DatabaseId "12345678-1234-1234-1234-1234567890ab"
This example removes all properties by name from the specified Notion database using the pipeline. (Use with care!)
(Get-NotionDatabase -DatabaseId "12345678-1234-1234-1234-1234567890ab").Properties.Values.Id | Remove-NotionDatabaseProperty -DatabaseId "12345678-1234-1234-1234-1234567890ab"
This example removes all properties by Id from the specified Notion database using the pipeline. (Use with care!)
@("PropertyName1", "PropertyName2") | Remove-NotionDatabaseProperty -DatabaseId "12345678-1234-1234-1234-1234567890ab"
This example removes multiple properties from the specified Notion database using the pipeline.
The ID of the Notion database from which the property will be removed.
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
The ID or name of the property to remove from the Notion database.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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.
https://developers.notion.com/reference/update-property-schema-object