Skip to content

Commit cb2dd64

Browse files
committed
[GuestConfiguration] Fix help docs for real
1 parent 67b66d3 commit cb2dd64

File tree

18 files changed

+1003
-1341
lines changed

18 files changed

+1003
-1341
lines changed

src/GuestConfiguration/GuestConfiguration.Test/ScenarioTests/GetVmGuestPolicyStatusTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public void InitiativeNameScope()
5555

5656
[Fact]
5757
[Trait(Category.AcceptanceType, Category.CheckIn)]
58-
public void IdScope()
58+
public void ReportIdScope()
5959
{
60-
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyStatus-IdScope");
60+
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzVMGuestPolicyStatus-ReportIdScope");
6161
}
6262
}
6363
}

src/GuestConfiguration/GuestConfiguration.Test/ScenarioTests/GetVmGuestPolicyStatusTests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ function Get-AzVMGuestPolicyStatus-InitiativeNameScope
5858

5959
<#
6060
.SYNOPSIS
61-
Get guest configuration policy by Id scope
61+
Get guest configuration policy by ReportId scope
6262
#>
63-
function Get-AzVMGuestPolicyStatus-IdScope
63+
function Get-AzVMGuestPolicyStatus-ReportIdScope
6464
{
6565
$rgName = "vivga"
6666
$vmName = "Viv1809SDDC"
@@ -69,8 +69,8 @@ function Get-AzVMGuestPolicyStatus-IdScope
6969
Assert-NotNull $reports
7070
Assert-True { $reports.Count -gt 0 }
7171

72-
$Id= $reports[0].Id;
72+
$Id= $reports[0].ReportId;
7373

74-
$report = Get-AzVMGuestPolicyStatus -Id $Id
74+
$report = Get-AzVMGuestPolicyStatus -ReportId $Id
7575
Assert-NotNull $report
7676
}

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusHistoryTests/InitiativeIdScope.json

Lines changed: 41 additions & 41 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusHistoryTests/InitiativeNameScope.json

Lines changed: 39 additions & 39 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusHistoryTests/ShowOnlyChangeSwitchVmNameScope.json

Lines changed: 233 additions & 233 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusHistoryTests/VmNameScope.json

Lines changed: 233 additions & 233 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusTests/IdScope.json

Lines changed: 0 additions & 395 deletions
This file was deleted.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusTests/InitiativeIdScope.json

Lines changed: 41 additions & 41 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusTests/InitiativeNameScope.json

Lines changed: 39 additions & 39 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusTests/ReportIdScope.json

Lines changed: 106 additions & 40 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration.Test/SessionRecords/Microsoft.Azure.Commands.GuestConfiguration.Test.ScenarioTests.GetVmGuestPolicyStatusTests/VmNameScope.json

Lines changed: 241 additions & 241 deletions
Large diffs are not rendered by default.

src/GuestConfiguration/GuestConfiguration/Cmdlets/GetAzVMGuestPolicyStatus.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ public class GetAzVMGuestPolicyStatus : GuestConfigurationCmdletBase
4949
[ValidateNotNullOrEmpty]
5050
public string InitiativeId { get; set; }
5151

52-
[Parameter(ParameterSetName = ParameterSetNames.IdScope, Mandatory = true, Position = 0, HelpMessage = ParameterHelpMessages.Id)]
52+
[Parameter(ParameterSetName = ParameterSetNames.ReportIdScope, Mandatory = true, Position = 0, HelpMessage = ParameterHelpMessages.ReportId)]
5353
[ValidateNotNullOrEmpty]
54-
public string Id { get; set; }
54+
public string ReportId { get; set; }
5555

5656
/// <summary>
5757
/// Executes the cmdlet
@@ -85,8 +85,8 @@ public override void ExecuteCmdlet()
8585
}
8686
break;
8787

88-
case ParameterSetNames.IdScope:
89-
var policyReport = GetPolicyStatusDetailedByReportId(Id);
88+
case ParameterSetNames.ReportIdScope:
89+
var policyReport = GetPolicyStatusDetailedByReportId(ReportId);
9090
if (policyReport != null)
9191
{
9292
WriteObject(policyReport);

src/GuestConfiguration/GuestConfiguration/Common/ParameterHelpMessages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static class ParameterHelpMessages
2323
public const string VMName = "VM name.";
2424
public const string InitiativeName = "Name of a policy where definition type is Initiative and category is Guest Configuration";
2525
public const string InitiativeId = "Definition Id of a policy where definition type is Initiative and category is Guest Configuration";
26-
public const string Id = "Id of a Guest Configuration policy status. A policy where definition type is Initiative and category is Guest Configuration must be assigned to a scope to get statuses.";
26+
public const string ReportId = "Id of a Guest Configuration policy status. A policy where definition type is Initiative and category is Guest Configuration must be assigned to a scope to get statuses.";
2727
public const string ShowOnlyChange = "Shows historical status changes only for guest configuration policies. Skips statuses that have not changed between two compliance status audit runs.";
2828
}
2929
}

