From c37300b546efa2bf1644113e9f36b2f05a5b4a4a Mon Sep 17 00:00:00 2001 From: Oleksandr Nikolaiev Date: Mon, 23 Feb 2026 01:25:17 +0300 Subject: [PATCH] Wiki updates --- fscps.tools/changelog.md | 10 +- wiki/How-To-Download-FSC-NuGets.md | 29 +++- wiki/How-To-Download-System-Update-Package.md | 83 +++++++++++ wiki/How-To-Sign-Files.md | 82 +++++++++++ wiki/How-To-Work-With-ADO-Test-Cases.md | 131 ++++++++++++++++++ wiki/How-To-Work-With-Model-Versions.md | 82 +++++++++++ wiki/_Sidebar.md | 4 + 7 files changed, 416 insertions(+), 5 deletions(-) create mode 100644 wiki/How-To-Download-System-Update-Package.md create mode 100644 wiki/How-To-Sign-Files.md create mode 100644 wiki/How-To-Work-With-ADO-Test-Cases.md create mode 100644 wiki/How-To-Work-With-Model-Versions.md diff --git a/fscps.tools/changelog.md b/fscps.tools/changelog.md index ff872a0..0227fba 100644 --- a/fscps.tools/changelog.md +++ b/fscps.tools/changelog.md @@ -1,5 +1,7 @@ # Changelog -## 1.0.0 (2024-03-27) - - New: Some Stuff - - Upd: Moar Stuff - - Fix: Much Stuff \ No newline at end of file +## 1.1.0 (2026-02-23) + - New: Get-FSCPSNuget now supports `-KnownVersion` and `-KnownType` parameters to resolve NuGet versions from short FNO versions (e.g. `10.0.45`) with GA/Latest strategy + - New: Added `VersionStrategy` enum (GA, Latest) + - Fix: Fixed Cyrillic character in variable names in `Invoke-CloudRuntimeAssembliesImport` that caused parse errors + - Upd: Get-FSCPSNuget now automatically creates the destination path if it does not exist + diff --git a/wiki/How-To-Download-FSC-NuGets.md b/wiki/How-To-Download-FSC-NuGets.md index 6cb9d63..71dc2ed 100644 --- a/wiki/How-To-Download-FSC-NuGets.md +++ b/wiki/How-To-Download-FSC-NuGets.md @@ -20,8 +20,9 @@ Import-Module -Name fscps.tools [[images/tutorials/Import-Module-Administrator.gif]] -## **Download NuGets** +## **Download NuGets using exact version** +If you already know the exact NuGet version (e.g. `10.0.1777.99`), you can download packages directly: ``` $DynamicsVersion = "10.0.39" @@ -40,5 +41,31 @@ Get-ChildItem $PackagesDirectory [[images/howto/How-To-Download-FSC-NuGets.gif]] +## **Download NuGets using FNO version (KnownVersion)** + +You can also use the short FNO version (e.g. `10.0.45`) and let the cmdlet automatically resolve the correct NuGet version. Use the `-KnownType` parameter to choose between `GA` (General Availability) and `Latest` versions. + +``` +$DynamicsVersion = "10.0.45" +$PackagesDirectory = "C:\Temp\NuGets\$DynamicsVersion" + +# Download all NuGet packages for the GA version +Get-FSCPSNuget -KnownVersion $DynamicsVersion -KnownType GA -Type PlatformCompilerPackage -Path $PackagesDirectory -Force +Get-FSCPSNuget -KnownVersion $DynamicsVersion -KnownType GA -Type PlatformDevALM -Path $PackagesDirectory -Force +Get-FSCPSNuget -KnownVersion $DynamicsVersion -KnownType GA -Type ApplicationDevALM -Path $PackagesDirectory -Force +Get-FSCPSNuget -KnownVersion $DynamicsVersion -KnownType GA -Type ApplicationSuiteDevALM -Path $PackagesDirectory -Force +Get-ChildItem $PackagesDirectory +``` + +To download the **Latest** available version instead of GA: + +``` +Get-FSCPSNuget -KnownVersion "10.0.45" -KnownType Latest -Type PlatformCompilerPackage -Path "C:\Temp\NuGets" -Force +``` + +> **Note:** The `-KnownType` parameter accepts two values: +> - `GA` — resolves to the General Availability (stable) NuGet version +> - `Latest` — resolves to the latest available NuGet version + ## **Closing comments** In this tutorial we showed you how to download D365FSC nuget packages. \ No newline at end of file diff --git a/wiki/How-To-Download-System-Update-Package.md b/wiki/How-To-Download-System-Update-Package.md new file mode 100644 index 0000000..88c4e71 --- /dev/null +++ b/wiki/How-To-Download-System-Update-Package.md @@ -0,0 +1,83 @@ +This tutorial will show you how to download D365FSC system update packages (service updates, previews, quality updates) using fscps.tools. + +## **Prerequisites** +* PowerShell 5.1 +* fscps.tools module installed +* Azure Storage Account configured with the update packages (see [[Work with Azure Storage Account]]) + +Please visit the [Install as a Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Administrator) or the [Install as a non-Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Non-Administrator) tutorials to learn how to install the tools. + +## **Import module** + +``` +Import-Module -Name fscps.tools +``` + +## **Understanding update types** + +The `Get-FSCPSSystemUpdatePackage` cmdlet supports the following update types: + +| UpdateType | Description | +| :-- | :-- | +| **SystemUpdate** | The GA (General Availability) service update package | +| **Preview** | The preview version of a service update | +| **FinalQualityUpdate** | The final quality update for a version | +| **ProactiveQualityUpdate** | A proactive quality update | + +## **Download a system update package** + +### **Download the GA service update** + +``` +Get-FSCPSSystemUpdatePackage ` + -UpdateType SystemUpdate ` + -D365FSCVersion "10.0.40" ` + -OutputPath "C:\Packages\" +``` + +This will download the service update package for version 10.0.40 and save it to `C:\Packages\`. + +### **Download a preview version** + +``` +Get-FSCPSSystemUpdatePackage ` + -UpdateType Preview ` + -D365FSCVersion "10.0.41" ` + -OutputPath "C:\Packages\" +``` + +### **Download a final quality update** + +``` +Get-FSCPSSystemUpdatePackage ` + -UpdateType FinalQualityUpdate ` + -D365FSCVersion "10.0.40" ` + -OutputPath "C:\Packages\" +``` + +### **Force re-download** + +If the package already exists locally, use `-Force` to re-download: + +``` +Get-FSCPSSystemUpdatePackage ` + -UpdateType SystemUpdate ` + -D365FSCVersion "10.0.40" ` + -OutputPath "C:\Packages\" ` + -Force +``` + +### **Use a custom storage config** + +By default the cmdlet uses the `PackageStorage` storage account configuration. You can specify a different one: + +``` +Get-FSCPSSystemUpdatePackage ` + -UpdateType SystemUpdate ` + -D365FSCVersion "10.0.40" ` + -OutputPath "C:\Packages\" ` + -StorageAccountConfig "MyCustomStorage" +``` + +## **Closing comments** +In this tutorial we showed you how to use `Get-FSCPSSystemUpdatePackage` to download different types of D365FSC update packages. Make sure your Azure Storage Account is configured with the correct packages before using this cmdlet (see [[Work with Azure Storage Account]]). diff --git a/wiki/How-To-Sign-Files.md b/wiki/How-To-Sign-Files.md new file mode 100644 index 0000000..e2d53cd --- /dev/null +++ b/wiki/How-To-Sign-Files.md @@ -0,0 +1,82 @@ +This tutorial will show you how to sign D365FSC deployable packages and other files using code signing certificates. + +## **Prerequisites** +* PowerShell 5.1 +* fscps.tools module installed +* A valid code signing certificate (DigiCert or Azure KeyVault) + +Please visit the [Install as a Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Administrator) or the [Install as a non-Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Non-Administrator) tutorials to learn how to install the tools. + +## **Start PowerShell** +Locate the PowerShell icon, if you don't have it on your desktop or in the task pane, we can locate it in the Windows Start Menu. Search for it or type PowerShell. + +[[images/tutorials/First-Time-Start-PowerShell-Non-Administrator.gif]] + +## **Import module** +You need to import / load the fscps.tools module into the current PowerShell console. Type the following command: + +``` +Import-Module -Name fscps.tools +``` + +## **Sign files with DigiCert** + +If you have a DigiCert code signing certificate, you can use the `Invoke-FSCPSDigiCertSignFile` cmdlet. + +You will need: +* **SM_API_KEY** — your DigiCert API key +* **SM_CLIENT_CERT_FILE_URL** or **SM_CLIENT_CERT_FILE** — URL or local path to the `.p12` certificate file +* **SM_CLIENT_CERT_PASSWORD** — the certificate password (as SecureString) +* **SM_CODE_SIGNING_CERT_SHA1_HASH** — the certificate thumbprint (fingerprint) + +``` +$certPassword = ConvertTo-SecureString "YourPassword" -AsPlainText -Force + +Invoke-FSCPSDigiCertSignFile ` + -SM_API_KEY "your-api-key" ` + -SM_CLIENT_CERT_FILE "c:\certs\digicert.p12" ` + -SM_CLIENT_CERT_PASSWORD $certPassword ` + -SM_CODE_SIGNING_CERT_SHA1_HASH "your-cert-thumbprint" ` + -FILE "c:\packages\MyPackage.zip" +``` + +If you have the certificate hosted remotely, use `-SM_CLIENT_CERT_FILE_URL` instead of `-SM_CLIENT_CERT_FILE`: + +``` +Invoke-FSCPSDigiCertSignFile ` + -SM_API_KEY "your-api-key" ` + -SM_CLIENT_CERT_FILE_URL "https://your-storage/digicert.p12" ` + -SM_CLIENT_CERT_PASSWORD $certPassword ` + -SM_CODE_SIGNING_CERT_SHA1_HASH "your-cert-thumbprint" ` + -FILE "c:\packages\MyPackage.zip" +``` + +## **Sign files with Azure KeyVault** + +If you store your signing certificate in Azure KeyVault, use the `Invoke-FSCPSAzureSignToolSignFile` cmdlet. + +You will need: +* **Uri** — the KeyVault URL (e.g. `https://my-vault.vault.azure.net`) +* **TenantId** — your Azure AD tenant ID +* **CertificateName** — the name of the certificate in KeyVault +* **ClientId** — the Azure AD application (service principal) client ID +* **ClientSecret** — the client secret (as SecureString) + +``` +$clientSecret = ConvertTo-SecureString "your-client-secret" -AsPlainText -Force + +Invoke-FSCPSAzureSignToolSignFile ` + -Uri "https://my-vault.vault.azure.net" ` + -TenantId "01234567-abcd-ef01-0000-0123456789ab" ` + -CertificateName "my-signing-cert" ` + -ClientId "01234567-abcd-ef01-0000-0123456789ab" ` + -ClientSecret $clientSecret ` + -FILE "c:\packages\MyPackage.zip" +``` + +## **Closing comments** +In this tutorial we showed you two ways to sign files: +- **DigiCert** — using `Invoke-FSCPSDigiCertSignFile` for DigiCert-hosted certificates +- **Azure KeyVault** — using `Invoke-FSCPSAzureSignToolSignFile` for certificates stored in Azure KeyVault + +Both approaches are suitable for signing deployable packages, DLLs, and other artifacts in your CI/CD pipeline. diff --git a/wiki/How-To-Work-With-ADO-Test-Cases.md b/wiki/How-To-Work-With-ADO-Test-Cases.md new file mode 100644 index 0000000..ab1d244 --- /dev/null +++ b/wiki/How-To-Work-With-ADO-Test-Cases.md @@ -0,0 +1,131 @@ +This tutorial will show you how to work with Azure DevOps (ADO) test cases and test suites using fscps.tools. + +## **Prerequisites** +* PowerShell 5.1 +* fscps.tools module installed +* Access to an Azure DevOps project with Test Plans +* A valid Azure DevOps Personal Access Token (PAT) with test management permissions + +Please visit the [Install as a Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Administrator) or the [Install as a non-Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Non-Administrator) tutorials to learn how to install the tools. + +## **Import module** + +``` +Import-Module -Name fscps.tools +``` + +## **Prepare authentication** + +All ADO cmdlets require a `-Token` parameter. Use a Bearer token with your PAT: + +``` +$pat = "your-personal-access-token" +$token = "Bearer " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$pat")) +$organization = "my-org" +$project = "my-project" +``` + +## **Available cmdlets** + +| Cmdlet | Description | +| :-- | :-- | +| `Get-FSCPSADOTestCase` | Get details of a specific test case by ID | +| `Get-FSCPSADOTestSuitesByTestPlan` | List all test suites in a test plan | +| `Get-FSCPSADOTestCasesBySuite` | List all test cases in a test suite | +| `Get-FSCPSADOTestSuiteByTestCase` | Find which test suite a test case belongs to | + +## **Get test case details** + +Retrieve detailed information about a specific test case: + +``` +Get-FSCPSADOTestCase ` + -TestCaseId 1234 ` + -Project $project ` + -Organization $organization ` + -Token $token +``` + +## **List test suites in a test plan** + +Get all test suites from a specific test plan: + +``` +$suites = Get-FSCPSADOTestSuitesByTestPlan ` + -Organization $organization ` + -Project $project ` + -TestPlanId 100 ` + -Token $token + +$suites | ForEach-Object { + Write-Host "Suite: $($_.name) (ID: $($_.id))" +} +``` + +## **List test cases in a test suite** + +Get all test cases from a specific test suite within a test plan: + +``` +$testCases = Get-FSCPSADOTestCasesBySuite ` + -TestSuiteId 1001 ` + -TestPlanId 100 ` + -Organization $organization ` + -Project $project ` + -Token $token + +$testCases | ForEach-Object { + Write-Host "Test Case: $($_.testCase.name) (ID: $($_.testCase.id))" +} +``` + +## **Find test suite by test case** + +Find which test suite a specific test case belongs to: + +``` +Get-FSCPSADOTestSuiteByTestCase ` + -TestCaseId 1234 ` + -Project $project ` + -Organization $organization ` + -Token $token +``` + +## **Example: Export all test cases from a test plan** + +A practical example that lists all test cases across all suites in a test plan: + +``` +$testPlanId = 100 + +# Get all suites in the test plan +$suites = Get-FSCPSADOTestSuitesByTestPlan ` + -Organization $organization ` + -Project $project ` + -TestPlanId $testPlanId ` + -Token $token + +foreach ($suite in $suites) { + Write-Host "=== Suite: $($suite.name) (ID: $($suite.id)) ===" + + $testCases = Get-FSCPSADOTestCasesBySuite ` + -TestSuiteId $suite.id ` + -TestPlanId $testPlanId ` + -Organization $organization ` + -Project $project ` + -Token $token + + foreach ($tc in $testCases) { + Write-Host " - $($tc.testCase.name) (ID: $($tc.testCase.id))" + } +} +``` + +## **Closing comments** +In this tutorial we showed you how to use the ADO test management cmdlets: +- **Get-FSCPSADOTestCase** — get details of a test case +- **Get-FSCPSADOTestSuitesByTestPlan** — list suites in a test plan +- **Get-FSCPSADOTestCasesBySuite** — list test cases in a suite +- **Get-FSCPSADOTestSuiteByTestCase** — find which suite a test case belongs to + +These cmdlets are useful for test management automation, reporting, and integration with CI/CD pipelines. diff --git a/wiki/How-To-Work-With-Model-Versions.md b/wiki/How-To-Work-With-Model-Versions.md new file mode 100644 index 0000000..d78654f --- /dev/null +++ b/wiki/How-To-Work-With-Model-Versions.md @@ -0,0 +1,82 @@ +This tutorial will show you how to read and update D365FSC model versions using fscps.tools. + +## **Prerequisites** +* PowerShell 5.1 +* fscps.tools module installed +* A D365FSC metadata folder with model descriptors + +Please visit the [Install as a Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Administrator) or the [Install as a non-Administrator](https://github.com/fscpscollaborative/fscps.tools/wiki/Tutorial-Install-Non-Administrator) tutorials to learn how to install the tools. + +## **Import module** + +``` +Import-Module -Name fscps.tools +``` + +## **Get model version** + +Use `Get-FSCPSModelVersion` to read the current version of a model from its descriptor file. You only need to specify the model folder — the cmdlet will automatically find the descriptor XML inside the `Descriptor` subfolder. + +``` +Get-FSCPSModelVersion -ModelPath "c:\temp\PackagesLocalDirectory\MyCustomModel" +``` + +This will return an object with: +- **ModelName** — the name of the model +- **Version** — the full version string (e.g. `2.1.5.0`) +- **Layer** — the model layer (e.g. `ISV`, `VAR`, `CUS`) + +### **Example: Get versions for all models** + +``` +$metadataPath = "c:\temp\PackagesLocalDirectory" + +Get-ChildItem -Path $metadataPath -Directory | ForEach-Object { + $versionInfo = Get-FSCPSModelVersion -ModelPath $_.FullName + if ($versionInfo) { + Write-Host "$($versionInfo.ModelName) - Version: $($versionInfo.Version) - Layer: $($versionInfo.Layer)" + } +} +``` + +## **Update model version** + +Use `Update-FSCPSModelVersion` to change the version of one or more models. This is useful in CI/CD pipelines to stamp build numbers into the model metadata before compilation. + +Parameters: +- **xppSourcePath** — path to the root metadata folder +- **xppDescriptorSearch** — search pattern for the model descriptor (e.g. `MyModel\Descriptor\*.xml`) +- **xppLayer** — minimum layer to update (e.g. `ISV` will update ISV and above) +- **versionNumber** — the new version in `#.#.#.#` format + +``` +Update-FSCPSModelVersion ` + -xppSourcePath "c:\temp\PackagesLocalDirectory" ` + -xppDescriptorSearch "MyCustomModel\Descriptor\*.xml" ` + -xppLayer "ISV" ` + -versionNumber "2.1.6.0" +``` + +### **Example: Update all ISV+ models to a build version** + +``` +$metadataPath = "c:\temp\PackagesLocalDirectory" +$buildVersion = "3.0.$(Get-Date -Format 'yyMM').$(Get-Date -Format 'ddHH')" + +# Update all models at ISV layer and above +Get-ChildItem -Path $metadataPath -Directory | ForEach-Object { + $descriptorPattern = "$($_.Name)\Descriptor\*.xml" + Update-FSCPSModelVersion ` + -xppSourcePath $metadataPath ` + -xppDescriptorSearch $descriptorPattern ` + -xppLayer "ISV" ` + -versionNumber $buildVersion +} +``` + +## **Closing comments** +In this tutorial we showed you how to: +- **Read** model versions using `Get-FSCPSModelVersion` +- **Update** model versions using `Update-FSCPSModelVersion` + +These cmdlets are especially useful in automated build pipelines to track and stamp version numbers into your D365FSC models. diff --git a/wiki/_Sidebar.md b/wiki/_Sidebar.md index d579ef7..9041b41 100644 --- a/wiki/_Sidebar.md +++ b/wiki/_Sidebar.md @@ -11,6 +11,10 @@ * [Compile ISV model](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Compile-ISV-model) * [Invoke Choco](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Use-Choco) * [Download FSC NuGets](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Download-FSC-NuGets) +* [Download System Update Package](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Download-System-Update-Package) +* [Sign Files (DigiCert / Azure KeyVault)](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Sign-Files) +* [Work with Model Versions](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Work-With-Model-Versions) +* [Work with ADO Test Cases](https://github.com/fscpscollaborative/fscps.tools/wiki/How-To-Work-With-ADO-Test-Cases) ## **Guides** * [[Work with Azure Storage Account]]