Skip to content

Commit adf7981

Browse files
committed
fixing AIC Powershell quickstart incorrect commands
1 parent 64d4971 commit adf7981

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

articles/container-instances/container-instances-quickstart-powershell.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,44 @@ First, create a resource group named *myResourceGroup* in the *eastus* location
3636
New-AzResourceGroup -Name myResourceGroup -Location EastUS
3737
```
3838

39-
## Create a container
39+
## Create a container group
4040

41-
Now that you have a resource group, you can run a container in Azure. To create a container instance with Azure PowerShell, provide a resource group name, container instance name, and Docker container image to the [New-AzContainerGroup][New-AzContainerGroup] cmdlet. In this quickstart, you use the public `mcr.microsoft.com/windows/servercore/iis:nanoserver` image. This image packages Microsoft Internet Information Services (IIS) to run in Nano Server.
41+
Now that you have a resource group, you can run a container in Azure. To create a container instance with Azure PowerShell, you'll first need to create a `ContainerInstanceObject` by providing a name and image for the container. In this quickstart, you use the public `mcr.microsoft.com/windows/servercore/iis:nanoserver` image. This image packages Microsoft Internet Information Services (IIS) to run in Nano Server.
42+
43+
```azurepowershell-interactive
44+
New-AzContainerInstanceObject -Name myContainer -Image mcr.microsoft.com/windows/servercore/iis:nanoserver
45+
```
46+
47+
Next, use the [New-AzContainerGroup][New-AzContainerGroup] cmdlet. You need to provide a name for the container group, your resource group's name, a location for the container group, the container instance you just created, the operating system type, and a unique IP address DNS name label.
4248

4349
You can expose your containers to the internet by specifying one or more ports to open, a DNS name label, or both. In this quickstart, you deploy a container with a DNS name label so that IIS is publicly reachable.
4450

45-
Execute a command similar to the following to start a container instance. Set a `-DnsNameLabel` value that's unique within the Azure region where you create the instance. If you receive a "DNS name label not available" error message, try a different DNS name label.
51+
Execute a command similar to the following to start a container instance. Set a `-IPAddressDnsNameLabel` value that's unique within the Azure region where you create the instance. If you receive a "DNS name label not available" error message, try a different DNS name label.
4652

4753
```azurepowershell-interactive
48-
New-AzContainerGroup -ResourceGroupName myResourceGroup -Name mycontainer -Image mcr.microsoft.com/windows/servercore/iis:nanoserver -OsType Windows -DnsNameLabel aci-demo-win
54+
New-AzContainerInstanceObject -ResourceGroupName myResourceGroup -Name myContainerGroup -Location EastUS -Container myContainer -OsType Windows -IPAddressDnsNameLabel aci-demo-win
4955
```
5056

5157
Within a few seconds, you should receive a response from Azure. The container's `ProvisioningState` is initially **Creating**, but should move to **Succeeded** within a minute or two. Check the deployment state with the [Get-AzContainerGroup][Get-AzContainerGroup] cmdlet:
5258

5359
```azurepowershell-interactive
54-
Get-AzContainerGroup -ResourceGroupName myResourceGroup -Name mycontainer
60+
Get-AzContainerGroup -ResourceGroupName myResourceGroup -Name myContainerGroup
5561
```
5662

5763
The container's provisioning state, fully qualified domain name (FQDN), and IP address appear in the cmdlet's output:
5864

5965
```console
60-
PS Azure:\> Get-AzContainerGroup -ResourceGroupName myResourceGroup -Name mycontainer
66+
PS Azure:\> Get-AzContainerGroup -ResourceGroupName myResourceGroup -Name myContainerGroup
6167

6268

6369
ResourceGroupName : myResourceGroup
64-
Id : /subscriptions/<Subscription ID>/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroups/mycontainer
65-
Name : mycontainer
70+
Id : /subscriptions/<Subscription ID>/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup
71+
Name : myContainerGroup
6672
Type : Microsoft.ContainerInstance/containerGroups
6773
Location : eastus
6874
Tags :
6975
ProvisioningState : Creating
70-
Containers : {mycontainer}
76+
Containers : {myContainer}
7177
ImageRegistryCredentials :
7278
RestartPolicy : Always
7379
IpAddress : 52.226.19.87
@@ -89,7 +95,7 @@ Once the container's `ProvisioningState` is **Succeeded**, navigate to its `Fqdn
8995
When you're done with the container, remove it with the [Remove-AzContainerGroup][Remove-AzContainerGroup] cmdlet:
9096

9197
```azurepowershell-interactive
92-
Remove-AzContainerGroup -ResourceGroupName myResourceGroup -Name mycontainer
98+
Remove-AzContainerGroup -ResourceGroupName myResourceGroup -Name myContainerGroup
9399
```
94100

95101
## Next steps

0 commit comments

Comments
 (0)