src/GuestConfiguration/GuestConfiguration/Common/ParameterSetNames.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public static class ParameterSetNames
2222
public const string VmNameScope = "VmScope";
2323
public const string InitiativeNameScope = "InitiativeNameScope";
2424
public const string InitiativeIdScope = "InitiativeIdScope";
25-
public const string IdScope = "IdScope";
25+
public const string ReportIdScope = "ReportIdScope";
2626
}
2727
}

src/GuestConfiguration/GuestConfiguration/GuestConfiguration.format.ps1xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<TableColumnHeader><Label>StartTime</Label><Width>10</Width></TableColumnHeader>
1515
<TableColumnHeader><Label>EndTime</Label><Width>10</Width></TableColumnHeader>
1616
<TableColumnHeader><Label>VMName</Label><Width>10</Width></TableColumnHeader>
17-
<TableColumnHeader><Label>Id</Label><Width>10</Width></TableColumnHeader>
17+
<TableColumnHeader><Label>ReportId</Label><Width>10</Width></TableColumnHeader>
1818
</TableHeaders>
1919
<TableRowEntries>
2020
<TableRowEntry>
@@ -36,7 +36,7 @@
3636
<TableColumnItem><ScriptBlock>$_.StartTime.ToString("MM/dd/yyyy hh:mm:ss tt")</ScriptBlock></TableColumnItem>
3737
<TableColumnItem><ScriptBlock>$_.EndTime.ToString("MM/dd/yyyy hh:mm:ss tt")</ScriptBlock></TableColumnItem>
3838
<TableColumnItem><ScriptBlock>$_.VM.ResourceId.Substring($_.VM.ResourceId.LastIndexOf("/")+1)</ScriptBlock></TableColumnItem>
39-
<TableColumnItem><ScriptBlock>".." + $_.Id.Substring($_.Id.LastIndexOf("/"), 37)</ScriptBlock></TableColumnItem>
39+
<TableColumnItem><ScriptBlock>".." + $_.ReportId.Substring($_.ReportId.LastIndexOf("/"), 37)</ScriptBlock></TableColumnItem>
4040
</TableColumnItems>
4141
</TableRowEntry>
4242
</TableRowEntries>
@@ -54,7 +54,7 @@
5454
<TableColumnHeader><Label>StartTime</Label><Width>10</Width></TableColumnHeader>
5555
<TableColumnHeader><Label>EndTime</Label><Width>10</Width></TableColumnHeader>
5656
<TableColumnHeader><Label>VMName</Label><Width>10</Width></TableColumnHeader>
57-
<TableColumnHeader><Label>Id</Label><Width>10</Width></TableColumnHeader>
57+
<TableColumnHeader><Label>ReportId</Label><Width>10</Width></TableColumnHeader>
5858
</TableHeaders>
5959
<TableRowEntries>
6060
<TableRowEntry>
@@ -64,7 +64,7 @@
6464
<TableColumnItem><ScriptBlock>$_.StartTime.ToString("MM/dd/yyyy hh:mm:ss tt")</ScriptBlock></TableColumnItem>
6565
<TableColumnItem><ScriptBlock>$_.EndTime.ToString("MM/dd/yyyy hh:mm:ss tt")</ScriptBlock></TableColumnItem>
6666
<TableColumnItem><ScriptBlock>$_.VM.ResourceId.Substring($_.VM.ResourceId.LastIndexOf("/")+1)</ScriptBlock></TableColumnItem>
67-
<TableColumnItem><ScriptBlock>".." + $_.Id.Substring($_.Id.LastIndexOf("/"), 37)</ScriptBlock></TableColumnItem>
67+
<TableColumnItem><ScriptBlock>".." + $_.ReportId.Substring($_.ReportId.LastIndexOf("/"), 37)</ScriptBlock></TableColumnItem>
6868
</TableColumnItems>
6969
</TableRowEntry>
7070
</TableRowEntries>

