Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update comment based help and tests #84

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@

.EXAMPLE
PS C:\> Get-D365LcsEnvironmentRsatCertificate -ProjectId "123456789" -EnvironmentId "13cc7700-c13b-4ea3-81cd-2d26fa72ec5e" | Import-D365RsatSelfServiceCertificates

This will download the active rsat certificate file for the environment from the LCS project.
The resulting files are then imported into the certificate store on the local machine.

.NOTES
Author: Mötz Jensen (@Splaxi)
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$parameter.ParameterSets['__AllParameterSets'].IsMandatory | Should -Be $True
$parameter.ParameterSets['__AllParameterSets'].Position | Should -Be 0
$parameter.ParameterSets['__AllParameterSets'].ValueFromPipeline | Should -Be $False
$parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $False
$parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $True
$parameter.ParameterSets['__AllParameterSets'].ValueFromRemainingArguments | Should -Be $False
}
It 'Should have the expected parameter Password' {
Expand All @@ -34,7 +34,7 @@
$parameter.ParameterSets['__AllParameterSets'].IsMandatory | Should -Be $True
$parameter.ParameterSets['__AllParameterSets'].Position | Should -Be 1
$parameter.ParameterSets['__AllParameterSets'].ValueFromPipeline | Should -Be $False
$parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $False
$parameter.ParameterSets['__AllParameterSets'].ValueFromPipelineByPropertyName | Should -Be $True
$parameter.ParameterSets['__AllParameterSets'].ValueFromRemainingArguments | Should -Be $False
}
}
Expand Down
14 changes: 10 additions & 4 deletions docs/Get-D365LcsEnvironmentRsatCertificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema: 2.0.0
# Get-D365LcsEnvironmentRsatCertificate

## SYNOPSIS
Get LCS environment meta data from within a project
Get LCS environment rsat certificate from within a project

## SYNTAX

Expand All @@ -19,9 +19,7 @@ Get-D365LcsEnvironmentRsatCertificate [[-ProjectId] <Int32>] [[-BearerToken] <St
```

## DESCRIPTION
Get all meta data details for environments from within a LCS project

It supports listing all environments, but also supports single / specific environments by searching based on EnvironmentId or EnvironmentName
Download and persist the active rsat certificate from environments from within a LCS project

## EXAMPLES

Expand All @@ -42,6 +40,14 @@ PfxFile : C:\temp\d365fo.tools\RsatCert\RSATCertificate_ABC-UAT_20240101-012030
FileName : RSATCertificate_ABC-UAT_20240101-012030.zip
Password : 9zbPiLMTk676mkq5FvqQ

### EXAMPLE 2
```
Get-D365LcsEnvironmentRsatCertificate -ProjectId "123456789" -EnvironmentId "13cc7700-c13b-4ea3-81cd-2d26fa72ec5e" | Import-D365RsatSelfServiceCertificates
```

This will download the active rsat certificate file for the environment from the LCS project.
The resulting files are then imported into the certificate store on the local machine.

## PARAMETERS

### -ProjectId
Expand Down
6 changes: 3 additions & 3 deletions docs/Import-D365RsatSelfServiceCertificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The zip file needs to be unblocked and then extracted into a folder, with only t
Import-D365RsatSelfServiceCertificates -Path "C:\Temp\UAT" -Password "123456789"
```

This will import the .cer and .pxf files into the correct stored, bases on the files located in "C:\Temp\UAT".
This will import the .cer and .pxf files into the correct store, bases on the files located in "C:\Temp\UAT".
After import it will display the thumbprint for both certificates.

Sample output:
Expand All @@ -51,7 +51,7 @@ Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

Expand All @@ -68,7 +68,7 @@ Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

Expand Down