Skip to content

Commit aee1db0

Browse files
Merge pull request #1249 from mikefrobbins/mr-azps-338327
Added azure powershell tab
2 parents 27406ed + 2f904ff commit aee1db0

File tree

1 file changed

+68
-1
lines changed
  • articles/ai-services/openai/how-to

1 file changed

+68
-1
lines changed

articles/ai-services/openai/how-to/quota.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: mrbullwinkle
77
manager: nitinme
88
ms.service: azure-ai-openai
99
ms.topic: how-to
10-
ms.date: 06/18/2024
10+
ms.date: 11/04/2024
1111
ms.author: mbullwin
1212
---
1313

@@ -233,6 +233,73 @@ This command runs in the context of the currently active subscription for Azure
233233

234234
For more details on `az cognitiveservices account` and `az cognitivesservices usage` consult the [Azure CLI reference documentation](/cli/azure/cognitiveservices/account/deployment?view=azure-cli-latest&preserve-view=true)
235235

236+
# [Azure PowerShell](#tab/powershell)
237+
238+
Install the latest version of the [Az PowerShell module](/powershell/azure/install-azure-powershell). If you already have the Az PowerShell module installed locally, run `Update-Module -Name Az` to update to the latest version.
239+
240+
To check which version of the Az PowerShell module you are running, use `Get-InstalledModule -Name Az`. Azure Cloud Shell is currently running a version of Azure PowerShell that can take advantage of the latest Azure OpenAI features.
241+
242+
### Deployment
243+
244+
```azurepowershell
245+
New-AzCognitiveServicesAccountDeployment
246+
[-ResourceGroupName] <String>
247+
[-AccountName] <String>
248+
[-Name] <String>
249+
[-Properties] <DeploymentProperties>
250+
[-Sku] <Sku>
251+
[-DefaultProfile <IAzureContextContainer>]
252+
[-WhatIf]
253+
[-Confirm]
254+
[<CommonParameters>]
255+
```
256+
257+
To sign into your local installation of Azure PowerShell, run the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) command:
258+
259+
```azurepowershell
260+
Connect-AzAccount
261+
```
262+
263+
By setting Sku Capacity to 10 in the command below, this deployment is set to a 10K TPM limit.
264+
265+
```azurepowershell-interactive
266+
$cognitiveServicesDeploymentParams = @{
267+
ResourceGroupName = 'test-resource-group'
268+
AccountName = 'test-resource-name'
269+
Name = 'test-deployment-name'
270+
Properties = @{
271+
Model = @{
272+
Name = 'gpt-35-turbo'
273+
Version = '0613'
274+
Format = 'OpenAI'
275+
}
276+
}
277+
Sku = @{
278+
Name = 'Standard'
279+
Capacity = '10'
280+
}
281+
}
282+
New-AzCognitiveServicesAccountDeployment @cognitiveServicesDeploymentParams
283+
```
284+
285+
### Usage
286+
287+
To [query your quota usage](/powershell/module/az.cognitiveservices/get-azcognitiveservicesusage) in a given region for a specific subscription:
288+
289+
```azurepowershell
290+
Get-AzCognitiveServicesUsage -Location <location>
291+
```
292+
293+
### Example
294+
295+
```azurepowershell-interactive
296+
Get-AzCognitiveServicesUsage -Location eastus
297+
```
298+
299+
This command runs in the context of the currently active subscription for Azure PowerShell. Use `Set-AzContext` to [modify the active subscription](/powershell/azure/manage-subscriptions-azureps#change-the-active-subscription).
300+
301+
For more details on `New-AzCognitiveServicesAccountDeployment` and `Get-AzCognitiveServicesUsage`, consult the [Azure PowerShell reference documentation](/powershell/module/az.cognitiveservices/).
302+
236303
# [Azure Resource Manager](#tab/arm)
237304

238305
```json

0 commit comments

Comments
 (0)