src/GuestConfiguration/GuestConfiguration/Models/PolicyStatus.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public PolicyStatus(GuestConfigurationAssignmentReport gcrpReport, PolicyData gc
3737

3838
if (gcrpReport != null && gcrpReport.Properties != null)
3939
{
40-
this.Id = gcrpReport.Id;
40+
this.ReportId = gcrpReport.Id;
4141
this.StartTime = gcrpReport.Properties.StartTime;
4242
this.EndTime = gcrpReport.Properties.EndTime;
4343
this.ComplianceStatus = gcrpReport.Properties.ComplianceStatus;
@@ -61,7 +61,7 @@ public PolicyStatus(GuestConfigurationAssignmentReport gcrpReport, PolicyData gc
6161

6262
public DateTime? EndTime { get; set; }
6363

64-
public string Id { get; set; }
64+
public string ReportId { get; set; }
6565

6666
public VMInfo VM { get; set; }
6767

src/GuestConfiguration/GuestConfiguration/help/Get-AzVMGuestPolicyStatus.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Get-AzVMGuestPolicyStatus [-ResourceGroupName] <String> [-VMName] <String> [-Ini
3030
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3131
```
3232

33-
### IdScope
33+
### ReportIdScope
3434
```
35-
Get-AzVMGuestPolicyStatus [-Id] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
35+
Get-AzVMGuestPolicyStatus [-ReportId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3636
```
3737

3838
## DESCRIPTION
@@ -63,10 +63,10 @@ Get the latest guest configuration policy statuses by initiative name. The statu
6363

6464
### Example 4
6565
```powershell
66-
PS C:\> Get-AzVMGuestPolicyStatus -Id "/subscriptions/4e6c6ed2-0bf6-41d7-9d21-a452c2cc7920/resourceGroups/MyResourceGroupName/providers/Microsoft.Compute/virtualMachines/MyVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/MaximumPasswordAge/reports/c271f845-2c0a-4456-a441-e48fc332d0ac"
66+
PS C:\> Get-AzVMGuestPolicyStatus -ReportId "/subscriptions/4e6c6ed2-0bf6-41d7-9d21-a452c2cc7920/resourceGroups/MyResourceGroupName/providers/Microsoft.Compute/virtualMachines/MyVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/MaximumPasswordAge/reports/c271f845-2c0a-4456-a441-e48fc332d0ac"
6767
```
6868

69-
Get guest configuration policy status by Id. The Id is the Id property that can be found in the results of Get-AzVMGuestPolicyStatus by initiativeId or Initiative name (please refer other examples)
69+
Get guest configuration policy status by ReportId. The ReportId is the ReportId property that can be found in the results of Get-AzVMGuestPolicyStatus by initiativeId or Initiative name (please refer other examples)
7070

7171
## PARAMETERS
7272

@@ -115,13 +115,12 @@ Accept pipeline input: False
115115
Accept wildcard characters: False
116116
```
117117
118-
### -Id
119-
Id of a Guest Configuration policy status.
120-
A policy where definition type is Initiative and category is Guest Configuration must be assigned to a scope to get statuses.
118+
### -ReportId
119+
ReportId of a Guest Configuration policy status. A policy where definition type is Initiative and category is Guest Configuration must be assigned to a scope to get statuses.
121120
122121
```yaml
123122
Type: System.String
124-
Parameter Sets: IdScope
123+
Parameter Sets: ReportIdScope
125124
Aliases:
126125

127126
Required: True

src/GuestConfiguration/GuestConfiguration/help/Get-AzVMGuestPolicyStatusHistory.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ An initiative is a policy of definition type "Initiative".
1515

1616
### VmScope (Default)
1717
```
18-
Get-AzVMGuestPolicyStatusHistory [-ResourceGroupName] <String> [-VMName] <String>
19-
[-ShowOnlyChange] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
18+
Get-AzVMGuestPolicyStatusHistory [-ResourceGroupName] <String> [-VMName] <String> [-ShowOnlyChange]
19+
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2020
```
2121

2222
### InitiativeIdScope
@@ -34,7 +34,7 @@ Get-AzVMGuestPolicyStatusHistory [-ResourceGroupName] <String> [-VMName] <String
3434
## DESCRIPTION
3535
The Get-AzVMGuestPolicyStatusHistory cmdlet gets compliance status history of guest configuration policies for an initiative of type "Guest Configuration" that is assigned to a VM.
3636
An initiative is a policy of definition type "Initiative".
37-
Use Get-AzVMGuestPolicyStatus cmdlet to get details of a single compliance status using Id that can be found in output of Get-AzVMGuestPolicyStatusHistory cmdlet.
37+
Use Get-AzVMGuestPolicyStatus cmdlet to get details of a single compliance status using ReportId that can be found in output of Get-AzVMGuestPolicyStatusHistory cmdlet.
3838

3939
## EXAMPLES
4040

@@ -67,27 +67,19 @@ Skips statuses that have not changed between two compliance checks.
6767

6868
### Example 4
6969
```
70-
PS C:\> Get-AzVMGuestPolicyStatus -Id "/subscriptions/4e6c6ed2-0bf6-41d7-9d21-a452c2cc7920/resourceGroups/MyResourceGroupName/providers/Microsoft.Compute/virtualMachines/MyVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/MaximumPasswordAge/reports/c271f845-2c0a-4456-a441-e48fc332d0ac"
71-
```
72-
73-
Get detailed guest configuration policy status by Id.
74-
The Id is the Id property that can be found in the results of Get-AzVMGuestPolicyStatusHistory by initiativeId or Initiative name (please refer other examples)
75-
76-
### Example 5
77-
```
7870
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -InitiativeId "/providers/Microsoft.Authorization/policySetDefinitions/3fa7cbf5-c0a4-4a59-85a5-cca4d996d5af"
7971
```
8072

8173
Gets compliance status history by initiative Id.
8274

83-
### Example 6
75+
### Example 5
8476
```
8577
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -InitiativeName "b5a822e0-ba98-4e54-9278-5d9833aa9b17"
8678
```
8779

8880
Gets compliance status history by initiative name.
8981

90-
### Example 7
82+
### Example 6
9183
```
9284
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName"
9385
```

0 commit comments

Comments
 (0)