Update-AzPostgreSqlFlexibleServer
This cmdlet is part of a Preview module. Preview versions aren't recommended for use in production environments. For more information, see https://aka.ms/azps-refstatus .
Syntax
UpdateExpanded (Default)
Update-AzPostgreSqlFlexibleServer
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AdministratorLoginPassword <SecureString>]
[-AuthConfigActiveDirectoryAuth <String>]
[-AuthConfigPasswordAuth <String>]
[-AuthConfigTenantId <String>]
[-BackupRetentionDay <Int32>]
[-ClusterDefaultDatabaseName <String>]
[-ClusterSize <Int32>]
[-CreateMode <String>]
[-DataEncryptionGeoBackupKeyUri <String>]
[-DataEncryptionGeoBackupUserAssignedIdentityId <String>]
[-DataEncryptionPrimaryKeyUri <String>]
[-DataEncryptionPrimaryUserAssignedIdentityId <String>]
[-DataEncryptionType <String>]
[-EnableSystemAssignedIdentity <Boolean>]
[-HighAvailabilityMode <String>]
[-HighAvailabilityStandbyAvailabilityZone <String>]
[-IdentityPrincipalId <String>]
[-MaintenanceWindowCustomWindow <String>]
[-MaintenanceWindowDayOfWeek <Int32>]
[-MaintenanceWindowStartHour <Int32>]
[-MaintenanceWindowStartMinute <Int32>]
[-NetworkDelegatedSubnetResourceId <String>]
[-NetworkPrivateDnsZoneArmResourceId <String>]
[-NetworkPublicNetworkAccess <String>]
[-ReplicaPromoteMode <String>]
[-ReplicaPromoteOption <String>]
[-ReplicaRole <String>]
[-ReplicationRole <String>]
[-SkuName <String>]
[-SkuTier <String>]
[-StorageAutoGrow <String>]
[-StorageIop <Int32>]
[-StorageSizeGb <Int32>]
[-StorageThroughput <Int32>]
[-StorageTier <String>]
[-StorageType <String>]
[-Tag <Hashtable>]
[-UserAssignedIdentity <String[]>]
[-Version <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateViaIdentityExpanded
Update-AzPostgreSqlFlexibleServer
-InputObject <IPostgreSqlFlexibleServerIdentity>
[-AdministratorLoginPassword <SecureString>]
[-AuthConfigActiveDirectoryAuth <String>]
[-AuthConfigPasswordAuth <String>]
[-AuthConfigTenantId <String>]
[-BackupRetentionDay <Int32>]
[-ClusterDefaultDatabaseName <String>]
[-ClusterSize <Int32>]
[-CreateMode <String>]
[-DataEncryptionGeoBackupKeyUri <String>]
[-DataEncryptionGeoBackupUserAssignedIdentityId <String>]
[-DataEncryptionPrimaryKeyUri <String>]
[-DataEncryptionPrimaryUserAssignedIdentityId <String>]
[-DataEncryptionType <String>]
[-EnableSystemAssignedIdentity <Boolean>]
[-HighAvailabilityMode <String>]
[-HighAvailabilityStandbyAvailabilityZone <String>]
[-IdentityPrincipalId <String>]
[-MaintenanceWindowCustomWindow <String>]
[-MaintenanceWindowDayOfWeek <Int32>]
[-MaintenanceWindowStartHour <Int32>]
[-MaintenanceWindowStartMinute <Int32>]
[-NetworkDelegatedSubnetResourceId <String>]
[-NetworkPrivateDnsZoneArmResourceId <String>]
[-NetworkPublicNetworkAccess <String>]
[-ReplicaPromoteMode <String>]
[-ReplicaPromoteOption <String>]
[-ReplicaRole <String>]
[-ReplicationRole <String>]
[-SkuName <String>]
[-SkuTier <String>]
[-StorageAutoGrow <String>]
[-StorageIop <Int32>]
[-StorageSizeGb <Int32>]
[-StorageThroughput <Int32>]
[-StorageTier <String>]
[-StorageType <String>]
[-Tag <Hashtable>]
[-UserAssignedIdentity <String[]>]
[-Version <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Examples
Example 1: Change the administrator login password in a flexible server
$exampleAdministratorPassword = Read-Host "Enter admin password" -AsSecureString
New-AzPostgreSqlFlexibleServer -SubscriptionId aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e -ResourceGroupName example-resource-group -Name example-server -Location example-location -AdministratorLoginPassword $exampleAdministratorPassword -CreateMode Update
AdministratorLogin : example-administrator-login
AdministratorLoginPassword :
AuthConfigActiveDirectoryAuth : Disabled
AuthConfigPasswordAuth : Enabled
AuthConfigTenantId :
AvailabilityZone : 2
BackupEarliestRestoreDate :
BackupGeoRedundantBackup : Disabled
BackupRetentionDay : 7
Capacity : 6
ClusterDefaultDatabaseName :
ClusterSize :
CreateMode :
DataEncryptionGeoBackupEncryptionKeyStatus :
DataEncryptionGeoBackupKeyUri :
DataEncryptionGeoBackupUserAssignedIdentityId :
DataEncryptionPrimaryEncryptionKeyStatus :
DataEncryptionPrimaryKeyUri :
DataEncryptionPrimaryUserAssignedIdentityId :
DataEncryptionType : SystemManaged
FullyQualifiedDomainName : example-server.postgres.database.azure.com
HighAvailabilityMode : Disabled
HighAvailabilityStandbyAvailabilityZone :
HighAvailabilityState : NotEnabled
Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/example-resource-group/providers/Microsoft.DBforPostgreSQL/flexibleServers/example-server
IdentityPrincipalId :
IdentityTenantId :
IdentityType :
IdentityUserAssignedIdentity : {
}
Location : example-location
MaintenanceWindowCustomWindow : Disabled
MaintenanceWindowDayOfWeek : 0
MaintenanceWindowStartHour : 0
MaintenanceWindowStartMinute : 0
MinorVersion : 9
Name : example-server
NetworkDelegatedSubnetResourceId :
NetworkPrivateDnsZoneArmResourceId :
NetworkPublicNetworkAccess : Enabled
PointInTimeUtc :
PrivateEndpointConnection : {}
ReplicaCapacity : 6
ReplicaPromoteMode :
ReplicaPromoteOption :
ReplicaReplicationState :
ReplicaRole : Primary
ReplicationRole : Primary
ResourceGroupName : example-resource-group
SkuName : Standard_D2ads_v5
SkuTier : GeneralPurpose
SourceServerResourceId :
State : Ready
StorageAutoGrow : Disabled
StorageIop : 120
StorageSizeGb : 32
StorageThroughput :
StorageTier : P4
StorageType :
SystemDataCreatedAt : 3/22/2026 11:50:44 AM
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
}
Type : Microsoft.DBforPostgreSQL/flexibleServers
Version : 18
Changes the administrator login password in an Azure Database for PostgreSQL flexible server.
If subscription is not passed explicitly, it's taken from default context.
Parameters
-AdministratorLoginPassword
Password assigned to the administrator login.
As long as password authentication is enabled, this password can be changed at any time.
Parameter properties
Type: SecureString
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AuthConfigActiveDirectoryAuth
Indicates if the server supports Microsoft Entra authentication.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AuthConfigPasswordAuth
Indicates if the server supports password based authentication.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AuthConfigTenantId
Identifier of the tenant of the delegated resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-BackupRetentionDay
Backup retention days for the server.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ClusterDefaultDatabaseName
Default database name for the elastic cluster.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ClusterSize
Number of nodes assigned to the elastic cluster.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-CreateMode
Creation mode of a new server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataEncryptionGeoBackupKeyUri
Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is configured to support geographically redundant backups.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataEncryptionGeoBackupUserAssignedIdentityId
Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of the geographically redundant storage associated to a server that is configured to support geographically redundant backups.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataEncryptionPrimaryKeyUri
URI of the key in Azure Key Vault used for data encryption of the primary storage associated to a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataEncryptionPrimaryUserAssignedIdentityId
Identifier of the user assigned managed identity used to access the key in Azure Key Vault for data encryption of the primary storage associated to a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DataEncryptionType
Data encryption type used by a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EnableSystemAssignedIdentity
Determines whether to enable a system-assigned identity for the resource.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-HighAvailabilityMode
High availability mode for a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-HighAvailabilityStandbyAvailabilityZone
Availability zone associated to the standby server created when high availability is set to SameZone or ZoneRedundant.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IdentityPrincipalId
Identifier of the object of the service principal associated to the user assigned managed identity.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
Type: Microsoft.Azure.PowerShell.Cmdlets.PostgreSqlFlexibleServer.Models.IPostgreSqlFlexibleServerIdentity
Default value: None
Supports wildcards: False
DontShow: False
UpdateViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-MaintenanceWindowCustomWindow
Indicates whether custom window is enabled or disabled.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MaintenanceWindowDayOfWeek
Day of the week to be used for maintenance window.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MaintenanceWindowStartHour
Start hour to be used for maintenance window.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MaintenanceWindowStartMinute
Start minute to be used for maintenance window.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ServerName
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkDelegatedSubnetResourceId
Resource identifier of the delegated subnet.
Required during creation of a new server, in case you want the server to be integrated into your own virtual network.
For an update operation, you only have to provide this property if you want to change the value assigned for the private DNS zone.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkPrivateDnsZoneArmResourceId
Identifier of the private DNS zone.
Required during creation of a new server, in case you want the server to be integrated into your own virtual network.
For an update operation, you only have to provide this property if you want to change the value assigned for the private DNS zone.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkPublicNetworkAccess
Indicates if public network access is enabled or not.
This is only supported for servers that are not integrated into a virtual network which is owned and provided by customer when server is deployed.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Type of operation to apply on the read replica.
This property is write only.
Standalone means that the read replica will be promoted to a standalone server, and will become a completely independent entity from the replication set.
Switchover means that the read replica will roles with the primary server.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Data synchronization option to use when processing the operation specified in the promoteMode property.
This property is write only.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReplicaRole
Role of the server in a replication set.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ReplicationRole
Role of the server in a replication set.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkuName
Name by which is known a given compute size assigned to a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkuTier
Tier of the compute assigned to a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageAutoGrow
Flag to enable or disable the automatic growth of storage size of a server when available space is nearing zero and conditions allow for automatically growing storage size.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageIop
Maximum IOPS supported for storage.
Required when type of storage is PremiumV2_LRS or UltraSSD_LRS.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageSizeGb
Size of storage assigned to a server.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageThroughput
Maximum throughput supported for storage.
Required when type of storage is PremiumV2_LRS or UltraSSD_LRS.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageTier
Storage tier of a server.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageType
Type of storage assigned to a server.
Allowed values are Premium_LRS, PremiumV2_LRS, or UltraSSD_LRS.
If not specified, it defaults to Premium_LRS.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The ID of the target subscription.
The value must be an UUID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Resource tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-UserAssignedIdentity
The array of user assigned identities associated with the resource.
The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Version
Major version of PostgreSQL database engine.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Microsoft.Azure.PowerShell.Cmdlets.PostgreSqlFlexibleServer.Models.IPostgreSqlFlexibleServerIdentity
Outputs
Microsoft.Azure.PowerShell.Cmdlets.PostgreSqlFlexibleServer.Models.IServer