Author | Chrissy LeMaire (@cl), netnerds.net |
Availability | Windows, Linux, macOS |
Want to see the source code for this command? Check out Set-DbaExtendedProperty on GitHub.
Want to see the Bill Of Health for this command? Check out Set-DbaExtendedProperty.
Set extended property values
Set extended property values
You can set extended properties on all these different types of objects:
Aggregate Assembly Column Constraint Contract Database Event Notification Filegroup Function Index Logical File Name Message Type Parameter Partition Function Partition Scheme Procedure Queue Remote Service Binding Route Rule Schema Service Synonym Table Trigger Type View Xml Schema Collection
Set-DbaExtendedProperty
[-InputObject] <ExtendedProperty[]>
[-Value] <String>
[-EnableException]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
PS C:\> Get-DbaDatabase -SqlInstance localhost -Database mydb | Get-DbaExtendedProperty -Name appversion | Set-DbaExtendedProperty -Value "1.1.0"
Sets the value of appversion to 1.1.0 on the mydb database
PS C:\> Get-DbaDbTable -SqlInstance localhost -Database mydb -Table mytable | Get-DbaExtendedProperty -Name appversion | Set-DbaExtendedProperty -Value "1.1.0"
Sets the value of appversion to 1.1.0 on the mytable table of the mydb database
Enables piping from Get-DbaExtendedProperty
Alias | |
Required | True |
Pipeline | true (ByValue) |
Default Value |
The new value for the extended property
Alias | |
Required | True |
Pipeline | false |
Default Value |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
Shows what would happen if the command were to run. No actions are actually performed.
Alias | wi |
Required | False |
Pipeline | false |
Default Value |
Prompts you for confirmation before executing any changing operations within the command.
Alias | cf |
Required | False |
Pipeline | false |
Default Value |