Skip to content

Commit 747d121

Browse files
Split Az.DedicatedHsm Examples (#17081)
1 parent 59291a5 commit 747d121

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

src/DedicatedHsm/help/Get-AzDedicatedHsm.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ Gets the specified Azure dedicated HSM.
4242

4343
### Example 1: Get all Dedicated HSM under a subscription
4444
```powershell
45-
PS C:\> Get-AzDedicatedHsm
45+
Get-AzDedicatedHsm
46+
```
4647

48+
```output
4749
Name Provisioning State SKU Location
4850
---- ------------------ --- --------
4951
hsm-7t2xaf Succeeded SafeNet Luna Network HSM A790 eastus
@@ -54,8 +56,10 @@ This command gets all Dedicated HSM under a subscription
5456

5557
### Example 2: Get all Dedicated HSM under a resource group.
5658
```powershell
57-
PS C:\> Get-AzDedicatedHsm -ResourceGroupName dedicatedhsm-rg-n359cz
59+
Get-AzDedicatedHsm -ResourceGroupName dedicatedhsm-rg-n359cz
60+
```
5861

62+
```output
5963
Name Provisioning State SKU Location
6064
---- ------------------ --- --------
6165
hsm-7t2xaf Succeeded SafeNet Luna Network HSM A790 eastus
@@ -65,8 +69,10 @@ This command gets all Dedicated HSM under a resource group.
6569

6670
### Example 3: Get a Dedicated HSM by name
6771
```powershell
68-
PS C:\> Get-AzDedicatedHsm -Name hsm-7t2xaf -ResourceGroupName dedicatedhsm-rg-n359cz
72+
Get-AzDedicatedHsm -Name hsm-7t2xaf -ResourceGroupName dedicatedhsm-rg-n359cz
73+
```
6974

75+
```output
7076
Name Provisioning State SKU Location
7177
---- ------------------ --- --------
7278
hsm-7t2xaf Succeeded SafeNet Luna Network HSM A790 eastus
@@ -76,9 +82,11 @@ This command gets a Dedicated HSM by name.
7682

7783
### Example 4: Get a Dedicated HSM by object
7884
```powershell
79-
PS C:\> $hsm = New-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Location eastus -Sku "SafeNet Luna Network HSM A790" -StampId stamp1 -SubnetId "/subscriptions/xxxx-xxxx-xxx-xxx/resourceGroups/dedicatedhsm-rg-n359cz/providers/Microsoft.Network/virtualNetworks/vnetq30la9/subnets/hsmsubnet" -NetworkInterface @{PrivateIPAddress = '10.2.1.120' }
80-
PS C:\> Get-AzDedicatedHsm -InputObject $hsm
85+
$hsm = New-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Location eastus -Sku "SafeNet Luna Network HSM A790" -StampId stamp1 -SubnetId "/subscriptions/xxxx-xxxx-xxx-xxx/resourceGroups/dedicatedhsm-rg-n359cz/providers/Microsoft.Network/virtualNetworks/vnetq30la9/subnets/hsmsubnet" -NetworkInterface @{PrivateIPAddress = '10.2.1.120' }
86+
Get-AzDedicatedHsm -InputObject $hsm
87+
```
8188

89+
```output
8290
Name Provisioning State SKU Location
8391
---- ------------------ --- --------
8492
hsm-n7wfxi Succeeded SafeNet Luna Network HSM A790 eastus

src/DedicatedHsm/help/Remove-AzDedicatedHsm.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@ Deletes the specified Azure Dedicated HSM.
3131

3232
### Example 1: Remove a Dedicated HSM by name
3333
```powershell
34-
PS C:\> Remove-AzDedicatedHsm -Name hsm-7t2xaf -ResourceGroupName lucas-manual-test
34+
Remove-AzDedicatedHsm -Name hsm-7t2xaf -ResourceGroupName lucas-manual-test
3535
3636
```
3737

3838
This commnad removes a hardware security module(HSM) by name.
3939

4040
### Example 2: Remove a Dedicated HSM by object
4141
```powershell
42-
PS C:\> $hsm = Get-AzDedicatedHsm -Name hsm-7t2xaf -ResourceGroupName dedicatedhsm-rg-n359cz
43-
PS C:\> Remove-AzDedicatedHsm -InputObject $hsm
44-
42+
$hsm = Get-AzDedicatedHsm -Name hsm-7t2xaf -ResourceGroupName dedicatedhsm-rg-n359cz
43+
Remove-AzDedicatedHsm -InputObject $hsm
4544
```
4645

4746
This commnad removes a Dedicated HSM by object.

src/DedicatedHsm/help/Update-AzDedicatedHsm.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ Update a dedicated HSM in the specified subscription.
3131

3232
### Example 1: Update the parameter tag of the Dedicated HSM by name
3333
```powershell
34-
PS C:\> Update-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Tag @{'key1' = '1'; 'key2' = 2; 'key3' = 3}
34+
Update-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz -Tag @{'key1' = '1'; 'key2' = 2; 'key3' = 3}
35+
```
3536

37+
```output
3638
Name Provisioning State SKU Location
3739
---- ------------------ --- --------
3840
hsm-n7wfxi Succeeded SafeNet Luna Network HSM A790 eastus
@@ -42,9 +44,11 @@ This command updates the parameter tag of the Dedicated HSM by name
4244

4345
### Example 2: Update the parameter tag of the Dedicated HSM by object
4446
```powershell
45-
PS C:\> $hsm = Get-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz
46-
PS C:\> Update-AzDedicatedHsm -InputObject -Tag @{'key1' = '1'; 'key2' = 2; 'key3' = 3}
47+
$hsm = Get-AzDedicatedHsm -Name hsm-n7wfxi -ResourceGroupName dedicatedhsm-rg-n359cz
48+
Update-AzDedicatedHsm -InputObject -Tag @{'key1' = '1'; 'key2' = 2; 'key3' = 3}
49+
```
4750

51+
```output
4852
Name Provisioning State SKU Location
4953
---- ------------------ --- --------
5054
hsm-n7wfxi Succeeded SafeNet Luna Network HSM A790 eastus

0 commit comments

Comments
 (0)