Get-AzMySqlServer
取得伺服器的相關信息。
語法
Get-AzMySqlServer
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMySqlServer
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMySqlServer
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzMySqlServer
-InputObject <IMySqlIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
取得伺服器的相關信息。
範例
範例 1:使用預設內容取得 MySql 伺服器
Get-AzMySqlServer
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
mysql-test-11 eastus mysql_test 5.7 5120 GP_Gen5_4 GeneralPurpose Enabled
此 Cmdlet 會取得具有預設內容的 MySql 伺服器。
範例 2:依資源群組和伺服器名稱取得 MySql 伺服器
Get-AzMySqlServer -ResourceGroupName PowershellMySqlTest -Name mysql-test
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- --------------
mysql-test eastus mysql_test 5.7 5120 GP_Gen5_4 GeneralPurpose Enabled
此 Cmdlet 會依資源群組和伺服器名稱取得 MySql 伺服器。
範例 3:列出指定資源群組中的所有 MySql 伺服器
Get-AzMySqlServer -ResourceGroupName PowershellMySqlTest
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- ------------
mysql-test eastus mysql_test 5.7 5120 GP_Gen5_4 GeneralPurpose Enabled
此 Cmdlet 會列出指定資源群組中的所有 MySql 伺服器。
範例 4:依身分識別取得 MySql 伺服器
$ID = "/subscriptions/<SubscriptionId>/resourceGroups/PowershellMySqlTest/providers/Microsoft.DBforMySQL/servers/mysql-test"
Get-AzMySqlServer -InputObject $ID
Name Location AdministratorLogin Version StorageProfileStorageMb SkuName SkuTier SslEnforcement
---- -------- ------------------ ------- ----------------------- ------- ------- ------------
mysql-test eastus mysql_test 5.7 5120 GP_Gen5_4 GeneralPurpose Enabled
此 Cmdlet 會依身分識別列出 MySql 伺服器。
參數
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
類型: | IMySqlIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
伺服器的名稱。
類型: | String |
別名: | ServerName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。
類型: | String[] |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |