Get-AzureService
傳回物件,其中包含目前訂用帳戶之雲端服務的相關資訊。
注意
本檔中參考的 Cmdlet 用於管理使用服務管理 API 的舊版 Azure 資源。 如需管理 Azure Resource Manager 資源的 Cmdlet,請參閱 Az PowerShell 模組 。
重要
雲端服務(傳統版)現已淘汰給新客戶,將于 2024 年 8 月 31 日淘汰所有客戶。 新的部署應該使用新的 Azure Resource Manager 型部署模型 Azure 雲端服務(延伸支援)。
Syntax
Get-AzureService
[[-ServiceName] <String>]
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Description
Get-AzureService Cmdlet 會傳回清單物件,其中包含與目前訂用帳戶相關聯的所有 Azure 雲端服務。 如果您指定 ServiceName 參數, Get-AzureService 只會傳回相符服務的相關資訊。
範例
範例 1:取得所有服務的相關資訊
PS C:\> Get-AzureService
此命令會傳回 物件,其中包含與目前訂用帳戶相關聯之所有 Azure 服務的相關資訊。
範例 2:取得指定服務的相關資訊
PS C:\> Get-AzureService -ServiceName $MySvc
此命令會傳回$MySvc服務的相關資訊。
範例 3:顯示可用的方法和屬性
PS C:\> Get-AzureService | Get-Member
此命令會顯示 Get-AzureService Cmdlet 中可用的 屬性和方法。
參數
-InformationAction
指定此 Cmdlet 如何回應資訊事件。
此參數可接受的值為:
- 繼續
- 忽略
- 詢問
- SilentlyContinue
- 停止
- 暫止
Type: | ActionPreference |
Aliases: | infa |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InformationVariable
指定資訊變數。
Type: | String |
Aliases: | iv |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Profile
指定此 Cmdlet 從中讀取的 Azure 設定檔。 如果您未指定設定檔,此 Cmdlet 會從本機預設設定檔讀取。
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceName
指定要傳回信息之服務的名稱。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
輸出
HostedServiceContext