From ffa8402a12def378be0b9cd364898442b987374a Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 3 Nov 2026 12:22:59 -0800 Subject: [PATCH 01/19] Pin Linux image version to Ubuntu 24.04 for CI tests (#28307) --- .github/workflows/linux-ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 65c52ced095..e9a663ce082 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -46,7 +46,7 @@ jobs: changes: if: startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell' name: Change Detection - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Required permissions permissions: pull-requests: read @@ -71,7 +71,7 @@ jobs: merge_conflict_check: name: Check for Merge Conflict Markers - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: github.event_name == 'pull_request' && (startsWith(github.repository_owner, 'azure') || github.repository_owner == 'PowerShell') permissions: pull-requests: read @@ -85,7 +85,7 @@ jobs: ci_build: name: Build PowerShell - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: changes if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} steps: @@ -102,7 +102,7 @@ jobs: - ci_build - changes if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -120,7 +120,7 @@ jobs: - ci_build - changes if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -138,7 +138,7 @@ jobs: - ci_build - changes if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -156,7 +156,7 @@ jobs: - ci_build - changes if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -175,12 +175,12 @@ jobs: if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }} uses: ./.github/workflows/xunit-tests.yml with: - runner_os: ubuntu-latest + runner_os: ubuntu-24.04 test_results_artifact_name: testResults-xunit infrastructure_tests: name: Infrastructure Tests - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -254,7 +254,7 @@ jobs: needs: - changes if: ${{ needs.changes.outputs.packagingChanged == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 01b9a93c3a20a36c4ab8e4c0a54e61ab9d921a64 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Tue, 3 Nov 2026 14:36:12 -0800 Subject: [PATCH 02/19] Fix the regex in `ConsoleHost.Tests.ps1` used to verify help content (#28308) --- test/powershell/Host/ConsoleHost.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Host/ConsoleHost.Tests.ps1 b/test/powershell/Host/ConsoleHost.Tests.ps1 index c87863826fe..2da0c0be921 100644 --- a/test/powershell/Host/ConsoleHost.Tests.ps1 +++ b/test/powershell/Host/ConsoleHost.Tests.ps1 @@ -127,7 +127,7 @@ Describe "ConsoleHost unit tests" -tags "Feature" { } foreach ($x in "--help", "-help", "-h", "-?", "--he", "-hel", "--HELP", "-hEl") { It "Accepts '$x' as a parameter for help" { - & $powershell -noprofile $x | Where-Object { $_ -match "pwsh[.exe] -Help | -? | /?" } | Should -Not -BeNullOrEmpty + & $powershell -noprofile $x | Where-Object { $_ -match 'pwsh\[\.exe\] -h \| -Help \| -\? \| /\?' } | Should -Not -BeNullOrEmpty } } From 519b7c130c75ffac0573d798003b32b895cb6693 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:56:54 -0600 Subject: [PATCH 03/19] Stop publishing previews to Azure Linux 4 (#28324) Co-authored-by: Justin Chung --- test/packaging/packaging.tests.ps1 | 28 +++++++++++------------ tools/packages.microsoft.com/mapping.json | 16 ------------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/test/packaging/packaging.tests.ps1 b/test/packaging/packaging.tests.ps1 index 7c872095a92..00964c72876 100644 --- a/test/packaging/packaging.tests.ps1 +++ b/test/packaging/packaging.tests.ps1 @@ -134,38 +134,36 @@ Describe "Packaging Module Functions" { $mapping = Get-Content -Path $mappingPath -Raw | ConvertFrom-Json } - It "Should map packages to " -TestCases @( + It "Should map stable packages to " -TestCases @( @{ - Channel = "preview" - Architecture = "x86_64" - Url = "azurelinux-4-preview-microsoft-x86_64" - } - @{ - Channel = "preview" - Architecture = "aarch64" - Url = "azurelinux-4-preview-microsoft-aarch64" - } - @{ - Channel = "stable" Architecture = "x86_64" Url = "azurelinux-4-prod-microsoft-x86_64" } @{ - Channel = "stable" Architecture = "aarch64" Url = "azurelinux-4-prod-microsoft-aarch64" } ) { - param($Channel, $Architecture, $Url) + param($Architecture, $Url) $mappedPackage = @($mapping.Packages | Where-Object url -EQ $Url) $mappedPackage.Count | Should -Be 1 - $mappedPackage[0].channel | Should -BeExactly $Channel + $mappedPackage[0].channel | Should -BeExactly "stable" $mappedPackage[0].distribution | Should -BeExactly @("azl") $mappedPackage[0].PackageFormat | Should -BeExactly "PACKAGE_NAME-POWERSHELL_RELEASE-1.azl4.$Architecture.rpm" } + It "Should not map preview packages to Azure Linux 4" { + @( + $mapping.Packages | + Where-Object { + $_.channel -eq "preview" -and + $_.PackageFormat -match "\.azl4\." + } + ).Count | Should -Be 0 + } + It "Should remove the Azure Linux 4 beta mappings" { @($mapping.Packages | Where-Object url -Like "azurelinux-4.0-beta-*").Count | Should -Be 0 } diff --git a/tools/packages.microsoft.com/mapping.json b/tools/packages.microsoft.com/mapping.json index 45d511a87b1..c4a654a8f60 100644 --- a/tools/packages.microsoft.com/mapping.json +++ b/tools/packages.microsoft.com/mapping.json @@ -60,22 +60,6 @@ "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.cm.x86_64.rpm", "channel": "preview" }, - { - "url": "azurelinux-4-preview-microsoft-x86_64", - "distribution": [ - "azl" - ], - "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.azl4.x86_64.rpm", - "channel": "preview" - }, - { - "url": "azurelinux-4-preview-microsoft-aarch64", - "distribution": [ - "azl" - ], - "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.azl4.aarch64.rpm", - "channel": "preview" - }, { "url": "azurelinux-4-prod-microsoft-x86_64", "distribution": [ From 609b8e61f2f088915e821dded9e42061ec39f150 Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:57:06 -0600 Subject: [PATCH 04/19] Install Az.Storage for release storage publishing jobs (#28323) Co-authored-by: Justin Chung --- .../templates/release-MakeBlobPublic.yml | 20 +++++++++++++++++++ .../templates/release-upload-buildinfo.yml | 10 ++++++++++ 2 files changed, 30 insertions(+) diff --git a/.pipelines/templates/release-MakeBlobPublic.yml b/.pipelines/templates/release-MakeBlobPublic.yml index 758298202a1..05bef2bac59 100644 --- a/.pipelines/templates/release-MakeBlobPublic.yml +++ b/.pipelines/templates/release-MakeBlobPublic.yml @@ -51,6 +51,14 @@ jobs: Get-ChildItem Env: displayName: 'Capture Environment Variables' + - pwsh: | + $repositoryName = 'PowerShellGalleryMirror' + if (-not (Get-PSRepository -Name $repositoryName -ErrorAction Ignore)) { + Register-PSRepository -Name $repositoryName -SourceLocation 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v2' -InstallationPolicy Trusted -ErrorAction Stop + } + Install-Module -Repository $repositoryName -Name Az.Storage -RequiredVersion 9.7.2 -Scope CurrentUser -Force -ErrorAction Stop + displayName: Install Az.Storage 9.7.2 + - task: AzurePowerShell@5 displayName: Copy blobs to PSInfra storage inputs: @@ -59,6 +67,8 @@ jobs: azurePowerShellVersion: LatestVersion pwsh: true inline: | + Import-Module Az.Storage -RequiredVersion 9.7.2 -ErrorAction Stop + $sourceStorageAccountName = '$(StorageAccount)' $destinationStorageAccountName = '$(PSInfraStorageAccount)' $destinationContainerName = '$web' @@ -137,6 +147,14 @@ jobs: Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose displayName: 'Capture Environment Variables' + - pwsh: | + $repositoryName = 'PowerShellGalleryMirror' + if (-not (Get-PSRepository -Name $repositoryName -ErrorAction Ignore)) { + Register-PSRepository -Name $repositoryName -SourceLocation 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v2' -InstallationPolicy Trusted -ErrorAction Stop + } + Install-Module -Repository $repositoryName -Name Az.Storage -RequiredVersion 9.7.2 -Scope CurrentUser -Force -ErrorAction Stop + displayName: Install Az.Storage 9.7.2 + - task: AzurePowerShell@5 displayName: Copy blobs to PSInfra storage inputs: @@ -145,6 +163,8 @@ jobs: azurePowerShellVersion: LatestVersion pwsh: true inline: | + Import-Module Az.Storage -RequiredVersion 9.7.2 -ErrorAction Stop + $sourceStorageAccountName = '$(StorageAccount)' $sourceContainerName = '$(AzureVersion)-nuget' $prefix = 'globaltool' diff --git a/.pipelines/templates/release-upload-buildinfo.yml b/.pipelines/templates/release-upload-buildinfo.yml index 9e3d6a6accb..3b6c09a47cd 100644 --- a/.pipelines/templates/release-upload-buildinfo.yml +++ b/.pipelines/templates/release-upload-buildinfo.yml @@ -116,6 +116,14 @@ jobs: } displayName: Create json files + - pwsh: | + $repositoryName = 'PowerShellGalleryMirror' + if (-not (Get-PSRepository -Name $repositoryName -ErrorAction Ignore)) { + Register-PSRepository -Name $repositoryName -SourceLocation 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v2' -InstallationPolicy Trusted -ErrorAction Stop + } + Install-Module -Repository $repositoryName -Name Az.Storage -RequiredVersion 9.7.2 -Scope CurrentUser -Force -ErrorAction Stop + displayName: Install Az.Storage 9.7.2 + - task: AzurePowerShell@5 displayName: Upload buildjson to blob inputs: @@ -124,6 +132,8 @@ jobs: azurePowerShellVersion: LatestVersion pwsh: true inline: | + Import-Module Az.Storage -RequiredVersion 9.7.2 -ErrorAction Stop + $containerName = '$web' $storageAccount = '$(PSInfraStorageAccount)' $prefix = "buildinfo" From ab8b508a46512e384a6b7e643a28700251a7deab Mon Sep 17 00:00:00 2001 From: Justin Chung <124807742+jshigetomi@users.noreply.github.com> Date: Wed, 4 Nov 2026 10:57:17 -0600 Subject: [PATCH 05/19] Exclude build intermediates from test packages (#28325) Co-authored-by: Justin Chung --- build.psm1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.psm1 b/build.psm1 index bcf625e681e..4e8bcd602db 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1676,6 +1676,10 @@ function Publish-PSTestTools { # Publish the Microsoft.PowerShell.NamedPipeConnection module Publish-CustomConnectionTestModule + + # Build intermediates are not needed to run tests and must not be included in test packages. + Get-ChildItem -Path "$PSScriptRoot/test" -Directory -Recurse -Filter 'obj' | + Remove-Item -Recurse -Force Write-LogGroupEnd -Title "Publish-PSTestTools" } From 3209d2a6449dccfe07a129fe2002a24498e6e053 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 4 Nov 2026 09:39:55 -0800 Subject: [PATCH 06/19] Fix the resource string `WeakCatalogHashAlgorithm` (#28322) --- src/System.Management.Automation/resources/CatalogStrings.resx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/resources/CatalogStrings.resx b/src/System.Management.Automation/resources/CatalogStrings.resx index 9abd76d6bc8..072ffeb7f1a 100644 --- a/src/System.Management.Automation/resources/CatalogStrings.resx +++ b/src/System.Management.Automation/resources/CatalogStrings.resx @@ -151,7 +151,8 @@ Catalog version is not valid. We only support catalog version {0} and version {1}. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Unable to open catalog definition file. From 4858ae2d9e81486a19036952862be4f7a23aba22 Mon Sep 17 00:00:00 2001 From: olprod Date: Wed, 4 Nov 2026 15:12:59 -0800 Subject: [PATCH 07/19] Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2794430 (#28309) --- .../resources/fr/AddTypeStrings.fr.resx | 2 +- .../resources/fr/Debugger.fr.resx | 2 +- .../fr/ImportLocalizedDataStrings.fr.resx | 2 +- .../resources/fr/NewObjectStrings.fr.resx | 4 +- .../resources/it/Debugger.it.resx | 2 +- .../it/ImportLocalizedDataStrings.it.resx | 2 +- .../resources/it/NewObjectStrings.it.resx | 8 +- .../zh-Hans/NewObjectStrings.zh-Hans.resx | 4 +- .../fr/ManagedEntranceStrings.fr.resx | 6 +- .../it/ManagedEntranceStrings.it.resx | 2 +- .../pt-BR/ManagedEntranceStrings.pt-BR.resx | 4 +- ...andLineParameterParserStrings.zh-Hant.resx | 2 +- .../resources/cs/CatalogStrings.cs.resx | 3 +- .../resources/de/CatalogStrings.de.resx | 3 +- .../resources/es/CatalogStrings.es.resx | 3 +- .../resources/es/EventResource.es.resx | 2 +- .../resources/es/Modules.es.resx | 2 +- .../es/RemotingErrorIdStrings.es.resx | 6 +- .../resources/es/RunspacePoolStrings.es.resx | 4 +- .../resources/es/RunspaceStrings.es.resx | 4 +- .../resources/fr/AutomationExceptions.fr.resx | 2 +- .../resources/fr/CatalogStrings.fr.resx | 3 +- .../resources/fr/CommandBaseStrings.fr.resx | 2 +- .../resources/fr/DiscoveryExceptions.fr.resx | 2 +- .../resources/fr/ExtendedTypeSystem.fr.resx | 2 +- .../fr/InternalCommandStrings.fr.resx | 4 +- .../resources/fr/Metadata.fr.resx | 2 +- .../resources/fr/Modules.fr.resx | 16 ++-- .../fr/ParameterBinderStrings.fr.resx | 4 +- .../resources/fr/ParserStrings.fr.resx | 76 +++++++++---------- .../fr/RemotingErrorIdStrings.fr.resx | 8 +- .../resources/fr/RunspacePoolStrings.fr.resx | 2 +- .../resources/fr/RunspaceStrings.fr.resx | 2 +- .../resources/it/AutomationExceptions.it.resx | 2 +- .../resources/it/CatalogStrings.it.resx | 3 +- .../resources/it/CommandBaseStrings.it.resx | 2 +- .../resources/it/DiscoveryExceptions.it.resx | 2 +- .../resources/it/ExtendedTypeSystem.it.resx | 4 +- .../it/InternalCommandStrings.it.resx | 6 +- .../resources/it/Metadata.it.resx | 2 +- .../resources/it/Modules.it.resx | 8 +- .../it/ParameterBinderStrings.it.resx | 4 +- .../resources/it/ParserStrings.it.resx | 76 +++++++++---------- .../it/RemotingErrorIdStrings.it.resx | 34 ++++----- .../resources/it/RunspaceStrings.it.resx | 2 +- .../resources/ja/CatalogStrings.ja.resx | 3 +- .../resources/ko/CatalogStrings.ko.resx | 3 +- .../resources/pl/CatalogStrings.pl.resx | 3 +- .../resources/pt-BR/CatalogStrings.pt-BR.resx | 3 +- .../resources/pt-BR/EventResource.pt-BR.resx | 2 +- .../resources/pt-BR/Modules.pt-BR.resx | 10 +-- .../resources/ru/CatalogStrings.ru.resx | 3 +- .../resources/tr/CatalogStrings.tr.resx | 3 +- .../tr/RemotingErrorIdStrings.tr.resx | 2 +- .../zh-Hans/CatalogStrings.zh-Hans.resx | 3 +- .../resources/zh-Hans/Modules.zh-Hans.resx | 6 +- .../zh-Hans/ParserStrings.zh-Hans.resx | 76 +++++++++---------- .../RemotingErrorIdStrings.zh-Hans.resx | 4 +- .../zh-Hans/SessionStateStrings.zh-Hans.resx | 2 +- .../zh-Hant/CatalogStrings.zh-Hant.resx | 3 +- .../resources/zh-Hant/Credential.zh-Hant.resx | 8 +- .../InternalCommandStrings.zh-Hant.resx | 2 +- .../zh-Hant/ParserStrings.zh-Hant.resx | 64 ++++++++-------- .../RemotingErrorIdStrings.zh-Hant.resx | 64 ++++++++-------- .../zh-Hant/RunspaceStrings.zh-Hant.resx | 2 +- 65 files changed, 308 insertions(+), 295 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/AddTypeStrings.fr.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/AddTypeStrings.fr.resx index 621a76cc8fa..85ad69912b5 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/AddTypeStrings.fr.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/AddTypeStrings.fr.resx @@ -142,7 +142,7 @@ Nous ne pouvons pas ajouter de type. Le paramètre OutputType nécessite que le paramètre OutputAssembly soit indiqué. - Nous ne pouvons pas ajouter de type. La définition de nouveaux types n’est pas prise en charge dans ce mode de langage. + Nous ne pouvons pas ajouter de type. La définition de nouveaux types n’est pas prise en charge dans ce mode langage. L’assembly de référence spécifié « {0} » est inutile et ignoré. diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/Debugger.fr.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/Debugger.fr.resx index e41e801baae..588129c6b70 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/Debugger.fr.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/Debugger.fr.resx @@ -133,7 +133,7 @@ Le débogage n’est pas pris en charge sur les sessions distantes. - Nous ne pouvons pas définir un point d’arrêt. Le mode de langage de cette session n’est pas compatible avec le mode de langage à l’échelle du système. + Nous ne pouvons pas définir un point d’arrêt. Le mode langage de cette session n’est pas compatible avec le mode langage à l’échelle du système. Nous ne pouvons pas définir des points d’arrêt dans la session à distance, car l’hôte actuel ne prend pas en charge le débogage distant. diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/ImportLocalizedDataStrings.fr.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/ImportLocalizedDataStrings.fr.resx index 08915a13229..40fe9020d0d 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/ImportLocalizedDataStrings.fr.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/ImportLocalizedDataStrings.fr.resx @@ -138,7 +138,7 @@ Impossible de trouver le fichier de données PowerShell «{0}» dans le répertoire «{1}» ou dans les répertoires de culture parent. - Impossible d’importer des données localisées. La définition de commandes supplémentaires prises en charge n’est pas autorisée dans ce mode de langage. + Impossible d’importer des données localisées. La définition de commandes supplémentaires prises en charge n’est pas autorisée dans ce mode langage. Le nom BindingVariable «{0}» n’est pas valide. diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/NewObjectStrings.fr.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/NewObjectStrings.fr.resx index eb932149c9f..e68523e507a 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/fr/NewObjectStrings.fr.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/fr/NewObjectStrings.fr.resx @@ -142,10 +142,10 @@ Nous ne pouvons pas créer des instances du type ByRef-like « {0} ». Les types ByRef-like ne sont pas pris en charge dans PowerShell. - Nous ne pouvons pas créer le type. Seuls les types principaux sont pris en charge dans ce mode de langage. + Nous ne pouvons pas créer le type. Seuls les types principaux sont pris en charge dans ce mode langage. - Nous ne pouvons pas créer le type. Seuls les types principaux sont pris en charge en mode langue {0} sur un ordinateur verrouillé par stratégie. + Nous ne pouvons pas créer le type. Seuls les types principaux sont pris en charge en mode langage {0} sur un ordinateur verrouillé par stratégie. Création d’un type avec l’applet de commande New-Object diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/it/Debugger.it.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/it/Debugger.it.resx index ab4292b7387..08a36ac54e4 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/it/Debugger.it.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/it/Debugger.it.resx @@ -133,7 +133,7 @@ Il debug non è supportato nelle sessioni remote. - Non è possibile impostare il punto di interruzione. La modalità linguaggio per questa sessione non è compatibile con la modalità linguaggio a livello di sistema. + Non è possibile impostare il punto di interruzione. La modalità di linguaggio per questa sessione non è compatibile con la modalità di linguaggio a livello di sistema. Impossibile impostare i punti di interruzione nella sessione remota perché il debug remoto non è supportato dall'host corrente. diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/it/ImportLocalizedDataStrings.it.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/it/ImportLocalizedDataStrings.it.resx index 8d778cae89c..be1a8501b02 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/it/ImportLocalizedDataStrings.it.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/it/ImportLocalizedDataStrings.it.resx @@ -138,7 +138,7 @@ Non è possibile trovare il file di dati di PowerShell '{0}' nella directory '{1}' o in alcuna directory delle impostazioni cultura padre. - Non è possibile importare dati localizzati. La definizione di comandi aggiuntivi supportati non è consentita in questa modalità del linguaggio. + Non è possibile importare dati localizzati. La definizione di comandi aggiuntivi supportati non è consentita in questa modalità di linguaggio. Il nome della BindingVariable '{0}' non è valido. diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/it/NewObjectStrings.it.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/it/NewObjectStrings.it.resx index 6c50ca091bc..0edacf544ed 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/it/NewObjectStrings.it.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/it/NewObjectStrings.it.resx @@ -142,21 +142,21 @@ Non è possibile creare istanze del tipo simile a ByRef "{0}". I tipi simili a ByRef non sono supportati in PowerShell. - Non è possibile creare il tipo. In questa modalità linguaggio sono supportati solo i tipi di base. + Non è possibile creare il tipo. In questa modalità di linguaggio sono supportati solo i tipi di base. - Non è possibile creare il tipo. Solo i tipi di base sono supportati in modalità lingua {0} in un computer con criteri bloccati. + Non è possibile creare il tipo. Solo i tipi di base sono supportati in modalità di linguaggio {0} in un computer con criteri bloccati. Creazione del tipo di cmdlet New-Object - Il tipo ''{0}'' non verrà creato in modalità ConstrainedLanguage. + Il tipo '{0}' non verrà creato in modalità ConstrainedLanguage. Creazione di oggetti COM cmdlet New-Object - L'oggetto COM ''{0}'' non verrà creato in modalità ConstrainedLanguage. + L'oggetto COM '{0}' non verrà creato in modalità ConstrainedLanguage. \ No newline at end of file diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/zh-Hans/NewObjectStrings.zh-Hans.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/zh-Hans/NewObjectStrings.zh-Hans.resx index 68032620ee5..5903e99392b 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/zh-Hans/NewObjectStrings.zh-Hans.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/zh-Hans/NewObjectStrings.zh-Hans.resx @@ -151,12 +151,12 @@ New-Object Cmdlet 类型创建 - ConstrainedLanguage 模式下不会创建类型 "{0}"。 + ConstrainedLanguage 模式下不会创建类型“{0}”。 New-Object cmdlet COM 对象创建 - ConstrainedLanguage 模式下不会创建 COM 对象 "{0}"。 + ConstrainedLanguage 模式下不会创建 COM 对象“{0}”。 \ No newline at end of file diff --git a/src/Microsoft.PowerShell.ConsoleHost/resources/fr/ManagedEntranceStrings.fr.resx b/src/Microsoft.PowerShell.ConsoleHost/resources/fr/ManagedEntranceStrings.fr.resx index 0ba4628fa2b..28ee3d782ef 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/resources/fr/ManagedEntranceStrings.fr.resx +++ b/src/Microsoft.PowerShell.ConsoleHost/resources/fr/ManagedEntranceStrings.fr.resx @@ -121,16 +121,16 @@ PowerShell {0} - [Mode de langue contrainte] + [Mode langage avec contraintes] [Mode AUDIT du langage contraint : Aucune restriction] - [Aucun mode de langue] + [Aucun mode langage] - [Mode de langage restreint] + [Mode langage restreint] Utilisation : pwsh[.exe] [-Login] [[-File] <filePath> [args]] diff --git a/src/Microsoft.PowerShell.ConsoleHost/resources/it/ManagedEntranceStrings.it.resx b/src/Microsoft.PowerShell.ConsoleHost/resources/it/ManagedEntranceStrings.it.resx index 55fcec735ba..cc25a0e7f39 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/resources/it/ManagedEntranceStrings.it.resx +++ b/src/Microsoft.PowerShell.ConsoleHost/resources/it/ManagedEntranceStrings.it.resx @@ -121,7 +121,7 @@ PowerShell {0} - [Modalità linguaggio con restrizioni] + [Modalità di linguaggio vincolato] [Modalità di controllo linguaggio con restrizioni: nessuna restrizione] diff --git a/src/Microsoft.PowerShell.ConsoleHost/resources/pt-BR/ManagedEntranceStrings.pt-BR.resx b/src/Microsoft.PowerShell.ConsoleHost/resources/pt-BR/ManagedEntranceStrings.pt-BR.resx index 788fc12c0ca..94b6291d36e 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/resources/pt-BR/ManagedEntranceStrings.pt-BR.resx +++ b/src/Microsoft.PowerShell.ConsoleHost/resources/pt-BR/ManagedEntranceStrings.pt-BR.resx @@ -127,10 +127,10 @@ [Modo de AUDITORIA de Linguagem Restrita: Sem Restrições] - [Modo sem Linguagem] + Sem [Modo de Linguagem] - [Modo de Linguagem Restrita] + [Modo de Linguagem Restrito] Uso: pwsh[.exe] [-Login] [[-File] <filePath> [args]] diff --git a/src/Microsoft.PowerShell.ConsoleHost/resources/zh-Hant/CommandLineParameterParserStrings.zh-Hant.resx b/src/Microsoft.PowerShell.ConsoleHost/resources/zh-Hant/CommandLineParameterParserStrings.zh-Hant.resx index b42950d38d3..04fea5b98f1 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/resources/zh-Hant/CommandLineParameterParserStrings.zh-Hant.resx +++ b/src/Microsoft.PowerShell.ConsoleHost/resources/zh-Hant/CommandLineParameterParserStrings.zh-Hant.resx @@ -187,7 +187,7 @@ 無法處理命令,因為 -ConfigurationName 需要一個為遠端端點設定名稱的引數。請指定此引數,然後再試一次。 - 無法處理命令,因為 -ConfigurationFile 需要一個為工作階段設定 (.pssc) 檔案路徑的引數。請指定此引數,然後再試一次。 + 無法處理命令,因為 -ConfigurationFile 需要一個為工作階段組態 (.pssc) 檔案路徑的引數。請指定此引數,然後再試一次。 無法處理命令,因為 -CustomPipeName 需要一個是您所想要使用之管道名稱的引數。請指定此引數,然後再試一次。 diff --git a/src/System.Management.Automation/resources/cs/CatalogStrings.cs.resx b/src/System.Management.Automation/resources/cs/CatalogStrings.cs.resx index f71f66f773b..99c1a6b37d3 100644 --- a/src/System.Management.Automation/resources/cs/CatalogStrings.cs.resx +++ b/src/System.Management.Automation/resources/cs/CatalogStrings.cs.resx @@ -151,7 +151,8 @@ Verze katalogu není platná. Podporujeme jen katalog verze {0} a verze {1}. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Soubor s definicí katalogu nejde otevřít. diff --git a/src/System.Management.Automation/resources/de/CatalogStrings.de.resx b/src/System.Management.Automation/resources/de/CatalogStrings.de.resx index 89625898f81..442d476123b 100644 --- a/src/System.Management.Automation/resources/de/CatalogStrings.de.resx +++ b/src/System.Management.Automation/resources/de/CatalogStrings.de.resx @@ -151,7 +151,8 @@ Die Katalogversion ist ungültig. Wir unterstützen nur die Katalogversion {0} und Version {1}. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Die Katalogdefinitionsdatei kann nicht geöffnet werden. diff --git a/src/System.Management.Automation/resources/es/CatalogStrings.es.resx b/src/System.Management.Automation/resources/es/CatalogStrings.es.resx index 9bdf0f89e25..4c8c383d347 100644 --- a/src/System.Management.Automation/resources/es/CatalogStrings.es.resx +++ b/src/System.Management.Automation/resources/es/CatalogStrings.es.resx @@ -151,7 +151,8 @@ La versión del catálogo no es válida. Solo se admite la versión del catálogo {0} y la versión {1}. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} No se puede abrir el archivo de definición del catálogo. diff --git a/src/System.Management.Automation/resources/es/EventResource.es.resx b/src/System.Management.Automation/resources/es/EventResource.es.resx index c497d164fff..34e2cd092d9 100644 --- a/src/System.Management.Automation/resources/es/EventResource.es.resx +++ b/src/System.Management.Automation/resources/es/EventResource.es.resx @@ -135,7 +135,7 @@ WorkflowId: {0} - Se creó un grupo de espacio de ejecución de flujo de trabajo. + Se creó un grupo de espacios de ejecución de flujo de trabajo. WorkflowId: {0} ManagedNode: {1} diff --git a/src/System.Management.Automation/resources/es/Modules.es.resx b/src/System.Management.Automation/resources/es/Modules.es.resx index 1970254de11..4f69163134d 100644 --- a/src/System.Management.Automation/resources/es/Modules.es.resx +++ b/src/System.Management.Automation/resources/es/Modules.es.resx @@ -679,7 +679,7 @@ Se bloqueará un nuevo módulo de una sesión de lenguaje restringido que no sea de confianza para que no proporcione el bloque de script FullLanguage. - "Modos de idioma no coincidentes del módulo + "Modos de lenguaje no coincidentes del módulo Se está cargando un módulo dependiente que tiene un modo de lenguaje diferente al primario. Esto no se permitirá cuando esté en modo de lenguaje restringido. diff --git a/src/System.Management.Automation/resources/es/RemotingErrorIdStrings.es.resx b/src/System.Management.Automation/resources/es/RemotingErrorIdStrings.es.resx index ddfdef76394..817662b8392 100644 --- a/src/System.Management.Automation/resources/es/RemotingErrorIdStrings.es.resx +++ b/src/System.Management.Automation/resources/es/RemotingErrorIdStrings.es.resx @@ -318,7 +318,7 @@ El servidor que ejecuta PowerShell no puede procesar la operación de conexión porque el servidor no se ha iniciado o se está cerrando. - El servidor que ejecuta PowerShell no puede procesar la operación de conexión porque las propiedades del grupo de espacio de ejecución del servidor no coincidían con las propiedades especificadas del equipo cliente. + El servidor que ejecuta PowerShell no puede procesar la operación de conexión porque las propiedades del grupo de espacios de ejecución del servidor no coincidían con las propiedades especificadas del equipo cliente. {0}. Error en la negociación con el cliente. Asegúrese de que el cliente es compatible con la compilación {1} y la versión {2} de protocolo de PowerShell. @@ -1342,10 +1342,10 @@ Todas las sesiones de WinRM conectadas a configuraciones de sesión de PowerShel PSSession {0} se creó con el parámetro EnableNetworkAccess y solo se puede volver a conectar desde el equipo local. - No se puede iniciar el trabajo. El modo de idioma de esta sesión no es compatible con el modo de idioma de todo el sistema. + No se puede iniciar el trabajo. El modo de lenguaje de esta sesión no es compatible con el modo de lenguaje de todo el sistema. - No se puede crear el espacio de ejecución. El modo de idioma para esta configuración no es compatible con el modo de idioma de todo el sistema. + No se puede crear el espacio de ejecución. El modo de lenguaje para esta configuración no es compatible con el modo de lenguaje de todo el sistema. No se puede salir de una canalización anidada porque la canalización no está en el estado anidado. diff --git a/src/System.Management.Automation/resources/es/RunspacePoolStrings.es.resx b/src/System.Management.Automation/resources/es/RunspacePoolStrings.es.resx index 0bb3a8c54ab..689bce353bb 100644 --- a/src/System.Management.Automation/resources/es/RunspacePoolStrings.es.resx +++ b/src/System.Management.Automation/resources/es/RunspacePoolStrings.es.resx @@ -130,7 +130,7 @@ El estado del grupo de espacios de ejecución no es válido para esta operación. - No se puede realizar la operación porque el grupo de espacio de ejecución no se encuentra en el estado "{0}". El estado actual es "{1}". + No se puede realizar la operación porque el grupo de espacios de ejecución no se encuentra en el estado "{0}". El estado actual es "{1}". No se puede abrir el grupo de espacios de ejecución porque no está en el estado "BeforeOpen". El estado actual es "{0}". @@ -148,7 +148,7 @@ Este espacio de ejecución no admite operaciones de desconexión y conexión. - No se puede realizar la operación porque el grupo de espacio de ejecución está en estado Desconectado. + No se puede realizar la operación porque el grupo de espacios de ejecución está en estado Desconectado. La operación Desconectar no se admite en el servidor. El servidor debe ejecutar PowerShell 3.0 o una versión posterior para admitir la desconexión del grupo de espacios de ejecución remoto. diff --git a/src/System.Management.Automation/resources/es/RunspaceStrings.es.resx b/src/System.Management.Automation/resources/es/RunspaceStrings.es.resx index d2ca017ecec..1ec2467151b 100644 --- a/src/System.Management.Automation/resources/es/RunspaceStrings.es.resx +++ b/src/System.Management.Automation/resources/es/RunspaceStrings.es.resx @@ -172,7 +172,7 @@ Las opciones de subproceso solo se pueden cambiar si el estado del contenedor es contenedor multiproceso (MTA), las opciones actuales son UseNewThread o UseCurrentThread y el nuevo valor es ReuseThread. - {0} no puede ser false cuando el modo de idioma es {1} o {2}. + {0} no puede ser false cuando el modo de lenguaje es {1} o {2}. No se puede desconectar un espacio de ejecución solo local. @@ -184,7 +184,7 @@ La sesión está ocupada. Se conectará a la sesión en cuanto esté disponible. Para cancelar el comando Enter-PSSession, presione Ctrl-C. - El comando no se ha podido completar. No se admite la invocación de scripts en esta configuración de sesión. Esto puede ocurrir si la configuración de sesión está en modo sin idioma. + El comando no se ha podido completar. No se admite la invocación de scripts en esta configuración de sesión. Esto puede ocurrir si la configuración de sesión está en modo sin lenguaje. No puede usar las operaciones Disconnect y Connect en espacios de ejecución locales. diff --git a/src/System.Management.Automation/resources/fr/AutomationExceptions.fr.resx b/src/System.Management.Automation/resources/fr/AutomationExceptions.fr.resx index 4799a780b5e..1800d15f53b 100644 --- a/src/System.Management.Automation/resources/fr/AutomationExceptions.fr.resx +++ b/src/System.Management.Automation/resources/fr/AutomationExceptions.fr.resx @@ -205,6 +205,6 @@ Source point de bloc de script compilée - L’appel du bloc de script «{0}» dans l’étendue actuelle ne sera pas autorisé en mode langue contrainte. Mode de langage de script : {1}, mode de langage de contexte : {2}. + L’appel du bloc de script «{0}» dans l’étendue actuelle ne sera pas autorisé en mode langage avec contraintes. Mode langage de script : {1}, mode langage de contexte : {2}. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/fr/CatalogStrings.fr.resx b/src/System.Management.Automation/resources/fr/CatalogStrings.fr.resx index 8e07cfedfb5..965e39df15e 100644 --- a/src/System.Management.Automation/resources/fr/CatalogStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/CatalogStrings.fr.resx @@ -151,7 +151,8 @@ La version de catalogue n’est pas valide. Nous prenons uniquement en charge la version {0} et la version {1} du catalogue. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Nous ne pouvons pas ouvrir le fichier de définition de catalogue. diff --git a/src/System.Management.Automation/resources/fr/CommandBaseStrings.fr.resx b/src/System.Management.Automation/resources/fr/CommandBaseStrings.fr.resx index cd7b81a21dd..7952f1f0ec0 100644 --- a/src/System.Management.Automation/resources/fr/CommandBaseStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/CommandBaseStrings.fr.resx @@ -232,7 +232,7 @@ Reviewed by TArcher on 2010-07-20 Vérification du dot-sourcing des blocs de script - Le traitement Dot-Source du bloc de script « {0} » échouera en mode de langage contraint, car son mode de langage « {1} » ne correspond pas au mode de langage actuel « {2} ». + Le traitement Dot-Source du bloc de script « {0} » échouera en mode langage avec contraintes, car son mode langage « {1} » ne correspond pas au mode langage actuel « {2} ». Outil de recherche de commandes diff --git a/src/System.Management.Automation/resources/fr/DiscoveryExceptions.fr.resx b/src/System.Management.Automation/resources/fr/DiscoveryExceptions.fr.resx index 0dafcb78fe9..f138cb62aa1 100644 --- a/src/System.Management.Automation/resources/fr/DiscoveryExceptions.fr.resx +++ b/src/System.Management.Automation/resources/fr/DiscoveryExceptions.fr.resx @@ -217,7 +217,7 @@ Pour plus d’informations, exécutez « Import-Module {1} ». Aucune commande correspondante n’inclut un paramètre nommé « {0} ». Vérifiez l’orthographe du nom du paramètre, puis réessayez. - Nous ne pouvons pas effectuer un dot-source sur cette commande, car elle a été définie dans un autre mode de langage. Pour appeler cette commande sans importer son contenu, omettez l’opérateur '.'. + Nous ne pouvons pas effectuer un dot-source sur cette commande, car elle a été définie dans un autre mode langage. Pour appeler cette commande sans importer son contenu, omettez l’opérateur '.'. Les paramètres ShowCommandInfo et Syntax ne peuvent pas être spécifiés ensemble. diff --git a/src/System.Management.Automation/resources/fr/ExtendedTypeSystem.fr.resx b/src/System.Management.Automation/resources/fr/ExtendedTypeSystem.fr.resx index 2cd620ef1b9..55064e4d992 100644 --- a/src/System.Management.Automation/resources/fr/ExtendedTypeSystem.fr.resx +++ b/src/System.Management.Automation/resources/fr/ExtendedTypeSystem.fr.resx @@ -377,7 +377,7 @@ PS> [System.Collections.Generic.Comparer``1]::get_Default() La valeur « {0} » ne peut pas être convertie en tableau de chaînes. - Impossible de convertir la valeur en type « {0} ». Seuls les types principaux sont pris en charge dans ce mode de langage. + Impossible de convertir la valeur en type « {0} ». Seuls les types principaux sont pris en charge dans ce mode langage. Impossible de convertir en type ByRef-like « {0} ». Les types similaires à ByRef ne sont pas pris en charge dans PowerShell. diff --git a/src/System.Management.Automation/resources/fr/InternalCommandStrings.fr.resx b/src/System.Management.Automation/resources/fr/InternalCommandStrings.fr.resx index e32d59813bb..b89c98b093f 100644 --- a/src/System.Management.Automation/resources/fr/InternalCommandStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/InternalCommandStrings.fr.resx @@ -145,7 +145,7 @@ Le nom d’entrée « {0} » ne peut pas être résolu en méthode. - Nous ne pouvons pas appeler une méthode en mode de langage restreint. + Nous ne pouvons pas appeler une méthode en mode langage restreint. Les paramètres -WhatIf et -Confirm ne sont pas pris en charge pour les blocs de script. @@ -188,6 +188,6 @@ ErrorAction, WarningAction, InformationAction, PipelineVariable Cmdlet ForEach-Object - L’appel de méthode sur le type « {0} » ne sera pas autorisé lors de l’exécution en mode de langage contraint. + L’appel de méthode sur le type « {0} » ne sera pas autorisé lors de l’exécution en mode langage avec contraintes. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/fr/Metadata.fr.resx b/src/System.Management.Automation/resources/fr/Metadata.fr.resx index f7e2c7fc1c1..38a3d01493c 100644 --- a/src/System.Management.Automation/resources/fr/Metadata.fr.resx +++ b/src/System.Management.Automation/resources/fr/Metadata.fr.resx @@ -262,6 +262,6 @@ Échec de la vérification d’attribut ValidateTrustedData - L’argument de paramètre «{0}» n’est pas approuvé et échoue à la vérification de l’attribut de paramètre ValidateTrustedData en mode langue contrainte. + L’argument de paramètre «{0}» n’est pas approuvé et échoue à la vérification de l’attribut de paramètre ValidateTrustedData en mode langage avec contraintes. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/fr/Modules.fr.resx b/src/System.Management.Automation/resources/fr/Modules.fr.resx index ed6b95bdb54..837110833f5 100644 --- a/src/System.Management.Automation/resources/fr/Modules.fr.resx +++ b/src/System.Management.Automation/resources/fr/Modules.fr.resx @@ -628,13 +628,13 @@ L’importation de fichiers *.ps1 en tant que modules n’est pas autorisée en mode ConstrainedLanguage. - Une erreur s’est produite lors du chargement du module de script {0}, car son mode de langage est différent de celui du manifeste du module. Le mode de langage du manifeste est {1} et le mode de langage du module est {2}. Vérifiez que tous les fichiers du module sont signés ou qu’ils font partie de la configuration de la liste d’autorisation de votre application. + Une erreur s’est produite lors du chargement du module de script {0}, car son mode langage est différent de celui du manifeste du module. Le mode langage du manifeste est {1} et le mode langage du module est {2}. Vérifiez que tous les fichiers du module sont signés ou qu’ils font partie de la configuration de la liste d’autorisation de votre application. Ce module utilise l’opérateur dot-source lors de l’exportation de fonctions à l’aide de caractères génériques, ce qui n’est pas autorisé lorsque le système est soumis à obligation de vérification des applications. - Impossible d’exporter des membres de module à partir d’un module dont le mode de langage est différent de celui de la session en cours. + Impossible d’exporter des membres de module à partir d’un module dont le mode langage est différent de celui de la session en cours. Impossible de créer un nouveau module tant que la session est en mode ConstrainedLanguage. @@ -646,13 +646,13 @@ Cmdlet Export-ModuleMember - L’exportation des membres du module échouera en mode de langage contraint, car le module « {0} » a un mode de langage « {1} » différent du mode de la session actuelle « {2} ». + L’exportation des membres du module échouera en mode langage avec contraintes, car le module « {0} » a un mode langage « {1} » différent du mode de la session actuelle « {2} ». Exportation implicite des fonctions du module - L’exportation implicite de fonctions pour le module « {0} » sera refusée, car il est approuvé (il s’exécute en mode de langage complet), mais la session ne l’est pas (elle s’exécute en mode de langage contraint). Il est recommandé d’exporter systématiquement les fonctions du module individuellement, avec leur nom complet. + L’exportation implicite de fonctions pour le module « {0} » sera refusée, car il est approuvé (il s’exécute en mode langage complet), mais la session ne l’est pas (elle s’exécute en mode langage avec contraintes). Il est recommandé d’exporter systématiquement les fonctions du module individuellement, avec leur nom complet. Importation du fichier de script en tant que module @@ -664,13 +664,13 @@ Le module contient un opérateur Dot-Source - L’importation du module « {0} » échouera en mode de langage contraint, car il exporte des fonctions à l’aide de caractères génériques tout en utilisant l’opérateur dot-source. + L’importation du module « {0} » échouera en mode langage avec contraintes, car il exporte des fonctions à l’aide de caractères génériques tout en utilisant l’opérateur dot-source. « Fonctions d’exportation de module - Le module « {0} » exporte des fonctions à l’aide de caractères génériques dans le nom. Tous les noms de fonctions des modules imbriqués seront supprimés lors de l’exécution en mode de langage contraint. + Le module « {0} » exporte des fonctions à l’aide de caractères génériques dans le nom. Tous les noms de fonctions des modules imbriqués seront supprimés lors de l’exécution en mode langage avec contraintes. «Cmdlet New-Module @@ -679,9 +679,9 @@ Un nouveau module provenant d’une session de langage contraint non approuvée sera empêché de fournir le bloc de script FullLanguage. - « Modes de langage incompatibles avec les modules + « Modes langage incompatibles avec les modules - Un module dépendant est en cours de chargement avec un mode de langue différent de celui du module parent. Cela ne sera pas autorisé en mode de langage contraint. + Un module dépendant est en cours de chargement avec un mode langage différent de celui du module parent. Cela ne sera pas autorisé en mode langage avec contraintes. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/fr/ParameterBinderStrings.fr.resx b/src/System.Management.Automation/resources/fr/ParameterBinderStrings.fr.resx index 8426323ccfa..89ce3d5c998 100644 --- a/src/System.Management.Automation/resources/fr/ParameterBinderStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/ParameterBinderStrings.fr.resx @@ -250,12 +250,12 @@ Appel de méthode ou de propriété non autorisé - L’appel d’une méthode ou d’une propriété « {0} » sur le type « {1} » n’est pas autorisé en mode de langage contraint pour les scripts non approuvés. + L’appel d’une méthode ou d’une propriété « {0} » sur le type « {1} » n’est pas autorisé en mode langage avec contraintes pour les scripts non approuvés. Création de type non autorisée - La création du type « {0} » n’est pas autorisée lors de la liaison de paramètres en mode de langage contraint pour les scripts non approuvés. + La création du type « {0} » n’est pas autorisée lors de la liaison de paramètres en mode langage avec contraintes pour les scripts non approuvés. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/fr/ParserStrings.fr.resx b/src/System.Management.Automation/resources/fr/ParserStrings.fr.resx index a2418a21064..7be539310b7 100644 --- a/src/System.Management.Automation/resources/fr/ParserStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/ParserStrings.fr.resx @@ -586,64 +586,64 @@ La forme correcte est : foreach ($a in $b) {...} Le paramètre « {0} » de la section de données n’est pas valide. Le paramètre valide pour la section de données est SupportedCommand. - Les références de tableau ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les références de tableau ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les instructions d’affectation ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les instructions d’affectation ne sont pas autorisées en mode langage restreint ou dans une section de données. - La redirection n’est pas autorisée en mode de langage restreint ou dans une section de données. + La redirection n’est pas autorisée en mode langage restreint ou dans une section de données. - Les instructions Do et While ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les instructions Do et While ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les chaînes extensibles ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les chaînes extensibles ne sont pas autorisées en mode langage restreint ou dans une section de données. - L’opérateur « {0} » n’est pas autorisé en mode de langage restreint ou dans une section de données. + L’opérateur « {0} » n’est pas autorisé en mode langage restreint ou dans une section de données. - L’instruction Trap n’est pas autorisée en mode de langage restreint ou dans une section de données. + L’instruction Trap n’est pas autorisée en mode langage restreint ou dans une section de données. - L’instruction Try n’est pas autorisée en mode de langage restreint ou dans une section de données. + L’instruction Try n’est pas autorisée en mode langage restreint ou dans une section de données. - Les instructions de contrôle de flux telles que Break, Continue, Return, Exit et Throw ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les instructions de contrôle de flux telles que Break, Continue, Return, Exit et Throw ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les instructions foreach ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les instructions foreach ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les instructions For et While ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les instructions For et While ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les déclarations de fonctions ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les déclarations de fonctions ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les appels de méthode ne sont pas autorisés en mode de langage restreint ou dans une section de données. + Les appels de méthode ne sont pas autorisés en mode langage restreint ou dans une section de données. - Les déclarations de paramètres ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les déclarations de paramètres ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les références de propriété ne sont pas autorisées en mode de langage restreint ou dans une section de données. + Les références de propriété ne sont pas autorisées en mode langage restreint ou dans une section de données. - Les littéraux de bloc de script ne sont pas autorisés en mode de langage restreint ou dans une section de données. + Les littéraux de bloc de script ne sont pas autorisés en mode langage restreint ou dans une section de données. - L’instruction switch n’est pas autorisée en mode de langage restreint ou dans une section de données. + L’instruction switch n’est pas autorisée en mode langage restreint ou dans une section de données. - Une variable qui ne peut pas être référencée en mode de langage restreint ou dans une section de données est en cours de référencement. Les variables qui peuvent être référencées sont les suivantes : {0}. + Une variable qui ne peut pas être référencée en mode langage restreint ou dans une section de données est en cours de référencement. Les variables qui peuvent être référencées sont les suivantes : {0}. - La commande « {0} » n’est pas autorisée en mode de langage restreint ou dans une section de données. + La commande « {0} » n’est pas autorisée en mode langage restreint ou dans une section de données. - L’instruction data n’est pas autorisée en mode de langage restreint ou dans une autre section de données. + L’instruction data n’est pas autorisée en mode langage restreint ou dans une autre section de données. Une valeur manque dans le paramètre SupportedCommand de la section de données. Fournissez une cmdlet ou un nom de fonction pour ce paramètre. @@ -652,13 +652,13 @@ La forme correcte est : foreach ($a in $b) {...} Les blocs d’instructions Begin, les blocs d’instructions Process ou les instructions parameter ne sont pas autorisés dans une section de données. - Les résultats de multiplication de chaînes comportant plus de « {0} » caractères ne sont pas autorisés en mode de langage restreint ou dans une section Data. + Les résultats de multiplication de chaînes comportant plus de « {0} » caractères ne sont pas autorisés en mode langage restreint ou dans une section de données. - La multiplication de tableaux aboutissant à plus de {0} éléments n’est pas autorisée en mode de langage restreint ou dans une section de données. + La multiplication de tableaux aboutissant à plus de {0} éléments n’est pas autorisée en mode langage restreint ou dans une section de données. - Le sourçage de données n’est pas autorisé en mode de langage restreint ou dans une section de données. + Le sourçage de données n’est pas autorisé en mode langage restreint ou dans une section de données. L’argument d’attribut doit être une constante ou un bloc de script. @@ -721,10 +721,10 @@ La forme correcte est : foreach ($a in $b) {...} Les clés nulles ne sont pas autorisées dans un littéral de hachage. - Les attributs ne sont pas autorisés en mode de langage restreint ou dans une section de données. + Les attributs ne sont pas autorisés en mode langage restreint ou dans une section de données. - Le type {0} n’est pas autorisée en mode de langage restreint ou dans une section de données. + Le type {0} n’est pas autorisée en mode langage restreint ou dans une section de données. « {0} » est une propriété ReadOnly. @@ -784,7 +784,7 @@ La forme correcte est : foreach ($a in $b) {...} Corps de l’instruction manquant après le mot clé « {0} ». - Les blocs parallèles et séquentiels ne sont pas autorisés en mode de langage restreint ni dans une section de données. + Les blocs parallèles et séquentiels ne sont pas autorisés en mode langage restreint ni dans une section de données. Mot-clé inattendu « {0} ». @@ -796,7 +796,7 @@ La forme correcte est : foreach ($a in $b) {...} Impossible d’appeler la méthode. - Impossible de convertir la table de hachage en objet du type suivant : {0}. La conversion d’une table de hachage en objet n’est pas prise en charge en mode de langage restreint ou dans une section de données. + Impossible de convertir la table de hachage en objet du type suivant : {0}. La conversion d’une table de hachage en objet n’est pas prise en charge en mode langage restreint ou dans une section de données. L’argument doit être constant. @@ -820,10 +820,10 @@ La forme correcte est : foreach ($a in $b) {...} Les caractères génériques ne sont pas pris en charge pour les noms de modules. - Impossible d’appeler la méthode. L’appel de méthode est pris en charge uniquement sur les types principaux dans ce mode de langage. + Impossible d’appeler la méthode. L’appel de méthode est pris en charge uniquement sur les types principaux dans ce mode langage. - Impossible de définir la propriété. La définition de propriété est prise en charge uniquement sur les types principaux dans ce mode de langage. + Impossible de définir la propriété. La définition de propriété est prise en charge uniquement sur les types principaux dans ce mode langage. Un nom d’attribut non valide a été trouvé pour la ressource « {0} ». Un nom d’attribut doit être une chaîne simple et ne peut pas contenir de variables ou d’expressions. Remplacez « {1} » par une chaîne simple. @@ -842,7 +842,7 @@ La forme correcte est : foreach ($a in $b) {...} Le fichier de schéma {0} n’a pas été trouvé. Vérifiez que tous les modules spécifiés dans une instruction de configuration contiennent un fichier schema.mof, puis réessayez d’exécuter le script. - Impossible de définir la section de données. La définition de commandes supplémentaires prises en charge n’est pas prise en charge dans ce mode de langage. + Impossible de définir la section de données. La définition de commandes supplémentaires prises en charge n’est pas prise en charge dans ce mode langage. Accolade ouvrante « { » manquante dans l’instruction configuration. @@ -935,7 +935,7 @@ ModuleVersion : version du module à importer. En cas d’utilisation, ModuleNa Impossible de charger la ressource « {0} » : ressource introuvable. - Le mot clé Configuration n’est pas autorisé en mode constrainedLanguage. + Le mot clé Configuration n’est pas autorisé en mode ConstrainedLanguage. Le nom de configuration « {0} » n’est pas valide. Les noms standard ne peuvent contenir que des lettres (a-z, A-Z), des chiffres (0-9), des points (.), des traits d’union (-) et des traits de soulignement (_). Le nom ne peut pas être nul ou vide et doit commencer par une lettre. @@ -1293,7 +1293,7 @@ ModuleVersion : version du module à importer. En cas d’utilisation, ModuleNa La configuration partielle PartialConfiguration « {0} » a un mode d’actualisation défini sur Désactivé, ce qui n’est pas un mode valide pour les configurations partielles. Utilisez le mode d’actualisation Pull ou Push. - Nous ne pouvons pas créer le type. Seuls les types principaux sont pris en charge dans ce mode de langage. + Nous ne pouvons pas créer le type. Seuls les types principaux sont pris en charge dans ce mode langage. Import-DscResource ne peut pas être spécifié dans le contexte Node @@ -1338,37 +1338,37 @@ ModuleVersion : version du module à importer. En cas d’utilisation, ModuleNa Mot clé Configuration de l’analyseur - Le mot clé Configuration ne sera pas autorisé en mode de langage contraint pour un script non approuvé. + Le mot clé Configuration ne sera pas autorisé en mode langage avec contraintes pour un script non approuvé. Mot clé Class (classe) de l’analyseur - Le mot clé Class ne sera pas autorisé en mode de langage contraint pour un script non approuvé. + Le mot clé Class ne sera pas autorisé en mode langage avec contraintes pour un script non approuvé. Paramètre SupportedCommand de la section de données de l’analyseur - La section de données qui inclut le paramètre SupportedCommand est interdite en mode de langage contraint pour un script non approuvé. + La section de données qui inclut le paramètre SupportedCommand est interdite en mode langage avec contraintes pour un script non approuvé. Opérateur d’appel d’étendue du module - L’opérateur d’appel d’étendue du module sera refusé en mode de langage contraint. + L’opérateur d’appel d’étendue du module sera refusé en mode langage avec contraintes. Appel de méthode du mot clé ForEach - Le mot clé ForEach entraîne l’échec de l’appel de méthode de l’élément d’itération « {0} » lorsqu’il est exécuté en mode de langage contraint. + Le mot clé ForEach entraîne l’échec de l’appel de méthode de l’élément d’itération « {0} » lorsqu’il est exécuté en mode langage avec contraintes. L’évaluation de l’expression peut échouer - La création d’un pipeline pas à pas depuis un bloc de script peut nécessiter l’évaluation de certaines expressions dans le bloc de script. L’évaluation de l’expression échouera silencieusement et renverra « null » en mode de langage contraint, sauf si l’expression représente une valeur constante. + La création d’un pipeline pas à pas depuis un bloc de script peut nécessiter l’évaluation de certaines expressions dans le bloc de script. L’évaluation de l’expression échouera silencieusement et renverra « null » en mode langage avec contraintes, sauf si l’expression représente une valeur constante. Le mot clé Configuration n’est pas pris en charge sur les processeurs ARM64. diff --git a/src/System.Management.Automation/resources/fr/RemotingErrorIdStrings.fr.resx b/src/System.Management.Automation/resources/fr/RemotingErrorIdStrings.fr.resx index 5ee337f3a24..811f3783ec1 100644 --- a/src/System.Management.Automation/resources/fr/RemotingErrorIdStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/RemotingErrorIdStrings.fr.resx @@ -1021,7 +1021,7 @@ Toutes les sessions WinRM connectées à des configurations de session PowerShel Indique s’il faut exécuter cette configuration de session en tant que compte d’administrateur (virtuel) de l’ordinateur - Mode de langue à appliquer lorsqu’il est appliqué à une session. Peut être « NoLanguage » (recommandé), « RestrictedLanguage », « ConstrainedLanguage » ou « FullLanguage » + Mode langage à appliquer lorsqu’il est appliqué à une session. Peut être « NoLanguage » (recommandé), « RestrictedLanguage », « ConstrainedLanguage » ou « FullLanguage » Modules à importer lorsqu’ils sont appliqués à une session @@ -1342,10 +1342,10 @@ Toutes les sessions WinRM connectées à des configurations de session PowerShel PSSession {0} a été créé à l’aide du paramètre EnableNetworkAccess et ne peut être reconnecté qu’à partir de l’ordinateur local. - Impossible de démarrer le travail. Le mode de langage de cette session n’est pas compatible avec le mode de langage à l’échelle du système. + Impossible de démarrer le travail. Le mode langage de cette session n’est pas compatible avec le mode langage à l’échelle du système. - Impossible de créer un espace d'exécution. Le mode de langue de cette configuration n’est pas compatible avec le mode de langue à l’échelle du système. + Impossible de créer un espace d'exécution. Le mode langage de cette configuration n’est pas compatible avec le mode langage à l’échelle du système. Impossible de quitter un pipeline imbriqué, car le pipeline n’est pas dans l’état imbriqué. @@ -1721,7 +1721,7 @@ Le processus client SSH s’est arrêté avant que la connexion puisse être ét L’évaluation de l’expression peut échouer - La création d’un objet PowerShell à partir d’un bloc de script peut nécessiter l’évaluation de certaines expressions dans le bloc de script. L'évaluation de l'expression échouera silencieusement et renverra « null » en mode de langage restreint (Constrained Language mode), à ​​moins que l'expression ne représente une valeur constante. + La création d’un objet PowerShell à partir d’un bloc de script peut nécessiter l’évaluation de certaines expressions dans le bloc de script. L'évaluation de l'expression échouera silencieusement et renverra « null » en mode langage avec contraintes, à ​​moins que l'expression ne représente une valeur constante. Échec de l’obtention de l’état de la machine virtuelle Hyper-V. La valeur était de type {0}, mais était censée être Microsoft.HyperV.PowerShell.VMState ou System.String. diff --git a/src/System.Management.Automation/resources/fr/RunspacePoolStrings.fr.resx b/src/System.Management.Automation/resources/fr/RunspacePoolStrings.fr.resx index 54b00712c8b..95ba28c7420 100644 --- a/src/System.Management.Automation/resources/fr/RunspacePoolStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/RunspacePoolStrings.fr.resx @@ -154,7 +154,7 @@ L’opération de déconnexion n’est pas prise en charge sur le serveur. Le serveur doit exécuter PowerShell 3.0 ou une version ultérieure pour prendre en charge la déconnexion du pool d’instances d’exécution distantes. - Ce pool d’espaces d’exécution {0} n’est pas configuré pour fournir des objets PowerShell déconnectés pour les commandes exécutées sur le serveur distant. Utilisez la méthode statique GetRunspacePools() de la classe RunspacePool pour interroger le serveur et renvoyer les objets de pool d’espaces d’exécution configurés à cet effet. + Ce pool d’instances d’exécution {0} n’est pas configuré pour fournir des objets PowerShell déconnectés pour les commandes exécutées sur le serveur distant. Utilisez la méthode statique GetRunspacePools() de la classe RunspacePool pour interroger le serveur et renvoyer les objets de pool d’instances d’exécution configurés à cet effet. Nous ne pouvons pas vous connecter ce pool d’instances d’exécution, car le pool d’instances d’exécution correspondant côté serveur est connecté à un autre client. diff --git a/src/System.Management.Automation/resources/fr/RunspaceStrings.fr.resx b/src/System.Management.Automation/resources/fr/RunspaceStrings.fr.resx index 05d20237e44..52f90b847e6 100644 --- a/src/System.Management.Automation/resources/fr/RunspaceStrings.fr.resx +++ b/src/System.Management.Automation/resources/fr/RunspaceStrings.fr.resx @@ -172,7 +172,7 @@ Les options de thread ne peuvent être modifiées que si l’état de cloisonnement est MTA (Multithreaded Apartment), si les options actuelles sont UseNewThread ou UseCurrentThread, et si la nouvelle valeur est ReuseThread. - {0} ne peut pas avoir la valeur false lorsque le mode de langage est {1} ou {2}. + {0} ne peut pas avoir la valeur false lorsque le mode langage est {1} ou {2}. Vous ne pouvez pas déconnecter un espace d’exécution local uniquement. diff --git a/src/System.Management.Automation/resources/it/AutomationExceptions.it.resx b/src/System.Management.Automation/resources/it/AutomationExceptions.it.resx index 01228164374..5191480234b 100644 --- a/src/System.Management.Automation/resources/it/AutomationExceptions.it.resx +++ b/src/System.Management.Automation/resources/it/AutomationExceptions.it.resx @@ -205,6 +205,6 @@ Dot sourcing del blocco di script compilato - La chiamata del blocco di script "{0}" nell'ambito corrente non sarà consentita in modalità Linguaggio con restrizioni. Modalità linguaggio script: {1}, modalità linguaggio contesto: {2}. + La chiamata del blocco di script '{0}' nell'ambito corrente non sarà consentita in modalità di linguaggio vincolato. Modalità di linguaggio script: {1}, modalità di linguaggio contesto: {2}. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/it/CatalogStrings.it.resx b/src/System.Management.Automation/resources/it/CatalogStrings.it.resx index a9c8164b7b9..4a0998577ac 100644 --- a/src/System.Management.Automation/resources/it/CatalogStrings.it.resx +++ b/src/System.Management.Automation/resources/it/CatalogStrings.it.resx @@ -151,7 +151,8 @@ La versione del catalogo non è valida. Sono supportate solo le versioni {0} e {1} del catalogo. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Impossibile aprire il file di definizione del catalogo. diff --git a/src/System.Management.Automation/resources/it/CommandBaseStrings.it.resx b/src/System.Management.Automation/resources/it/CommandBaseStrings.it.resx index cafc980a21e..2d1e1707498 100644 --- a/src/System.Management.Automation/resources/it/CommandBaseStrings.it.resx +++ b/src/System.Management.Automation/resources/it/CommandBaseStrings.it.resx @@ -232,7 +232,7 @@ Reviewed by TArcher on 2010-07-20 Controllo Dot-Source per elaborazione blocco script - L'elaborazione Dot-Source per il blocco di script '{0}' non riuscirà in modalità linguaggio con restrizioni perché la relativa modalità linguaggio '{1}' non corrisponde alla modalità linguaggio corrente '{2}'. + L'elaborazione Dot-Source per il blocco di script '{0}' avrà esito negativo in modalità di linguaggio vincolato perché la relativa modalità di linguaggio '{1}' non corrisponde alla modalità di linguaggio corrente '{2}'. Strumento di ricerca comandi diff --git a/src/System.Management.Automation/resources/it/DiscoveryExceptions.it.resx b/src/System.Management.Automation/resources/it/DiscoveryExceptions.it.resx index d49de865de2..4d1dc325fd6 100644 --- a/src/System.Management.Automation/resources/it/DiscoveryExceptions.it.resx +++ b/src/System.Management.Automation/resources/it/DiscoveryExceptions.it.resx @@ -217,7 +217,7 @@ Per altre informazioni, eseguire 'Import-Module {1}'. Nessun comando corrispondente include un parametro denominato '{0}'. Controllare l'ortografia del nome del parametro, quindi riprovare. - Non è possibile eseguire il comando con dot-sourcing perché è stato definito in una modalità linguaggio diversa. Per richiamare questo comando senza importarne il contenuto, omettere l'operatore '.'. + Non è possibile eseguire il comando dot-source perché è stato definito in una modalità di linguaggio diversa. Per richiamare questo comando senza importarne il contenuto, omettere l'operatore '.'. I parametri ShowCommandInfo e Syntax non possono essere specificati insieme. diff --git a/src/System.Management.Automation/resources/it/ExtendedTypeSystem.it.resx b/src/System.Management.Automation/resources/it/ExtendedTypeSystem.it.resx index 2536a63b1cc..877f2ff846b 100644 --- a/src/System.Management.Automation/resources/it/ExtendedTypeSystem.it.resx +++ b/src/System.Management.Automation/resources/it/ExtendedTypeSystem.it.resx @@ -377,7 +377,7 @@ PS> [System.Collections.Generic.Comparer``1]::get_Default() Non è possibile convertire il valore "{0}" in un array stringa. - Non è possibile convertire il valore nel tipo "{0}". In questa modalità linguaggio sono supportati solo i tipi di base. + Non è possibile convertire il valore nel tipo "{0}". In questa modalità di linguaggio sono supportati solo i tipi di base. Non è possibile eseguire la conversione nel tipo simile a ByRef "{0}". I tipi simili a ByRef non sono supportati in PowerShell. @@ -401,6 +401,6 @@ PS> [System.Collections.Generic.Comparer``1]::get_Default() Conversione della tabella hash del sistema di tipi estesi - La conversione del tipo da '{0}' a '{1}' non sarà consentita in modalità ConstrainedLanguage. + La conversione del tipo da '{0}' in '{1}' non sarà consentita in modalità ConstrainedLanguage. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/it/InternalCommandStrings.it.resx b/src/System.Management.Automation/resources/it/InternalCommandStrings.it.resx index c80da393ec7..0cc185f2eba 100644 --- a/src/System.Management.Automation/resources/it/InternalCommandStrings.it.resx +++ b/src/System.Management.Automation/resources/it/InternalCommandStrings.it.resx @@ -145,13 +145,13 @@ Il nome di input "{0}" non può essere risolto in un metodo. - Non è possibile richiamare un metodo in modalità linguaggio con restrizioni. + Non è possibile richiamare un metodo in modalità di linguaggio con restrizioni. I parametri -WhatIf e -Confirm non sono supportati per i blocchi di script. - L'operazione "{0}" non è consentita in modalità RestrictedLanguage. + L'operazione '{0}' non è consentita in modalità RestrictedLanguage. Per confrontare i due valori specificati, è necessario un operatore. Immettere un operatore valido nel comando, quindi riprovare a eseguire il comando. Ad esempio, Get-Process | Where-Object -Property Name -eq Idle @@ -188,6 +188,6 @@ ErrorAction, WarningAction, InformationAction, PipelineVariable Cmdlet ForEach-Object - La chiamata al metodo sul tipo "{0}" non sarà consentita quando viene eseguita in modalità Linguaggio con restrizioni. + La chiamata al metodo sul tipo '{0}' non sarà consentita quando viene eseguita in modalità di linguaggio vincolato. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/it/Metadata.it.resx b/src/System.Management.Automation/resources/it/Metadata.it.resx index 18fa09dd6a6..437b0031834 100644 --- a/src/System.Management.Automation/resources/it/Metadata.it.resx +++ b/src/System.Management.Automation/resources/it/Metadata.it.resx @@ -262,6 +262,6 @@ Errore di controllo dell'attributo ValidateTrustedData - L'argomento del parametro ''{0}'' non è attendibile e non riuscirà il controllo dell'attributo del parametro ValidateTrustedData in modalità linguaggio vincolato. + L'argomento del parametro '{0}' non è attendibile e il controllo dell'attributo del parametro ValidateTrustedData in modalità di linguaggio vincolato avrà esito negativo. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/it/Modules.it.resx b/src/System.Management.Automation/resources/it/Modules.it.resx index 29adda2ad13..37a5c39930e 100644 --- a/src/System.Management.Automation/resources/it/Modules.it.resx +++ b/src/System.Management.Automation/resources/it/Modules.it.resx @@ -634,7 +634,7 @@ Questo modulo usa l'operatore dot-source per esportare funzioni utilizzando caratteri jolly e questo non è consentito quando nel sistema è applicata la verifica delle applicazioni. - Non è possibile esportare membri del modulo da un modulo con una modalità linguaggio diversa da quella della sessione in esecuzione. + Non è possibile esportare membri da un modulo con una modalità di linguaggio diversa da quella della sessione in esecuzione. Non è possibile creare un nuovo modulo mentre la sessione è in modalità ConstrainedLanguage. @@ -652,7 +652,7 @@ Esportazione implicita di funzioni del modulo - L'esportazione implicita delle funzioni per il modulo '{0}' verrà negata, perché è attendibile (viene eseguito in modalità linguaggio completo), ma la sessione non è attendibile (viene eseguita in modalità linguaggio vincolato). È consigliabile esportare sempre le funzioni del modulo singolarmente usando il nome completo. + L'esportazione implicita delle funzioni per il modulo '{0}' verrà negata, perché l'operazione è attendibile (viene eseguita in modalità di linguaggio completo), ma la sessione non è attendibile (viene eseguita in modalità di linguaggio vincolato). È consigliabile esportare sempre le funzioni del modulo singolarmente usando il nome completo. Importazione del file di script come modulo @@ -664,13 +664,13 @@ Il modulo contiene l'operatore dot-source - L'importazione del modulo '{0}' avrà esito negativo in modalità linguaggio vincolato perché esporta le funzioni usando caratteri jolly e usando anche l'operatore dot-source. + L'importazione del modulo '{0}' avrà esito negativo in modalità di linguaggio vincolato perché esporta le funzioni usando caratteri jolly e anche l'operatore dot-source. "Funzioni di esportazione del modulo - Il modulo '{0}' esporta funzioni usando caratteri jolly nel nome. I nomi di funzione dei moduli annidati verranno rimossi quando si esegue il codice in modalità linguaggio vincolato. + Il modulo '{0}' esporta funzioni usando caratteri jolly nel nome. I nomi di funzione dei moduli annidati verranno rimossi quando si esegue il codice in modalità di linguaggio vincolato. "Cmdlet New-Module diff --git a/src/System.Management.Automation/resources/it/ParameterBinderStrings.it.resx b/src/System.Management.Automation/resources/it/ParameterBinderStrings.it.resx index 57e81453dc9..7ed5848076e 100644 --- a/src/System.Management.Automation/resources/it/ParameterBinderStrings.it.resx +++ b/src/System.Management.Automation/resources/it/ParameterBinderStrings.it.resx @@ -250,12 +250,12 @@ Chiamata di metodo o proprietà non consentita - La chiamata del metodo o della proprietà ''{0}'' per il tipo ''{1}'' non sarà consentita in modalità Linguaggio vincolato per gli script non attendibili. + La chiamata del metodo o della proprietà '{0}' per il tipo '{1}' non sarà consentita in modalità di linguaggio vincolato per gli script non attendibili. Creazione del tipo non consentita - La creazione del tipo ''{0}'' non sarà consentita durante l'associazione dei parametri in modalità Linguaggio vincolato per gli script non attendibili. + La creazione del tipo '{0}' non sarà consentita durante l'associazione dei parametri in modalità di linguaggio vincolato per gli script non attendibili. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/it/ParserStrings.it.resx b/src/System.Management.Automation/resources/it/ParserStrings.it.resx index d61ca5278fa..e94646f5e5a 100644 --- a/src/System.Management.Automation/resources/it/ParserStrings.it.resx +++ b/src/System.Management.Automation/resources/it/ParserStrings.it.resx @@ -586,64 +586,64 @@ Il formato corretto è: foreach ($a in $b) {...} Il parametro "{0}" della sezione di dati non è valido. Il parametro valido della sezione di dati è SupportedCommand. - I riferimenti alle matrici non sono consentiti in modalità linguaggio con restrizioni o in una sezione di dati. + I riferimenti alle matrici non sono consentiti in modalità di linguaggio con restrizioni o in una sezione di dati. - Le istruzioni di assegnazione non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le istruzioni di assegnazione non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Il reindirizzamento non è consentito in modalità linguaggio con restrizioni o in una sezione di dati. + Il reindirizzamento non è consentito in modalità di linguaggio con restrizioni o in una sezione di dati. - Le istruzioni Do e While non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le istruzioni Do e While non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Le stringhe espandibili non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le stringhe espandibili non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - L'operatore ''{0}'' non è consentito in modalità linguaggio con restrizioni o in una sezione di dati. + L'operatore '{0}' non è consentito in modalità di linguaggio con restrizioni o in una sezione di dati. - L'istruzione Trap non è consentita in modalità linguaggio con restrizioni o in una sezione di dati. + L'istruzione Trap non è consentita in modalità di linguaggio con restrizioni o in una sezione di dati. - L'istruzione Try non è consentita in modalità linguaggio con restrizioni o in una sezione di dati. + L'istruzione Try non è consentita in modalità di linguaggio con restrizioni o in una sezione di dati. - Le istruzioni di controllo del flusso, ad esempio Break, Continue, Return, Exit e Throw, non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le istruzioni di controllo del flusso, ad esempio Break, Continue, Return, Exit e Throw, non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Le istruzioni Foreach non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le istruzioni Foreach non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Le istruzioni For e While non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le istruzioni For e While non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Le dichiarazioni di funzione non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le dichiarazioni di funzione non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Le chiamate a un metodo non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le chiamate a un metodo non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - Le dichiarazioni di parametro non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + Le dichiarazioni di parametro non sono consentite in modalità di linguaggio con restrizioni o in una sezione di dati. - I riferimenti alle proprietà non sono consentiti in modalità linguaggio con restrizioni o in una sezione di dati. + I riferimenti alle proprietà non sono consentiti in modalità di linguaggio con restrizioni o in una sezione di dati. - I valori letterali del blocco di script non sono consentite in modalità linguaggio con restrizioni o in una sezione di dati. + I valori letterali del blocco di script non sono consentiti in modalità di linguaggio con restrizioni o in una sezione di dati. - L'istruzione switch non è consentita in modalità linguaggio con restrizioni o in una sezione di dati. + L'istruzione switch non è consentita in modalità di linguaggio con restrizioni o in una sezione di dati. - Variabile a cui non è possibile fare riferimento in modalità linguaggio con restrizioni o a una sezione di dati. Le variabili a cui è possibile fare riferimento includono le seguenti: {0}. + Variabile a cui non è possibile fare riferimento in modalità di linguaggio con restrizioni o in una sezione di dati. Le variabili a cui è possibile fare riferimento includono: {0}. - Il comando ''{0}'' non è consentito in modalità linguaggio con restrizioni o in una sezione di dati. + Il comando '{0}' non è consentito in modalità di linguaggio con restrizioni o in una sezione di dati. - L'istruzione dati non è consentita in modalità linguaggio con restrizioni o in un'altra sezione di dati. + L'istruzione dati non è consentita in modalità di linguaggio con restrizioni o in un'altra sezione di dati. Nel parametro SupportedCommand della sezione di dati manca un valore. Specificare un nome di cmdlet o funzione per il parametro. @@ -652,13 +652,13 @@ Il formato corretto è: foreach ($a in $b) {...} Un blocco di istruzioni Begin, un blocco di istruzioni Process o un'istruzione param non sono consentiti in una sezione di dati. - I risultati della moltiplicazione di stringhe con più di "{0}" caratteri non sono consentiti in modalità linguaggio con restrizioni o in una sezione di dati. + I risultati della moltiplicazione di stringhe con più di "{0}" caratteri non sono consentiti in modalità di linguaggio con restrizioni o in una sezione di dati. - La moltiplicazione delle matrici che genera più di {0} elementi non è consentita in modalità linguaggio con restrizioni o in una sezione di dati. + La moltiplicazione delle matrici che genera più di {0} elementi non è consentita in modalità di linguaggio con restrizioni o in una sezione di dati. - L'origine punti non è consentita in modalità linguaggio con restrizioni o in una sezione di dati. + L'origine punti non è consentita in modalità di linguaggio con restrizioni o in una sezione di dati. L'argomento dell'attributo deve essere una costante o un blocco di script. @@ -721,10 +721,10 @@ Il formato corretto è: foreach ($a in $b) {...} Chiave Null non consentita in un valore letterale hash. - Gli attributi non sono consentiti in modalità linguaggio con restrizioni o in una sezione di dati. + Gli attributi non sono consentiti in modalità di linguaggio con restrizioni o in una sezione di dati. - Il tipo {0} non è consentito in modalità linguaggio con restrizioni o in una sezione di dati. + Il tipo {0} non è consentito in modalità di linguaggio con restrizioni o in una sezione di dati. "{0}" è una proprietà di sola lettura. @@ -784,7 +784,7 @@ Il formato corretto è: foreach ($a in $b) {...} Corpo dell'istruzione mancante dopo la parola chiave ''{0}''. - I blocchi paralleli e di sequenza non sono consentiti in modalità linguaggio con restrizioni o in una sezione di dati. + I blocchi paralleli e di sequenza non sono consentiti in modalità di linguaggio con restrizioni o in una sezione di dati. Parola chiave imprevista ''{0}''. @@ -796,7 +796,7 @@ Il formato corretto è: foreach ($a in $b) {...} Impossibile richiamare il metodo. - Non è possibile convertire una tabella hash nel seguente tipo di oggetto: {0}. La conversione da tabella hash a oggetto non è supportata in modalità linguaggio con restrizioni o in una sezione di dati. + Non è possibile convertire una tabella hash nel seguente tipo di oggetto: {0}. La conversione da tabella hash a oggetto non è supportata in modalità di linguaggio con restrizioni o in una sezione di dati. L'argomento deve essere costante. @@ -842,7 +842,7 @@ Il formato corretto è: foreach ($a in $b) {...} Non è possibile trovare il file di schema {0}. Verificare che tutti i moduli specificati in un'istruzione di configurazione contengano un file schema.mof, quindi riprovare a eseguire lo script. - Non è possibile definire la sezione dati. La definizione di comandi aggiuntivi supportati non è supportata in questa modalità del linguaggio. + Non è possibile definire la sezione di dati. La definizione di comandi aggiuntivi supportati non è consentita in questa modalità di linguaggio. ''{'' mancante nell'istruzione di configurazione. @@ -935,7 +935,7 @@ ModuleVersion: versione del modulo da importare. Se usato, ModuleName deve rappr Non è possibile caricare la risorsa ''{0}'': risorsa non trovata. - La parola chiave Configuration non è consentita in modalità constrainedLanguage. + La parola chiave Configuration non è consentita in modalità ConstrainedLanguage. Il nome di configurazione ''{0}'' non è valido. I nomi standard possono contenere solo lettere (a-z, A-Z), numeri (0-9), punti (.), trattini (-) e caratteri di sottolineatura (_). Il nome non può essere Null o vuoto e deve iniziare con una lettera. @@ -1293,7 +1293,7 @@ ModuleVersion: versione del modulo da importare. Se usato, ModuleName deve rappr La modalità di aggiornamento di PartialConfiguration ''{0}'' è impostata su Disabled, che non è una modalità valida per le configurazioni parziali. Usare la modalità di aggiornamento Pull o Push. - Non è possibile creare il tipo. In questa modalità linguaggio sono supportati solo i tipi di base. + Non è possibile creare il tipo. In questa modalità di linguaggio sono supportati solo i tipi di base. Import-DscResource non può essere specificato all'interno del contesto Node @@ -1320,7 +1320,7 @@ ModuleVersion: versione del modulo da importare. Se usato, ModuleName deve rappr Non è possibile usare gli operatori ''&'' o ''.'' per richiamare un comando con ambito modulo oltre i limiti del linguaggio. - La parola chiave Class non è consentita in modalità constrainedLanguage. + La parola chiave Class non è consentita in modalità ConstrainedLanguage. '':'' mancante nell'espressione ternaria. @@ -1338,37 +1338,37 @@ ModuleVersion: versione del modulo da importare. Se usato, ModuleName deve rappr Parola chiave di configurazione del parser - La parola chiave Configuration non sarà consentita in modalità linguaggio vincolato per script non attendibili. + La parola chiave Configuration non sarà consentita in modalità di linguaggio vincolato per script non attendibili. Parola chiave della classe Parser - La parola chiave Class non sarà consentita in modalità linguaggio vincolato per script non attendibili. + La parola chiave Class non sarà consentita in modalità di linguaggio vincolato per script non attendibili. - Sezione dati del parser SupportedCommand + Sezione di dati del parser SupportedCommand - La sezione di dati che include il parametro SupportedCommand non è consentita in modalità linguaggio vincolato per script non attendibili. + La sezione di dati che include il parametro SupportedCommand non è consentita in modalità di linguaggio vincolato per script non attendibili. Operatore di chiamata ambito modulo - L'operatore di chiamata dell'ambito del modulo verrà negato in modalità linguaggio vincolato. + L'operatore di chiamata dell'ambito del modulo verrà negato in modalità di linguaggio vincolato. Chiamata al metodo della parola chiave ForEach - La parola chiave ForEach non riuscirà a eseguire la chiamata al metodo dell'elemento di iterazione ''{0}'' quando viene eseguita in modalità linguaggio vincolato. + La parola chiave ForEach non riuscirà a eseguire la chiamata al metodo dell'elemento di iterazione '{0}' quando viene eseguita in modalità di linguaggio vincolato. La valutazione dell'espressione potrebbe non riuscire - La creazione di una pipeline di cui è possibile eseguire passaggi da un blocco di script può richiedere la valutazione di alcune espressioni all'interno del blocco di script. La valutazione dell'espressione avrà esito negativo in modo invisibile all'utente e restituirà ''null'' in modalità linguaggio vincolato, a meno che l'espressione non rappresenti un valore costante. + La creazione di una pipeline eseguibile per fasi da un blocco di script può richiedere la valutazione di alcune espressioni all'interno del blocco di script. La valutazione dell'espressione avrà esito negativo in modo invisibile all'utente e restituirà 'null' in modalità di linguaggio vincolato, a meno che l'espressione non rappresenti un valore costante. La parola chiave Configuration non è supportata nei processori ARM64. diff --git a/src/System.Management.Automation/resources/it/RemotingErrorIdStrings.it.resx b/src/System.Management.Automation/resources/it/RemotingErrorIdStrings.it.resx index d09262114f3..cf09c034910 100644 --- a/src/System.Management.Automation/resources/it/RemotingErrorIdStrings.it.resx +++ b/src/System.Management.Automation/resources/it/RemotingErrorIdStrings.it.resx @@ -660,10 +660,10 @@ La configurazione della sessione "{0}" non è una shell basata su PowerShell. - La configurazione della sessione "{0}" è una shell basata su PowerShell. Usare PowerShell 6+ per modificarla. + La configurazione della sessione "{0}" è una shell basata su PowerShell. Usa PowerShell 6+ per modificarla. - La configurazione della sessione "{0}" è una shell basata su Windows PowerShell. Usare Windows PowerShell per modificarla. + La configurazione della sessione "{0}" è una shell basata su Windows PowerShell. Usa Windows PowerShell per modificarla. Nessuna configurazione di sessione corrisponde ai criteri "{0}". @@ -735,9 +735,9 @@ Continuare? La disabilitazione delle configurazioni di sessione non annulla tutte le modifiche apportate dal cmdlet Enable-PSRemoting o Enable-PSSessionConfiguration. Potrebbe essere necessario annullare manualmente le modifiche seguendo questi passaggi: 1. Arrestare e disabilitare il servizio WinRM. - 2. Eliminare il listener che accetta richieste in qualsiasi indirizzo IP. + 2. Eliminare il listener che accetta richieste su qualsiasi indirizzo IP. 3. Disabilitare le eccezioni del firewall per le comunicazioni di WS-Management. - 4. Ripristinare il valore di LocalAccountTokenFilterPolicy su 0, che limita l'accesso remoto ai membri del gruppo Administrators nel computer. + 4. Ripristinare il valore di LocalAccountTokenFilterPolicy su 0, limitando l'accesso remoto ai membri del gruppo Administrators nel computer. Accesso negato. Per eseguire questo cmdlet, avviare PowerShell con l'opzione "Esegui come amministratore". @@ -939,8 +939,8 @@ Si noti che ''Start-Job'' non è supportato per progettazione negli scenari in c Le modifiche apportate da {0} avranno effetto solo dopo il riavvio del servizio WinRM. - {0} potrebbe essere necessario riavviare il servizio WinRM se di recente è stata annullata la registrazione di una configurazione con questo nome, perché alcune strutture di dati di sistema potrebbero essere ancora memorizzate nella cache. In tal caso, potrebbe essere necessario riavviare WinRM. -Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShell, ad esempio Microsoft.PowerShell, e alle configurazioni di sessione create con il cmdlet Register-PSSessionConfiguration, vengono disconnesse. + {0} potrebbe dover riavviare il servizio WinRM per eliminare dalla cache le strutture di dati rimaste dopo l'annullamento della registrazione di una configurazione con questo nome. In tal caso, potrebbe essere necessario riavviare WinRM. +Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShell, ad esempio Microsoft.PowerShell, e alle configurazioni di sessione create con il cmdlet Register-PSSessionConfiguration vengono disconnesse. Si è in esecuzione in una sessione remota ed è stata selezionata l'opzione Force, il che significa che il servizio WinRM potrebbe riavviarsi. Se il servizio WinRM viene riavviato, questa sessione remota verrà terminata e sarà necessario crearne una nuova per continuare @@ -1069,7 +1069,7 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel Comandi esterni (script e applicazioni) da rendere visibili quando applicati a una sessione - Il percorso del file di configurazione PSSession ''{0}'' non è valido. L'argomento del percorso deve risolvere un singolo file nel file system con estensione ''.pssc''. Correggere la specifica del percorso e riprovare. + Il percorso del file di configurazione PSSession '{0}' non è valido. L'argomento del percorso deve risolvere un singolo file nel file system con estensione ''.pssc''. Correggi la specifica del percorso e riprova. Il percorso del file Role Capability ''{0}'' non è valido. L'argomento del percorso deve risolvere un singolo file nel file system con estensione ''.psrc''. Correggere la specifica del percorso e riprovare. @@ -1078,7 +1078,7 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel La voce ''Roles'' deve essere una tabella hash, ma era una {0}. - Non é possibile convertire il valore della voce di ruolo ''{0}'' in una tabella hash. La voce ''Roles'' deve essere una tabella hash con i nomi dei gruppi come chiavi, dove il valore associato a ogni chiave è un'altra tabella hash delle proprietà di configurazione della sessione per tale ruolo. + Non è possibile convertire il valore della voce di ruolo '{0}' in una tabella hash. La voce 'Roles' deve essere una tabella hash con i nomi dei gruppi come chiavi, dove il valore associato a ogni chiave è un'altra tabella hash delle proprietà di configurazione della sessione per tale ruolo. Non è possibile trovare la funzionalità di ruolo ''{0}''. La funzionalità di ruolo deve essere un file denominato ''{1}'' all'interno di una cartella 'RoleCapabilities'' in un modulo nel percorso dei moduli corrente. @@ -1163,7 +1163,7 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel La chiave ''{0}'' nel membro ''{1}'' deve essere un blocco di script. Modificare la chiave in modo che usi il tipo corretto nel file {2}. - Il file di configurazione della sessione {0} non è valido. Specificare un file di configurazione della sessione valido e riprovare il comando. + Il file di configurazione della sessione {0} non è valido. Specifica un file di configurazione della sessione valido e ripeti il comando. Connessione di rete interrotta @@ -1259,7 +1259,7 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel Il parametro AutoRemoveJob non può essere usato senza il parametro Wait - Il servizio WS-Management non può elaborare la richiesta. Non é possibile trovare la configurazione della sessione {0} nell'unità WSMan: del computer {1}. Per ulteriori informazioni, vedere l'argomento della Guida about_Remote_Troubleshooting. + Il servizio WS-Management non può elaborare la richiesta. Non è possibile trovare la configurazione della sessione {0} nell'unità WSMan: del computer {1}. Per ulteriori informazioni, vedi l'argomento della Guida about_Remote_Troubleshooting. Non è possibile creare un processo dalla specifica {0} perché lo spazio di esecuzione specificato non è locale. Riprovare usando uno spazio di esecuzione locale oppure specificare un argomento RunspaceMode. @@ -1327,10 +1327,10 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel Il processo è stato sospeso correttamente aggiungendo il parametro Force. - Il file di configurazione della sessione {0} non è valido. Specificare un file di configurazione della sessione valido e riprovare il comando. Errore durante l'analisi del file di configurazione: {1}. + Il file di configurazione della sessione {0} non è valido. Specifica un file di configurazione della sessione valido e ripeti il comando. Errore durante l'analisi del file di configurazione: {1}. - Register-PSSessionConfiguration: la chiave ''{0}'' nel file di configurazione della sessione {1}. contiene un valore non valido. Correggere il file e riprovare a eseguire il comando. + Register-PSSessionConfiguration: la chiave '{0}' nel file di configurazione della sessione {1}. contiene un valore non valido. Correggi il file e riprova a eseguire il comando. Le sessioni disconnesse sono supportate solo quando il computer remoto esegue PowerShell 3.0 o una versione successiva di PowerShell. @@ -1342,10 +1342,10 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel PSSession {0} è stata creata usando il parametro EnableNetworkAccess e può essere riconnessa solo dal computer locale. - Non è possibile avviare il processo. La modalità linguaggio per questa sessione non è compatibile con la modalità linguaggio a livello di sistema. + Non è possibile avviare il processo. La modalità di linguaggio per questa sessione non è compatibile con la modalità di linguaggio a livello di sistema. - Non è possibile creare lo spazio di esecuzione. La modalità linguaggio per questa confiurazione non è compatibile con la modalità linguaggio a livello di sistema. + Non è possibile creare lo spazio di esecuzione. La modalità di linguaggio per questa configurazione non è compatibile con la modalità di linguaggio a livello di sistema. Non è possibile uscire da una pipeline annidata perché la pipeline non è nello stato annidato. @@ -1540,7 +1540,7 @@ Tutte le sessioni di WinRM connesse alle configurazioni di sessione di PowerShel Non è possibile avviare il server named pipe in modalità server. - Non è possibile concedere l'accesso remoto a ''{0}'': ''{1}''. La configurazione della sessione è stata registrata, ma questo gruppo non ha accesso. Per risolvere l'errore, specificare un nome di gruppo valido e registrare di nuovo la configurazione della sessione. + Non è possibile concedere l'accesso remoto a '{0}': '{1}'. La configurazione della sessione è stata registrata, ma questo gruppo non ha accesso. Per risolvere l'errore, specifica un nome di gruppo valido e registra di nuovo la configurazione della sessione. Non è possibile ottenere le funzionalità della sessione per la configurazione di sessione''{0}'': questa configurazione non è stata registrata con un file di configurazione della sessione (.pssc), ad esempio uno creato dal cmdlet New-PSSessionConfigurationFile. @@ -1712,7 +1712,7 @@ Il processo client SSH è terminato prima che fosse possibile stabilire la conne La tabella hash di configurazione della sessione contiene un tipo di chiave non valido. Le chiavi devono essere di tipo stringa. - Il file di configurazione della sessione contiene un'opzione di configurazione non supportata: {0}. Si tratta di un'opzione di configurazione dell'endpoint di comunicazione remota che non si applica allo stato della sessione di PowerShell. + Il file di configurazione della sessione contiene un'opzione non supportata: {0}. Si tratta di un'opzione di configurazione dell'endpoint di comunicazione remota che non si applica allo stato della sessione di PowerShell. Il file di configurazione della sessione contiene un'opzione di configurazione sconosciuta: {0}. @@ -1721,7 +1721,7 @@ Il processo client SSH è terminato prima che fosse possibile stabilire la conne La valutazione dell'espressione potrebbe non riuscire - La creazione di un oggetto PowerShell da un blocco di script può richiedere la valutazione di alcune espressioni all'interno del blocco di script. La valutazione dell'espressione avrà esito negativo in modo invisibile all'utente e restituirà ''null'' in modalità linguaggio vincolato, a meno che l'espressione non rappresenti un valore costante. + La creazione di un oggetto PowerShell da un blocco di script può richiedere la valutazione di alcune espressioni all'interno del blocco di script. La valutazione dell'espressione avrà esito negativo in modo invisibile all'utente e restituirà 'null' in modalità di linguaggio vincolato, a meno che l'espressione non rappresenti un valore costante. Non è possibile ottenere lo stato della VM Hyper-V. Il valore era di tipo {0} ma era previsto Microsoft.HyperV.PowerShell.VMState o System.String. diff --git a/src/System.Management.Automation/resources/it/RunspaceStrings.it.resx b/src/System.Management.Automation/resources/it/RunspaceStrings.it.resx index 03233de5fc6..e2b4617f5aa 100644 --- a/src/System.Management.Automation/resources/it/RunspaceStrings.it.resx +++ b/src/System.Management.Automation/resources/it/RunspaceStrings.it.resx @@ -172,7 +172,7 @@ Le opzioni del thread possono essere modificate solo se lo stato dell'apartment è multithreading apartment (MTA), le opzioni correnti sono UseNewThread o UseCurrentThread e il nuovo valore è ReuseThread. - {0} non può essere false quando la modalità lingua è {1} o {2}. + {0} non può essere false quando la modalità di linguaggio è {1} o {2}. Non è possibile disconnettere uno spazio di esecuzione solo locale. diff --git a/src/System.Management.Automation/resources/ja/CatalogStrings.ja.resx b/src/System.Management.Automation/resources/ja/CatalogStrings.ja.resx index df578d63424..9edc3f276f2 100644 --- a/src/System.Management.Automation/resources/ja/CatalogStrings.ja.resx +++ b/src/System.Management.Automation/resources/ja/CatalogStrings.ja.resx @@ -151,7 +151,8 @@ カタログ バージョンが無効です。カタログのバージョン {0} およびバージョン {1} のみがサポートされています。 - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} カタログ定義ファイルを開けません。 diff --git a/src/System.Management.Automation/resources/ko/CatalogStrings.ko.resx b/src/System.Management.Automation/resources/ko/CatalogStrings.ko.resx index b08e8ee6585..8a30504b2cc 100644 --- a/src/System.Management.Automation/resources/ko/CatalogStrings.ko.resx +++ b/src/System.Management.Automation/resources/ko/CatalogStrings.ko.resx @@ -151,7 +151,8 @@ 카탈로그 버전이 유효하지 않습니다. 버전 {0} 및 버전 {1} 카탈로그만 지원됩니다. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} 카탈로그 정의 파일을 열 수 없습니다. diff --git a/src/System.Management.Automation/resources/pl/CatalogStrings.pl.resx b/src/System.Management.Automation/resources/pl/CatalogStrings.pl.resx index c0d1ce7befe..0b8f996730e 100644 --- a/src/System.Management.Automation/resources/pl/CatalogStrings.pl.resx +++ b/src/System.Management.Automation/resources/pl/CatalogStrings.pl.resx @@ -151,7 +151,8 @@ Wersja wykazu jest nieprawidłowa. Obsługujemy tylko wersję {0} i wersję {1} wykazu. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Nie można otworzyć pliku definicji wykazu. diff --git a/src/System.Management.Automation/resources/pt-BR/CatalogStrings.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/CatalogStrings.pt-BR.resx index 7d51fe48e59..1f647b05f2a 100644 --- a/src/System.Management.Automation/resources/pt-BR/CatalogStrings.pt-BR.resx +++ b/src/System.Management.Automation/resources/pt-BR/CatalogStrings.pt-BR.resx @@ -151,7 +151,8 @@ A versão do catálogo é inválida. Damos suporte apenas às versões {0} e {1} do catálogo. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Não foi possível abrir o arquivo de definição de catálogo. diff --git a/src/System.Management.Automation/resources/pt-BR/EventResource.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/EventResource.pt-BR.resx index 47ef2e8b8e6..f9f4cf3f084 100644 --- a/src/System.Management.Automation/resources/pt-BR/EventResource.pt-BR.resx +++ b/src/System.Management.Automation/resources/pt-BR/EventResource.pt-BR.resx @@ -135,7 +135,7 @@ WorkflowId: {0} - O pool de runspace de fluxo de trabalho foi criado. + O pool de runspaces de fluxo de trabalho foi criado. WorkflowId: {0} ManagedNode: {1} diff --git a/src/System.Management.Automation/resources/pt-BR/Modules.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/Modules.pt-BR.resx index 8d63fbe6d74..0a2ac711c2f 100644 --- a/src/System.Management.Automation/resources/pt-BR/Modules.pt-BR.resx +++ b/src/System.Management.Automation/resources/pt-BR/Modules.pt-BR.resx @@ -634,7 +634,7 @@ Este módulo usa o operador dot-source ao exportar funções usando caracteres curinga e isso não é permitido quando o sistema está sob a imposição de verificação do aplicativo. - Não é possível exportar membros de módulo de um módulo que tenha um modo de idioma diferente da sessão em execução. + Não é possível exportar membros de módulo de um módulo que tenha um modo de linguagem diferente da sessão em execução. Não é possível criar um novo módulo enquanto a sessão estiver no modo ConstrainedLanguage. @@ -646,13 +646,13 @@ Cmdlet Export-ModuleMember - A exportação de membros do módulo falhará no modo idioma restrito porque o módulo "{0}", tem um modo de idioma "{1}" diferente da sessão atual "{2}". + A exportação de membros do módulo falhará no Modo de Linguagem com Restrição porque o módulo "{0}", tem um modo de idioma "{1}" diferente da sessão atual "{2}". Exportação de Função Implícita do Módulo - A exportação de função implícita para o módulo "{0}" será negada porque é confiável (é executada no modo de Idioma Completo), mas a sessão não é confiável (é executada no modo idioma restrito). É uma prática recomendada sempre exportar funções de módulo individualmente por nome completo. + A exportação de função implícita para o módulo "{0}" será negada porque é confiável (é executada no Modo de Linguagem Completo), mas a sessão não é confiável (é executada no Modo de Linguagem com Restrição). É uma prática recomendada sempre exportar funções de módulo individualmente por nome completo. Importando arquivo de script como módulo @@ -664,7 +664,7 @@ Módulo Contém Operador dot-source - A importação do módulo "{0}" falhará no modo idioma restrito porque exporta funções usando caracteres curinga enquanto também usa o operador dot-source. + A importação do módulo "{0}" falhará no Modo de Linguagem com Restrição porque exporta funções usando caracteres curinga enquanto também usa o operador dot-source. "Módulo exportando funções @@ -682,6 +682,6 @@ "Modos de linguagem incompatíveis do módulo - Um módulo dependente está sendo carregado que tem um modo de idioma diferente do pai. Isso não será permitido quando estiver no modo de Idioma Restrito. + Um módulo dependente está sendo carregado que tem um modo de idioma diferente do pai. Isso não será permitido quando estiver no Modo de Linguagem com Restrição. \ No newline at end of file diff --git a/src/System.Management.Automation/resources/ru/CatalogStrings.ru.resx b/src/System.Management.Automation/resources/ru/CatalogStrings.ru.resx index 50b8e5a412b..9a4d9a3e1be 100644 --- a/src/System.Management.Automation/resources/ru/CatalogStrings.ru.resx +++ b/src/System.Management.Automation/resources/ru/CatalogStrings.ru.resx @@ -151,7 +151,8 @@ Неверная версия каталога. Мы поддерживаем только версию каталога {0} и версию {1}. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Не удалось открыть файл определения каталога. diff --git a/src/System.Management.Automation/resources/tr/CatalogStrings.tr.resx b/src/System.Management.Automation/resources/tr/CatalogStrings.tr.resx index 1a7685e15c2..4f32630f148 100644 --- a/src/System.Management.Automation/resources/tr/CatalogStrings.tr.resx +++ b/src/System.Management.Automation/resources/tr/CatalogStrings.tr.resx @@ -151,7 +151,8 @@ Katalog sürümü geçerli değil. Yalnızca katalog sürüm {0} ve sürüm {1} desteklenir. - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} Katalog tanım dosyası açılamıyor. diff --git a/src/System.Management.Automation/resources/tr/RemotingErrorIdStrings.tr.resx b/src/System.Management.Automation/resources/tr/RemotingErrorIdStrings.tr.resx index 3cd661b708b..1f8425854de 100644 --- a/src/System.Management.Automation/resources/tr/RemotingErrorIdStrings.tr.resx +++ b/src/System.Management.Automation/resources/tr/RemotingErrorIdStrings.tr.resx @@ -737,7 +737,7 @@ Devam etmek istiyor musunuz? 1. WinRM hizmetini durdurun ve devre dışı bırakın. 2. Herhangi bir IP adresindeki istekleri kabul eden dinleyiciyi silin. 3. WS-Management iletişimleri için güvenlik duvarı özel durumlarını devre dışı bırakın. - 4. LocalAccountTokenFilterPolicy değerini 0 olarak geri yükleyin. Bu, bilgisayardaki Yönetici grubunun üyelerine uzak erişimi kısıtlar. + 4. LocalAccountTokenFilterPolicy değerini 0 olarak geri yükleyin. Bu, bilgisayardaki Yönetici grubunun üyelerine uzaktan erişimi kısıtlar. Erişim reddedildi. Bu cmdlet'i çalıştırmak için PowerShell'i "Yönetici olarak çalıştır" seçeneğiyle başlatın. diff --git a/src/System.Management.Automation/resources/zh-Hans/CatalogStrings.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/CatalogStrings.zh-Hans.resx index 3b954f69a92..8fddd7bef97 100644 --- a/src/System.Management.Automation/resources/zh-Hans/CatalogStrings.zh-Hans.resx +++ b/src/System.Management.Automation/resources/zh-Hans/CatalogStrings.zh-Hans.resx @@ -151,7 +151,8 @@ 目录版本无效。我们仅支持目录版本 {0} 和版本 {1}。 - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} 无法打开目录定义文件。 diff --git a/src/System.Management.Automation/resources/zh-Hans/Modules.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/Modules.zh-Hans.resx index 1643903efc3..e5a427403b8 100644 --- a/src/System.Management.Automation/resources/zh-Hans/Modules.zh-Hans.resx +++ b/src/System.Management.Automation/resources/zh-Hans/Modules.zh-Hans.resx @@ -658,19 +658,19 @@ 正在将脚本文件作为模块导入 - 在 ConstrainedLanguage 模式下,不允许将脚本文件 "{0}" 作为模块导入。 + 在 ConstrainedLanguage 模式下,不允许将脚本文件“{0}”作为模块导入。 模块包含点源运算符 - 模块 "{0}" 的导入在 Constrained Language 模式下会失败,因为它在使用点源运算符的同时,还使用通配符导出函数。 + 模块“{0}”的导入在约束语言模式模式下会失败,因为它在使用点源运算符的同时,还使用通配符导出函数。 “模块导出函数 - 模块 "{0}" 使用名称通配符导出函数。在 Constrained Language 模式下运行时,任何嵌套模块的函数名称都将被删除。 + 模块“{0}”使用名称通配符导出函数。在约束语言模式模式下运行时,任何嵌套模块的函数名称都将被删除。 "New-Module Cmdlet diff --git a/src/System.Management.Automation/resources/zh-Hans/ParserStrings.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/ParserStrings.zh-Hans.resx index 8027311c2ed..c18475c4da4 100644 --- a/src/System.Management.Automation/resources/zh-Hans/ParserStrings.zh-Hans.resx +++ b/src/System.Management.Automation/resources/zh-Hans/ParserStrings.zh-Hans.resx @@ -580,85 +580,85 @@ 变量名称中应使用 `{ 而不是 {。 - Data 节缺少语句块。 + 数据段缺少语句块。 - Data 节的 "{0}" 参数无效。有效的 Data 节参数为 SupportedCommand。 + 数据段的“{0}”参数无效。有效的数据段参数为 SupportedCommand。 受限语言模式或 Data 节中不允许使用数组引用。 - 受限语言模式或 Data 节中不允许使用赋值语句。 + 受限语言模式或数据段中不允许使用赋值语句。 - 在受限语言模式或数据部分中不允许重定向。 + 在受限语言模式或数据段中不允许重定向。 - 受限语言模式或 Data 节中不允许使用 Do 和 While 语句。 + 受限语言模式或数据段中不允许使用 Do 和 While 语句。 - 在受限语言模式或数据部分中不允许使用可扩展字符串。 + 在受限语言模式或数据段中不允许使用可扩展字符串。 - 在受限语言模式或 Data 节中不允许使用“{0}”运算符。 + 在受限语言模式或数据段中不允许使用“{0}”运算符。 - 在受限语言模式或 Data 节中不允许使用 Trap 语句。 + 在受限语言模式或数据段中不允许使用 Trap 语句。 - 在受限语言模式或 Data 节中不允许使用 Try 语句。 + 在受限语言模式或数据段中不允许使用 Try 语句。 - 不允许在受限语言模式或 Data 节中使用 Break、Continue、Return、Exit 和 Throw 等流控制语句。 + 不允许在受限语言模式或数据段中使用 Break、Continue、Return、Exit 和 Throw 等流控制语句。 - 不允许在受限语言模式或 Data 节中使用 Foreach 语句。 + 不允许在受限语言模式或数据段中使用 Foreach 语句。 - 受限语言模式或 Data 节中不允许使用 For 和 While 语句。 + 受限语言模式或数据段中不允许使用 For 和 While 语句。 - 在受限语言模式或 Data 节中不允许函数声明。 + 在受限语言模式或数据段中不允许函数声明。 - 受限语言模式或 Data 节中不允许使用方法调用。 + 受限语言模式或数据段中不允许使用方法调用。 - 在受限语言模式或 Data 节中不允许使用参数声明。 + 在受限语言模式或数据段中不允许使用参数声明。 - 受限语言模式或 Data 节中不允许使用属性引用。 + 受限语言模式或数据段中不允许使用属性引用。 - 在受限语言模式或数据部分中不允许使用脚本块文本。 + 在受限语言模式或数据段中不允许使用脚本块文本。 - 在受限语言模式或 Data 节中不允许使用 switch 语句。 + 在受限语言模式或数据段中不允许使用 switch 语句。 - 所引用的变量不能在受限语言模式或 Data 节中引用。可引用的变量包括以下内容: {0}。 + 所引用的变量不能在受限语言模式或数据段中引用。可引用的变量包括以下内容: {0}。 - 受限语言模式或 Data 节中不允许使用命令“{0}”。 + 受限语言模式或数据段中不允许使用命令“{0}”。 - 受限语言模式或另一个 Data 节中不允许使用 data 语句。 + 受限语言模式或另一个数据段中不允许使用 data 语句。 - Data 节的 SupportedCommand 参数缺少值。请为该参数提供 cmdlet 或函数名称。 + 数据段的 SupportedCommand 参数缺少值。请为该参数提供 cmdlet 或函数名称。 - 在 Data 节中不允许使用 Begin 语句块、Process 语句块或参数语句。 + 在数据段中不允许使用 Begin 语句块、Process 语句块或参数语句。 - 受限语言模式或 Data 节中不允许字符串乘法结果超过“{0}”个字符。 + 受限语言模式或数据段中不允许字符串乘法结果超过“{0}”个字符。 - 在受限语言模式或 Data 节中,不允许数组乘法产生超过 {0} 个元素。 + 在受限语言模式或数据段中,不允许数组乘法产生超过 {0} 个元素。 - 受限语言模式或 Data 节中不允许使用点源语法。 + 受限语言模式或数据段中不允许使用点源语法。 特性参数必须是常量或脚本块。 @@ -721,10 +721,10 @@ 哈希文本中不允许使用空键。 - 受限语言模式或 Data 节中不允许使用属性。 + 受限语言模式或数据段中不允许使用属性。 - 在受限语言模式或数据节中不允许使用该类型 {0}。 + 在受限语言模式或数据段中不允许使用该类型 {0}。 “{0}”是 ReadOnly 属性。 @@ -784,7 +784,7 @@ 关键字'{0}'后缺少语句体。 - 受限语言模式或 Data 节中不允许使用 parallel 和 sequence 块。 + 受限语言模式或数据段中不允许使用 parallel 和 sequence 块。 意外的关键字 '{0}'。 @@ -796,7 +796,7 @@ 无法调用该方法。 - 无法将哈希表转换为以下类型的对象: {0}。在受限语言模式或 Data 节中不支持哈希表到对象的转换。 + 无法将哈希表转换为以下类型的对象: {0}。在受限语言模式或数据段中不支持哈希表到对象的转换。 参数必须是常量。 @@ -842,7 +842,7 @@ 找不到架构文件 {0}。请验证配置语句中指定的所有模块是否都包含 schema.mof 文件,然后再次尝试运行脚本。 - 无法定义数据节。此语言模式不支持定义其他受支持的命令。 + 无法定义数据段。此语言模式不支持定义其他受支持的命令。 配置语句中缺少“{”。 @@ -1338,37 +1338,37 @@ ModuleVersion: 要导入的模块版本。如果使用 ModuleName,则它只能 解析器配置关键字 - 对于不受信任的脚本,在 Constrained Language 模式下不允许使用 Configuration 关键字。 + 对于不受信任的脚本,在约束语言模式下不允许使用 Configuration 关键字。 解析器类关键字 - 对于不受信任的脚本,在 Constrained Language 模式下不允许使用 Class 关键字。 + 对于不受信任的脚本,在约束语言模式下不允许使用 Class 关键字。 - 解析器数据节 SupportedCommand + 分析程序数据段 SupportedCommand - 对于不受信任的脚本,在 Constrained Language 模式下,不允许包含 SupportedCommand 参数的数据节。 + 对于不受信任的脚本,在约束语言模式下,不允许包含 SupportedCommand 参数的数据节。 模块范围调用运算符 - 在 Constrained Language 模式下,将拒绝模块范围调用运算符。 + 在约束语言模式下,将拒绝模块范围调用运算符。 ForEach 关键字方法调用 - 在 Constrained Language 模式下运行时,ForEach 关键字对“{0}”迭代项的方法调用将失败。 + 在约束语言模式下运行时,ForEach 关键字对“{0}”迭代项的方法调用将失败。 表达式计算可能失败 - 从脚本块创建可步进管道可能需要计算脚本块中的某些表达式。除非表达式表示常量值,否则在“受限语言”模式下,表达式计算会静默失败并返回 'null'。 + 从脚本块创建可步进管道可能需要计算脚本块中的某些表达式。除非表达式表示常量值,否则在约束语言模式下,表达式计算会静默失败并返回 'null'。 ARM64 处理器上不支持配置关键字。 diff --git a/src/System.Management.Automation/resources/zh-Hans/RemotingErrorIdStrings.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/RemotingErrorIdStrings.zh-Hans.resx index 917ffd46890..174ebd0dd3b 100644 --- a/src/System.Management.Automation/resources/zh-Hans/RemotingErrorIdStrings.zh-Hans.resx +++ b/src/System.Management.Automation/resources/zh-Hans/RemotingErrorIdStrings.zh-Hans.resx @@ -1069,7 +1069,7 @@ 应用于会话时要显示的外部命令(脚本和应用程序) - PSSession 配置文件路径 '{0}' 无效。路径自变量必须解析为文件系统中具有 '.pssc' 扩展名的单个文件。请修复路径规范,然后重试。 + PSSession 配置文件路径“{0}”无效。路径自变量必须解析为文件系统中具有 '.pssc' 扩展名的单个文件。请修复路径规范,然后重试。 角色功能文件路径 '{0}' 无效。路径自变量必须解析为文件系统中具有 '.psrc' 扩展名的单个文件。请修复路径规范,然后重试。 @@ -1721,7 +1721,7 @@ SSH 客户端进程已在建立连接之前终止。 表达式计算可能失败 - 基于脚本块创建 PowerShell 对象可能需要计算脚本块中的某些表达式。除非表达式表示常量值,否则在“受限语言”模式下,表达式计算会静默失败并返回 'null'。 + 基于脚本块创建 PowerShell 对象可能需要计算脚本块中的某些表达式。除非表达式表示常量值,否则在约束语言模式下,表达式计算会静默失败并返回 'null'。 未能获取 Hyper-V VM 状态。该值的类型为 {0},但应为 Microsoft.HyperV.PowerShell.VMState 或 System.String。 diff --git a/src/System.Management.Automation/resources/zh-Hans/SessionStateStrings.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/SessionStateStrings.zh-Hans.resx index a7eef750830..a6a3490aa92 100644 --- a/src/System.Management.Automation/resources/zh-Hans/SessionStateStrings.zh-Hans.resx +++ b/src/System.Management.Automation/resources/zh-Hans/SessionStateStrings.zh-Hans.resx @@ -652,6 +652,6 @@ 会话状态变量 - 在 ConstrainedLanguage 模式下,更改或创建变量 '{0}' 的作用域为 AllScope 将被阻止。 + 在 ConstrainedLanguage 模式下,更改或创建变量“{0}”的作用域为 AllScope 将被阻止。 \ No newline at end of file diff --git a/src/System.Management.Automation/resources/zh-Hant/CatalogStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/CatalogStrings.zh-Hant.resx index 1d91bcb7549..8ecbd003e3b 100644 --- a/src/System.Management.Automation/resources/zh-Hant/CatalogStrings.zh-Hant.resx +++ b/src/System.Management.Automation/resources/zh-Hant/CatalogStrings.zh-Hant.resx @@ -151,7 +151,8 @@ 目錄版本無效。我們只支援目錄版本 {0} 和版本 {1}。 - '{0}' is a version catalog that uses SHA0 or SHA1. Consider regenerating this catalog with '-CatalogVersion 2'. + '{0}' is a version 1 catalog that uses the weak SHA-1 hash algorithm. Consider regenerating this catalog with '-CatalogVersion 2'. + {StrContains="SHA-1"}{StrContains="-CatalogVersion 2"} 無法開啟目錄定義檔。 diff --git a/src/System.Management.Automation/resources/zh-Hant/Credential.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/Credential.zh-Hant.resx index 240973d4c73..4e72447398d 100644 --- a/src/System.Management.Automation/resources/zh-Hant/Credential.zh-Hant.resx +++ b/src/System.Management.Automation/resources/zh-Hant/Credential.zh-Hant.resx @@ -118,12 +118,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - Cannot serialize the credential. If this command is starting a workflow, the credentials cannot be persisted, because the process in which the workflow is started does not have permission to serialize credentials. + 無法序列化認證。如果此命令正在啟動工作流程,則無法保留認證,因為啟動工作流程的處理序沒有序列化認證的權限。 --- If the workflow was started in a PSSession to the local computer, add the EnableNetworkAccess parameter to the command that created the session. --- If the workflow was started in a PSSession to a remote computer, add the Authentication parameter with a value of CredSSP to the command that created the session. Or, connect to a session configuration that has a RunAsUser property value. +-- 如果工作流程是在本機電腦的 PSSession 中啟動,請將 EnableNetworkAccess 參數新增至建立該工作階段的命令。 +-- 如果工作流程是在遠端電腦的 PSSession 中啟動,請在建立該工作階段的命令中新增 Authentication 參數,並將其值設為 CredSSP。或者,請連線到具有 RunAsUser 屬性值的工作階段組態。 - The value for UserName is not in the correct format. + UserName 的值格式不正確。 \ No newline at end of file diff --git a/src/System.Management.Automation/resources/zh-Hant/InternalCommandStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/InternalCommandStrings.zh-Hant.resx index 484132cb17e..9943de2d558 100644 --- a/src/System.Management.Automation/resources/zh-Hant/InternalCommandStrings.zh-Hant.resx +++ b/src/System.Management.Automation/resources/zh-Hant/InternalCommandStrings.zh-Hant.resx @@ -188,6 +188,6 @@ ErrorAction、WarningAction、InformationAction、PipelineVariable ForEach-Object Cmdlet - 在 Constrained Language 模式下執行時,不允許對類型 '{0}' 呼叫方法。 + 在限縮語言模式下執行時,不允許對類型 '{0}' 呼叫方法。 \ No newline at end of file diff --git a/src/System.Management.Automation/resources/zh-Hant/ParserStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/ParserStrings.zh-Hant.resx index 58202256c46..8f6b55ee7b7 100644 --- a/src/System.Management.Automation/resources/zh-Hant/ParserStrings.zh-Hant.resx +++ b/src/System.Management.Automation/resources/zh-Hant/ParserStrings.zh-Hant.resx @@ -586,64 +586,64 @@ Data 區段的 "{0}" 參數無效。有效的 Data 區段參數為 SupportedCommand。 - 限制語言模式或 Data 區段中不允許陣列參考。 + 受限語言模式或 Data 區段中不允許陣列參考。 - 限制語言模式或 Data 區段中不允許 Assignment 陳述式。 + 受限語言模式或 Data 區段中不允許 Assignment 陳述式。 - 限制語言模式或 Data 區段中不允許重新導向。 + 受限語言模式或 Data 區段中不允許重新導向。 - 限制語言模式或 Data 區段中不允許 Do 和 While 陳述式。 + 受限語言模式或 Data 區段中不允許 Do 和 While 陳述式。 - 限制語言模式或 Data 區段中不允許可擴充字串。 + 受限語言模式或 Data 區段中不允許可擴充字串。 - 限制語言模式或 Data 區段中不允許 '{0}' 運算子。 + 受限語言模式或 Data 區段中不允許 '{0}' 運算子。 - 限制語言模式或 Data 區段中不允許 Trap 陳述式。 + 受限語言模式或 Data 區段中不允許 Trap 陳述式。 - 限制語言模式或 Data 區段中不允許 Try 陳述式。 + 受限語言模式或 Data 區段中不允許 Try 陳述式。 - 限制語言模式中或 Data 區段中不允許流程控制陳述式,例如 Break、Continue、Return、Exit 和 Throw。 + 受限語言模式中或 Data 區段中不允許流程控制陳述式,例如 Break、Continue、Return、Exit 和 Throw。 - 限制語言模式或 Data 區段中不允許 Foreach 陳述式。 + 受限語言模式或 Data 區段中不允許 Foreach 陳述式。 - 限制語言模式或 Data 區段中不允許 For 和 While 陳述式。 + 受限語言模式或 Data 區段中不允許 For 和 While 陳述式。 - 限制語言模式或 Data 區段中不允許函式宣告。 + 受限語言模式或 Data 區段中不允許函式宣告。 - 限制語言模式或 Data 區段中不允許方法呼叫。 + 受限語言模式或 Data 區段中不允許方法呼叫。 - 限制語言模式或 Data 區段中不允許參數宣告。 + 受限語言模式或 Data 區段中不允許參數宣告。 - 限制語言模式或 Data 區段中不允許屬性參考。 + 受限語言模式或 Data 區段中不允許屬性參考。 - 限制語言模式或 Data 區段中不允許指令碼區塊文字。 + 受限語言模式或 Data 區段中不允許指令碼區塊文字。 - 限制語言模式或 Data 區段中不允許 switch 陳述式。 + 受限語言模式或 Data 區段中不允許 switch 陳述式。 - 正在參考無法在限制語言模式或 Data 區段中參考的變數。可參考的變數包括下列項目: {0}。 + 正在參考無法在受限語言模式或 Data 區段中參考的變數。可參考的變數包括下列項目: {0}。 - 限制語言模式或 Data 區段中不允許命令 '{0}'。 + 受限語言模式或 Data 區段中不允許命令 '{0}'。 - 限制語言模式或其他 Data 區段中不允許資料陳述式。 + 受限語言模式或其他 Data 區段中不允許資料陳述式。 Data 區段的 SupportedCommand 參數缺少值。請為該參數提供 Cmdlet 或函數名稱。 @@ -652,13 +652,13 @@ Data 區段中不允許 Begin 陳述式區塊、Process 陳述式區塊或參數陳述式。 - 限制語言模式或 Data 區段中不允許超過 "{0}" 個字元的字串乘法結果。 + 受限語言模式或 Data 區段中不允許超過 "{0}" 個字元的字串乘法結果。 - 限制語言模式中或 Data 區段中不允許陣列相乘導致超過 {0} 個元素。 + 受限語言模式中或 Data 區段中不允許陣列相乘導致超過 {0} 個元素。 - 限制語言模式或 Data 區段中不允許點來源。 + 受限語言模式或 Data 區段中不允許點來源。 屬性引數必須是常數或指令碼區塊。 @@ -721,10 +721,10 @@ 雜湊常值中不允許使用 null 索引鍵。 - 限制語言模式或 Data 區段中不允許屬性。 + 受限語言模式或 Data 區段中不允許屬性。 - 限制語言模式或 Data 區段中不允許類型 {0}。 + 受限語言模式或 Data 區段中不允許類型 {0}。 '{0}' 是唯讀屬性。 @@ -784,7 +784,7 @@ 關鍵字 '{0}' 後面缺少陳述式主體。 - 限制語言模式或 Data 區段中不允許平行和循序區塊。 + 受限語言模式或 Data 區段中不允許平行和循序區塊。 未預期的關鍵字 '{0}'。 @@ -796,7 +796,7 @@ 無法叫用此方法。 - 無法將雜湊表轉換為下列類型的物件: {0}。限制語言模式中或 Data 區段不支援 Hashtable-to-Object 轉換。 + 無法將雜湊表轉換為下列類型的物件: {0}。受限語言模式中或 Data 區段不支援 Hashtable-to-Object 轉換。 引數必須是常數。 @@ -1338,31 +1338,31 @@ ModuleVersion: 要匯入的模組版本。如果使用這個參數,ModuleName 剖析器組態關鍵字 - 在 Constrained Language 模式中,不受信任的指令碼不允許使用 Configuration 關鍵字。 + 在限縮語言模式中,不受信任的指令碼不允許使用 Configuration 關鍵字。 剖析器類別關鍵字 - 在 Constrained Language 模式中,不受信任的指令碼不允許使用 Class 關鍵字。 + 在限縮語言模式中,不受信任的指令碼不允許使用 Class 關鍵字。 剖析器資料區段 SupportedCommand - 對於不受信任的指令碼,在 Constrained Language 模式中不允許包含 SupportedCommand 參數的 Data 區段。 + 對於不受信任的指令碼,在限縮語言模式中不允許包含 SupportedCommand 參數的 Data 區段。 模組範圍呼叫運算子 - 在 Constrained Language 模式中,模組範圍呼叫運算子將會被拒絕。 + 在限縮語言模式中,模組範圍呼叫運算子將會被拒絕。 ForEach 關鍵字方法呼叫 - 在 Constrained Language 模式中執行時,ForEach 關鍵字會使 '{0}' 反覆項目項目方法叫用失敗。 + 在限縮語言模式中執行時,ForEach 關鍵字會使 '{0}' 反覆項目項目方法叫用失敗。 運算式評估可能失敗 diff --git a/src/System.Management.Automation/resources/zh-Hant/RemotingErrorIdStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/RemotingErrorIdStrings.zh-Hant.resx index 002e6ad7b83..761ee376f6c 100644 --- a/src/System.Management.Automation/resources/zh-Hant/RemotingErrorIdStrings.zh-Hant.resx +++ b/src/System.Management.Automation/resources/zh-Hant/RemotingErrorIdStrings.zh-Hant.resx @@ -654,19 +654,19 @@ 必須同時指定 "{0}" 和 "{1}",或兩者都不指定。 - 找不到工作階段設定 "{0}"。 + 找不到工作階段組態 "{0}"。 - 工作階段設定 "{0}" 不是以 PowerShell 為基礎的殼層。 + 工作階段組態 "{0}" 不是以 PowerShell 為基礎的殼層。 - 工作階段設定 "{0}" 是以 PowerShell 為基礎的殼層。請使用 PowerShell 6+ 加以修改。 + 工作階段組態 "{0}" 是以 PowerShell 為基礎的殼層。請使用 PowerShell 6+ 加以修改。 - 工作階段設定 "{0}" 是以 Windows PowerShell 為基礎的殼層。請使用 Windows PowerShell 加以修改。 + 工作階段組態 "{0}" 是以 Windows PowerShell 為基礎的殼層。請使用 Windows PowerShell 加以修改。 - 沒有任何工作階段設定符合條件 "{0}"。 + 沒有任何工作階段組態符合條件 "{0}"。 {0} @@ -687,25 +687,25 @@ 無法將殼層設定資料寫入暫存檔案 {0}。失敗原因: {1}。 - 正在執行命令 "{0}" 以建立新工作階段設定。 + 正在執行命令 "{0}" 以建立新工作階段組態。 名稱: {0} SDDL: {1}。這可讓所選使用者從遠端在此電腦上執行 PowerShell 命令。 - 正在執行命令 "{0}" 以移除工作階段設定。 + 正在執行命令 "{0}" 以移除工作階段組態。 - 正在執行命令 "{0}" 以取得以 PowerShell 為基礎的工作階段設定。 + 正在執行命令 "{0}" 以取得以 PowerShell 為基礎的工作階段組態。 - 正在執行命令 "{0}" 以更新工作階段設定屬性。 + 正在執行命令 "{0}" 以更新工作階段組態屬性。 名稱: {0} SDDL: {1} - 正在執行命令 "{0}" 以啟用工作階段設定。 + 正在執行命令 "{0}" 以啟用工作階段組態。 WinRM 快速設定 @@ -727,13 +727,13 @@ 名稱: {0} SDDL: {1}。這可讓所選使用者從遠端在此電腦上執行 PowerShell 命令。 - 正在執行命令 "{0}" 以停用工作階段設定。 + 正在執行命令 "{0}" 以停用工作階段組態。 - 名稱: {0} SDDL: {1}。這會拒絕所有人存取此工作階段設定。 + 名稱: {0} SDDL: {1}。這會拒絕所有人存取此工作階段組態。 - 停用工作階段設定不會復原由 Enable-PSRemoting 或 Enable-PSSessionConfiguration Cmdlet 所做的所有變更。您可能必須依照下列步驟手動還原這些變更: + 停用工作階段組態不會復原由 Enable-PSRemoting 或 Enable-PSSessionConfiguration Cmdlet 所做的所有變更。您可能必須依照下列步驟手動還原這些變更: 1. 停止並停用 WinRM 服務。 2. 刪除接受任何 IP 位址上之要求的接聽程式。 3. 停用 WS-Management 通訊的防火牆例外。 @@ -755,10 +755,10 @@ 必須重新啟動 WinRM 服務,才能顯示 SecurityDescriptor 選取的 UI。重新啟動 WinRM 服務,然後執行下列命令: "{0}" - 正在註冊工作階段設定 + 正在註冊工作階段組態 - 找不到工作階段設定 "{0}"。正在執行命令 "{1}" 以建立 "{0}" 工作階段設定。執行此命令會重新啟動 WinRM 服務。 + 找不到工作階段組態 "{0}"。正在執行命令 "{1}" 以建立 "{0}" 工作階段組態。執行此命令會重新啟動 WinRM 服務。 不能同時指定 "{0}" 和 "{1}" 參數。請指定 "{0}" 或 "{1}" 參數。 @@ -940,7 +940,7 @@ {0} 如果最近已取消註冊使用此名稱的設定,可能需要重新啟動 WinRM 服務,因為某些系統資料結構可能仍在快取中。在那樣的情況下,可能需要重新啟動 WinRM。 -所有連線至 PowerShell 工作階段設定 (例如 Microsoft.PowerShell,以及使用 Register-PSSessionConfiguration Cmdlet 建立的工作階段設定) 的 WinRM 工作階段都會中斷連線。 +所有連線至 PowerShell 工作階段組態 (例如 Microsoft.PowerShell,以及使用 Register-PSSessionConfiguration Cmdlet 建立的工作階段組態) 的 WinRM 工作階段都會中斷連線。 您正在遠端工作階段中執行,且已選取 Force 選項,這表示 WinRM 服務可能會重新啟動。如果 WinRM 服務重新啟動,此遠端工作階段就會終止,而您需要建立新的工作階段才能繼續 @@ -967,7 +967,7 @@ 執行用戶端方法的遠端 Runspace 未指定用戶端電腦。 - 名稱: {0} SDDL: {1}。這會拒絕此工作階段設定的遠端存取權。 + 名稱: {0} SDDL: {1}。這會拒絕此工作階段組態的遠端存取權。 已啟用: False。這會將 WS-Management 服務設定為拒絕連線要求。 @@ -1012,13 +1012,13 @@ 用於唯一識別此文件的識別碼 - 此工作階段設定要套用的工作階段類型預設值。可以是 'RestrictedRemoteServer' (建議)、'Empty' 或 'Default' + 此工作階段組態要套用的工作階段類型預設值。可以是 'RestrictedRemoteServer' (建議)、'Empty' 或 'Default' - 放置此工作階段設定的工作階段文字記錄的目錄 + 放置此工作階段組態的工作階段文字記錄的目錄 - 是否要以電腦的 (虛擬) 系統管理員帳戶執行此工作階段設定 + 是否要以電腦的 (虛擬) 系統管理員帳戶執行此工作階段組態 套用到工作階段時要使用的語言模式。可以是 'NoLanguage'(建議)、'RestrictedLanguage'、'ConstrainedLanguage' 或 'FullLanguage' @@ -1078,7 +1078,7 @@ 'Roles' 項目必須是雜湊表,但實際上是 {0}。 - 無法將 '{0}' 角色項目的值轉換成雜湊表。'Roles' 項目必須是以群組名稱作為索引鍵的雜湊表,其中與每個索引鍵相關聯的值,都是該角色的工作階段設定屬性所構成的另一個雜湊表。 + 無法將 '{0}' 角色項目的值轉換成雜湊表。'Roles' 項目必須是以群組名稱作為索引鍵的雜湊表,其中與每個索引鍵相關聯的值,都是該角色的工作階段組態屬性所構成的另一個雜湊表。 找不到角色功能 '{0}'。角色功能必須是目前模組路徑中模組內 'RoleCapabilities' 目錄中的檔案 '{1}'。 @@ -1259,7 +1259,7 @@ -AutoRemoveJob 參數必須搭配 -Wait 參數使用 - WS-Management 服務無法處理該要求。在 {0} 電腦上的 WSMan: 磁碟機中找不到 {1} 工作階段設定。如需詳細資訊,請參閱 about_Remote_Troubleshooting 說明主題。 + WS-Management 服務無法處理該要求。在 {0} 電腦上的 WSMan: 磁碟機中找不到 {1} 工作階段組態。如需詳細資訊,請參閱 about_Remote_Troubleshooting 說明主題。 無法從 {0} 規格建立工作,因為所提供的 runspace 不是本機 runspace。請改用本機 runspace,或指定 RunspaceMode 引數。 @@ -1277,7 +1277,7 @@ {1} is a placeholder for the minimum allowed idletimeout value - 在工作階段設定檔中指定 "{2}"、"{3}"、"{4}" 或 "{5}" 索引鍵時,不能存在 Cmdlet "{0}" 或別名 "{1}"。 + 在工作階段組態檔中指定 "{2}"、"{3}"、"{4}" 或 "{5}" 索引鍵時,不能存在 Cmdlet "{0}" 或別名 "{1}"。 「傳輸選項無效。只有當參數 "{0}" 設定為 true 時,參數 "{1}" 才可以是非零值。」 @@ -1321,7 +1321,7 @@ 一或多個工作處於暫停或已中斷連線狀態,且沒有其他使用者輸入就無法繼續。 請指定 -Force 參數,以繼續並移至已完成、失敗或已停止狀態。 - 在 PowerShell 工作階段設定中啟用 RunAs 時,Windows 安全性模型無法在使用此端點建立的不同使用者工作階段之間強制執行安全性界限。請確認 PowerShell runspace 設定只限制為必要的 Cmdlet 和功能。 + 在 PowerShell 工作階段組態中啟用 RunAs 時,Windows 安全性模型無法在使用此端點建立的不同使用者工作階段之間強制執行安全性界限。請確認 PowerShell runspace 設定只限制為必要的 Cmdlet 和功能。 已透過新增 Force 參數成功暫停工作。 @@ -1330,7 +1330,7 @@ 工作階段組態檔 {0} 無效。請指定有效的工作階段組態檔,然後再試一次命令。剖析組態檔時發生錯誤: {1}。 - Register-PSSessionConfiguration: {1} 中的 '{0}' 索引鍵。工作階段設定檔包含無效的值。請更正檔案,然後再次執行命令。 + Register-PSSessionConfiguration: {1} 中的 '{0}' 索引鍵。工作階段組態檔包含無效的值。請更正檔案,然後再次執行命令。 只有在遠端電腦執行 PowerShell 3.0 或更新版本時,才支援中斷連線的工作階段。 @@ -1540,10 +1540,10 @@ 在伺服器模式中無法啟動具名管道伺服器。 - 無法將遠端存取權授與 '{0}':'{1}'。工作階段設定已登錄,但此群組沒有存取權。若要解決此錯誤,請提供有效的群組名稱,然後重新登錄工作階段設定。 + 無法將遠端存取權授與 '{0}':'{1}'。工作階段組態已登錄,但此群組沒有存取權。若要解決此錯誤,請提供有效的群組名稱,然後重新登錄工作階段組態。 - 無法取得工作階段設定 '{0}' 的工作階段功能:此設定未使用工作階段設定檔 (.pssc) 註冊,例如由 New-PSSessionConfigurationFile Cmdlet 建立的設定檔。 + 無法取得工作階段組態 '{0}' 的工作階段功能:此設定未使用工作階段組態檔 (.pssc) 註冊,例如由 New-PSSessionConfigurationFile Cmdlet 建立的設定檔。 無法解析使用者名稱 '{0}'。請確認使用者名稱,然後再試一次。 @@ -1606,10 +1606,10 @@ 無法建立工作階段使用者磁碟機,因為目前的使用者名稱包含無效的檔案路徑字元。 - 無效的角色功能金鑰: {0}。請確定角色功能名稱拼字正確,而且是有效的工作階段設定屬性。 + 無效的角色功能金鑰: {0}。請確定角色功能名稱拼字正確,而且是有效的工作階段組態屬性。 - 無效的角色功能金鑰類型: {0}。角色功能金鑰必須是可識別有效工作階段設定屬性的字串。 + 無效的角色功能金鑰類型: {0}。角色功能金鑰必須是可識別有效工作階段組態屬性的字串。 無效的角色金鑰類型: {0}。角色金鑰必須是可識別安全性群組的字串。 @@ -1709,13 +1709,13 @@ SSH 用戶端處理序在建立連線之前就已終止。 Create 的 Runspace 引數必須是非 Null 的 RemoteRunspace 物件。 - 工作階段設定雜湊表包含無效的索引鍵類型。索引鍵應為字串類型。 + 工作階段組態雜湊表包含無效的索引鍵類型。索引鍵應為字串類型。 - 工作階段設定檔包含不支援的組態選項: {0}。這是遠端端點設定選項,不適用於 PowerShell 工作階段狀態。 + 工作階段組態檔包含不支援的組態選項: {0}。這是遠端端點設定選項,不適用於 PowerShell 工作階段狀態。 - 工作階段設定檔包含未知的組態選項: {0}。 + 工作階段組態檔包含未知的組態選項: {0}。 運算式評估可能失敗 diff --git a/src/System.Management.Automation/resources/zh-Hant/RunspaceStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/RunspaceStrings.zh-Hant.resx index e0b84689972..dd1c5268eba 100644 --- a/src/System.Management.Automation/resources/zh-Hant/RunspaceStrings.zh-Hant.resx +++ b/src/System.Management.Automation/resources/zh-Hant/RunspaceStrings.zh-Hant.resx @@ -184,7 +184,7 @@ 工作階段忙碌中。工作階段一旦可供使用,您就會連線至該工作階段。若要取消 Enter-PSSession 命令,請按 Ctrl-C。 - 無法完成命令。此工作階段設定不支援指令碼叫用。如果工作階段設定處於無語言模式,就可能發生此情況。 + 無法完成命令。此工作階段組態不支援指令碼叫用。如果工作階段組態處於無語言模式,就可能發生此情況。 您無法在本機 Runspace 上使用 Disconnect 和 Connect 作業。 From cbf293eeb37b581d9e7ac34ed24300f2b75eca14 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 4 Nov 2026 17:07:28 -0800 Subject: [PATCH 08/19] Add `StrContains` for language modes used in resource strings (#28339) --- .../resources/AddTypeStrings.resx | 1 + .../resources/ImportLocalizedDataStrings.resx | 1 + .../resources/NewObjectStrings.resx | 2 + .../resources/UtilityCommonStrings.resx | 1 + .../resources/AutomationExceptions.resx | 3 +- .../resources/CommandBaseStrings.resx | 4 +- .../resources/ExtendedTypeSystem.resx | 2 + .../resources/InternalCommandStrings.resx | 7 +- .../resources/Metadata.resx | 3 +- .../resources/Modules.resx | 27 ++-- .../resources/ParameterBinderStrings.resx | 6 +- .../resources/ParserStrings.resx | 115 ++++++++++++------ .../resources/RemotingErrorIdStrings.resx | 4 +- .../resources/RunspaceStrings.resx | 3 +- .../resources/SecuritySupportStrings.resx | 1 + .../resources/SessionStateStrings.resx | 1 + 16 files changed, 126 insertions(+), 55 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/AddTypeStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/AddTypeStrings.resx index c0374e4d1d2..2cd9ce0c04a 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/AddTypeStrings.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/AddTypeStrings.resx @@ -155,5 +155,6 @@ Add-Type cmdlet will not be allowed in ConstrainedLanguage mode. + {StrContains="Add-Type"}{StrContains="ConstrainedLanguage"} diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/ImportLocalizedDataStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/ImportLocalizedDataStrings.resx index 8fc6474c99e..880b55fc6dd 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/ImportLocalizedDataStrings.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/ImportLocalizedDataStrings.resx @@ -148,5 +148,6 @@ Additional supported commands (via SupportedCommand parameter) will not be allowed in ConstrainedLanguage mode. + {StrContains="SupportedCommand"}{StrContains="ConstrainedLanguage"} diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/NewObjectStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/NewObjectStrings.resx index 3b8b8ab2371..7a06e28a282 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/NewObjectStrings.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/NewObjectStrings.resx @@ -152,11 +152,13 @@ The type '{0}' will not be created in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} New-Object Cmdlet COM Object Creation The COM object '{0}' will not be created in ConstrainedLanguage mode. + {StrContains="COM"}{StrContains="ConstrainedLanguage"} diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx index 3e7f0052592..f93f63e1c1b 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx +++ b/src/Microsoft.PowerShell.Commands.Utility/resources/UtilityCommonStrings.resx @@ -173,5 +173,6 @@ Invoke-Expression cmdlet script block will be run in ConstrainedLanguage mode. + {StrContains="Invoke-Expression"}{StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/AutomationExceptions.resx b/src/System.Management.Automation/resources/AutomationExceptions.resx index 9b48e92c0bc..0f13b9ef9da 100644 --- a/src/System.Management.Automation/resources/AutomationExceptions.resx +++ b/src/System.Management.Automation/resources/AutomationExceptions.resx @@ -205,6 +205,7 @@ Compiled Script Block Dot Source - Script block '{0}' invocation into current scope will be disallowed in Constrained Language mode. Script language mode: {1}, Context language mode: {2}. + Script block '{0}' invocation into current scope will be disallowed in ConstrainedLanguage mode. Script language mode: {1}, Context language mode: {2}. + {StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/CommandBaseStrings.resx b/src/System.Management.Automation/resources/CommandBaseStrings.resx index a5465c5b457..86038738eae 100644 --- a/src/System.Management.Automation/resources/CommandBaseStrings.resx +++ b/src/System.Management.Automation/resources/CommandBaseStrings.resx @@ -232,12 +232,14 @@ Reviewed by TArcher on 2010-07-20 Script Block Processing Dot-Source Check - Dot-Source processing for script block '{0}' will fail in Constrained Language mode because its language mode '{1}' does not match the current language mode '{2}'. + Dot-Source processing for script block '{0}' will fail in ConstrainedLanguage mode because its language mode '{1}' does not match the current language mode '{2}'. + {StrContains="ConstrainedLanguage"} Command Searcher Command '{0}' in module '{1}' is untrusted and will not be accessible in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/ExtendedTypeSystem.resx b/src/System.Management.Automation/resources/ExtendedTypeSystem.resx index 3ff5b77fab4..6c1c9cfec90 100644 --- a/src/System.Management.Automation/resources/ExtendedTypeSystem.resx +++ b/src/System.Management.Automation/resources/ExtendedTypeSystem.resx @@ -396,11 +396,13 @@ PS> [System.Collections.Generic.Comparer``1]::get_Default() Type conversion from HashTable to '{0}' will not be allowed in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} Extended Type System Hashtable Conversion Type conversion from '{0}' to '{1}' will not be allowed in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/InternalCommandStrings.resx b/src/System.Management.Automation/resources/InternalCommandStrings.resx index d368d449d20..de24aaf32c8 100644 --- a/src/System.Management.Automation/resources/InternalCommandStrings.resx +++ b/src/System.Management.Automation/resources/InternalCommandStrings.resx @@ -145,13 +145,15 @@ Input name "{0}" cannot be resolved to a method. - Cannot invoke a method in the restricted language mode. + Cannot invoke a method in the RestrictedLanguage mode. + {StrContains="RestrictedLanguage"} The -WhatIf and -Confirm parameters are not supported for script blocks. The '{0}' operation is not allowed in the RestrictedLanguage mode. + {StrContains="RestrictedLanguage"} An operator is required to compare the two specified values. Include a valid operator in the command, and then try the command again. For example, Get-Process | Where-Object -Property Name -eq Idle @@ -188,6 +190,7 @@ ErrorAction, WarningAction, InformationAction, PipelineVariable ForEach-Object Cmdlet - Method invocation on type '{0}' will not be allowed when run in Constrained Language mode. + Method invocation on type '{0}' will not be allowed when run in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} \ No newline at end of file diff --git a/src/System.Management.Automation/resources/Metadata.resx b/src/System.Management.Automation/resources/Metadata.resx index a9cdca1bc50..eab59300eb7 100644 --- a/src/System.Management.Automation/resources/Metadata.resx +++ b/src/System.Management.Automation/resources/Metadata.resx @@ -262,6 +262,7 @@ ValidateTrustedData Attribute Check Failure - The parameter argument '{0}' is not trusted and will fail the ValidateTrustedData parameter attribute check in Constrained Language mode. + The parameter argument '{0}' is not trusted and will fail the ValidateTrustedData parameter attribute check in ConstrainedLanguage mode. + {StrContains="ValidateTrustedData"}{StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/Modules.resx b/src/System.Management.Automation/resources/Modules.resx index 6319659f1a7..7f72989379a 100644 --- a/src/System.Management.Automation/resources/Modules.resx +++ b/src/System.Management.Automation/resources/Modules.resx @@ -626,6 +626,7 @@ Importing *.ps1 files as modules is not allowed in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} An error has occurred while loading script module {0} because it has a different language mode than the module manifest. The manifest language mode is {1} and the module language mode is {2}. Ensure all module files are signed or otherwise part of your application allow list configuration. @@ -638,6 +639,7 @@ Cannot create new module while the session is in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} Cannot find the built-in module '{0}' that is compatible with the 'Core' edition. Please make sure the PowerShell built-in modules are available. They usually come with the PowerShell package under the $PSHOME module path, and are required for PowerShell to function properly. @@ -646,42 +648,49 @@ Export-ModuleMember Cmdlet - Export of module members will fail in Constrained Language mode because module '{0}', has a language mode '{1}' that is different from the current session '{2}'. + Export of module members will fail in ConstrainedLanguage mode because module '{0}', has a language mode '{1}' that is different from the current session '{2}'. + {StrContains="ConstrainedLanguage"} Module Implicit Function Export - Implicit function export for module '{0}' will be denied because it is trusted (runs in Full Language mode) but the session is not trusted (runs in Constrained Language mode). It is best practice to always export module functions individually by full name. + Implicit function export for module '{0}' will be denied because it is trusted (runs in FullLanguage mode) but the session is not trusted (runs in ConstrainedLanguage mode). It is best practice to always export module functions individually by full name. + {StrContains="FullLanguage"}{StrContains="ConstrainedLanguage"} Importing Script File as Module Importing the script file '{0}' as a module will be disallowed in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} Module Contains Dot-Source Operator - Module '{0}' import will in fail Constrained Language mode because it exports functions using wildcard characters while also using the dot-source operator. + Module '{0}' import will in fail ConstrainedLanguage mode because it exports functions using wildcard characters while also using the dot-source operator. + {StrContains="ConstrainedLanguage"} - "Module Exporting Functions + Module Exporting Functions - Module '{0}' exports functions using name wildcard characters. Any nested module function names will be removed when running in Constrained Language mode. + Module '{0}' exports functions using name wildcard characters. Any nested module function names will be removed when running in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} - "New-Module Cmdlet + New-Module Cmdlet - A new module from an untrusted Constrained Language session will be blocked from providing the FullLanguage script block. + A new module from an untrusted ConstrainedLanguage session will be blocked from providing the FullLanguage script block. + {StrContains="ConstrainedLanguage"}{StrContains="FullLanguage"} - "Module Mismatched Language Modes + Module Mismatched Language Modes - A dependent module is being loaded that has a different language mode than the parent. This will be disallowed when in Constrained Language mode. + A dependent module is being loaded that has a different language mode than the parent. This will be disallowed when in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/ParameterBinderStrings.resx b/src/System.Management.Automation/resources/ParameterBinderStrings.resx index 23ee4865ff2..683cf3a9ade 100644 --- a/src/System.Management.Automation/resources/ParameterBinderStrings.resx +++ b/src/System.Management.Automation/resources/ParameterBinderStrings.resx @@ -250,12 +250,14 @@ Method or Property Invocation Not Allowed - Invocation of Method or Property '{0}' on type '{1}' will not be allowed in Constrained Language mode for untrusted scripts. + Invocation of Method or Property '{0}' on type '{1}' will not be allowed in ConstrainedLanguage mode for untrusted scripts. + {StrContains="ConstrainedLanguage"} Type Creation Not Allowed - Creation of Type '{0}' will not be allowed during parameter binding in Constrained Language mode for untrusted scripts. + Creation of Type '{0}' will not be allowed during parameter binding in ConstrainedLanguage mode for untrusted scripts. + {StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/ParserStrings.resx b/src/System.Management.Automation/resources/ParserStrings.resx index 680de71c01e..645697d5386 100644 --- a/src/System.Management.Automation/resources/ParserStrings.resx +++ b/src/System.Management.Automation/resources/ParserStrings.resx @@ -402,7 +402,8 @@ The correct form is: foreach ($a in $b) {...} Processing was stopped because the script is too complex. - The syntax is not supported by this runspace. This can occur if the runspace is in no-language mode. + The syntax is not supported by this runspace. This can occur if the runspace is in NoLanguage mode. + {StrContains="NoLanguage"} The combination of options with the -split operator is not valid. @@ -581,84 +582,111 @@ The correct form is: foreach ($a in $b) {...} The Data section is missing its statement block. + {StrContains="Data"} The "{0}" parameter of the Data section is not valid. The valid Data section parameter is SupportedCommand. + {StrContains="Data"}{StrContains="SupportedCommand"} - Array references are not allowed in restricted language mode or a Data section. + Array references are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Assignment statements are not allowed in restricted language mode or a Data section. + Assignment statements are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Redirection is not allowed in restricted language mode or a Data section. + Redirection is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The Do and While statements are not allowed in restricted language mode or a Data section. + The Do and While statements are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Do"}{StrContains="While"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - Expandable strings are not allowed in restricted language mode or a Data section. + Expandable strings are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The '{0}' operator is not allowed in restricted language mode or a Data section. + The '{0}' operator is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The Trap statement is not allowed in restricted language mode or a Data section. + The Trap statement is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Trap"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - The Try statement is not allowed in restricted language mode or a Data section. + The Try statement is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Try"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - Flow control statements such as Break, Continue, Return, Exit, and Throw are not allowed in restricted language mode or a Data section. + Flow control statements such as Break, Continue, Return, Exit, and Throw are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Break"}{StrContains="Continue"}{StrContains="Return"}{StrContains="Exit"}{StrContains="Throw"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - Foreach statements are not allowed in restricted language mode or a Data section. + Foreach statements are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Foreach"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - For and While statements are not allowed in restricted language mode or a Data section. + For and While statements are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="For"}{StrContains="While"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - Function declarations are not allowed in restricted language mode or a Data section. + Function declarations are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Function"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - Method calls are not allowed in restricted language mode or a Data section. + Method calls are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Parameter declarations are not allowed in restricted language mode or a Data section. + Parameter declarations are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Property references are not allowed in restricted language mode or a Data section. + Property references are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Script block literals are not allowed in restricted language mode or a Data section. + Script block literals are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The switch statement is not allowed in restricted language mode or a Data section. + The Switch statement is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Switch"}{StrContains="RestrictedLanguage"}{StrContains="Data"} - A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that can be referenced include the following: {0}. + A variable that cannot be referenced in RestrictedLanguage mode or a Data section is being referenced. Variables that can be referenced include the following: {0}. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The command '{0}' is not allowed in restricted language mode or a Data section. + The command '{0}' is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The data statement is not allowed in restricted language mode or another Data section. + The Data statement is not allowed in RestrictedLanguage mode or another Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} The SupportedCommand parameter of the Data section is missing a value. Supply a cmdlet or function name to the parameter. + {StrContains="SupportedCommand"}{StrContains="Data"} - A Begin statement block, Process statement block, or parameter statement is not allowed in a Data section. + A Begin statement block, Process statement block, or Param statement is not allowed in a Data section. + {StrContains="Begin"}{StrContains="Process"}{StrContains="Param"}{StrContains="Data"} - String multiplication results with more than "{0}" characters are not allowed in restricted language mode or a Data section. + String multiplication results with more than "{0}" characters are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Array multiplication resulting in more than {0} elements is not allowed in restricted language mode or a Data section. + Array multiplication resulting in more than {0} elements is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - Dot sourcing is not allowed in restricted language mode or a Data section. + Dot sourcing is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} Attribute argument must be a constant or a script block. @@ -721,10 +749,12 @@ The correct form is: foreach ($a in $b) {...} A null key is not allowed in a hash literal. - Attributes are not allowed in restricted language mode or a Data section. + Attributes are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} - The type {0} is not allowed in restricted language mode or a Data section. + The type {0} is not allowed in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} '{0}' is a ReadOnly property. @@ -784,7 +814,8 @@ The correct form is: foreach ($a in $b) {...} Missing statement body after keyword '{0}'. - Parallel and sequence blocks are not allowed in restricted language mode or a Data section. + Parallel and Sequence blocks are not allowed in RestrictedLanguage mode or a Data section. + {StrContains="Parallel"}{StrContains="Sequence"}{StrContains="RestrictedLanguage"}{StrContains="Data"} Unexpected keyword '{0}'. @@ -796,7 +827,8 @@ The correct form is: foreach ($a in $b) {...} The method cannot be invoked. - Cannot convert hashtable to an object of the following type: {0}. Hashtable-to-Object conversion is not supported in restricted language mode or a Data section. + Cannot convert hashtable to an object of the following type: {0}. Hashtable-to-Object conversion is not supported in RestrictedLanguage mode or a Data section. + {StrContains="RestrictedLanguage"}{StrContains="Data"} Argument must be constant. @@ -842,7 +874,8 @@ The correct form is: foreach ($a in $b) {...} The schema file {0} was not found. Verify that any modules specified in a configuration statement contain a schema.mof file, and then try running the script again. - Cannot define data section. Definition of additional supported commands is not supported in this language mode. + Cannot define Data section. Definition of additional supported commands is not supported in this language mode. + {StrContains="Data"} Missing '{' in configuration statement. @@ -935,7 +968,8 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent Unable to load resource '{0}': Resource not found. - Configuration keyword is not allowed in constrainedLanguage mode. + Configuration keyword is not allowed in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} The configuration name '{0}' is not valid. Standard names may only contain letters (a-z, A-Z), numbers (0-9), period (.), hyphen (-) and underscore (_). The name may not be null or empty, and should start with a letter. @@ -1321,6 +1355,7 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent Class keyword is not allowed in ConstrainedLanguage mode. + {StrContains="Class"}{StrContains="ConstrainedLanguage"} Missing ':' in the ternary expression. @@ -1338,37 +1373,43 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent Parser Configuration Keyword - The Configuration keyword will not be allowed in Constrained Language mode for untrusted script. + The Configuration keyword will not be allowed in ConstrainedLanguage mode for untrusted script. + {StrContains="Configuration"}{StrContains="ConstrainedLanguage"} Parser Class Keyword - The Class keyword will not be allowed in Constrained Language mode for untrusted script. + The Class keyword will not be allowed in ConstrainedLanguage mode for untrusted script. + {StrContains="Class"}{StrContains="ConstrainedLanguage"} Parser Data Section SupportedCommand - The Data Section that includes the SupportedCommand parameter would be disallowed in Constrained Language mode for untrusted script. + The Data section that includes the SupportedCommand parameter would be disallowed in ConstrainedLanguage mode for untrusted script. + {StrContains="Data"}{StrContains="SupportedCommand"}{StrContains="ConstrainedLanguage"} Module Scope Call Operator - The module scope call operator will be denied in Constrained Language mode. + The module scope call operator will be denied in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} ForEach Keyword Method Invocation - The ForEach keyword will fail '{0}' iteration item method invocation when run in Constrained Language mode. + The ForEach keyword will fail '{0}' iteration item method invocation when run in ConstrainedLanguage mode. + {StrContains="ForEach"}{StrContains="ConstrainedLanguage"} Expression Evaluation May Fail - Creating a steppable pipeline from a script block may require evaluating some expressions within the script block. The expression evaluation will silently fail and return 'null' in Constrained Language mode, unless the expression represents a constant value. + Creating a steppable pipeline from a script block may require evaluating some expressions within the script block. The expression evaluation will silently fail and return 'null' in ConstrainedLanguage mode, unless the expression represents a constant value. + {StrContains="ConstrainedLanguage"} Configuration keyword is not supported on ARM64 processors. diff --git a/src/System.Management.Automation/resources/RemotingErrorIdStrings.resx b/src/System.Management.Automation/resources/RemotingErrorIdStrings.resx index 029a7b47b6e..5809d413683 100644 --- a/src/System.Management.Automation/resources/RemotingErrorIdStrings.resx +++ b/src/System.Management.Automation/resources/RemotingErrorIdStrings.resx @@ -1022,6 +1022,7 @@ All WinRM sessions connected to PowerShell session configurations, such as Micro Language mode to apply when applied to a session. Can be 'NoLanguage' (recommended), 'RestrictedLanguage', 'ConstrainedLanguage', or 'FullLanguage' + {StrContains="NoLanguage"}{StrContains="RestrictedLanguage"}{StrContains="ConstrainedLanguage"}{StrContains="FullLanguage"} Modules to import when applied to a session @@ -1721,7 +1722,8 @@ SSH client process terminated before connection could be established. Expression Evaluation May Fail - Creating a PowerShell object from a script block may require evaluating some expressions within the script block. The expression evaluation will silently fail and return 'null' in Constrained Language mode, unless the expression represents a constant value. + Creating a PowerShell object from a script block may require evaluating some expressions within the script block. The expression evaluation will silently fail and return 'null' in ConstrainedLanguage mode, unless the expression represents a constant value. + {StrContains="ConstrainedLanguage"} Failed to get Hyper-V VM State. The value was of the type {0} but was expected to be Microsoft.HyperV.PowerShell.VMState or System.String. diff --git a/src/System.Management.Automation/resources/RunspaceStrings.resx b/src/System.Management.Automation/resources/RunspaceStrings.resx index e44f2d7a202..9a6093e3615 100644 --- a/src/System.Management.Automation/resources/RunspaceStrings.resx +++ b/src/System.Management.Automation/resources/RunspaceStrings.resx @@ -184,7 +184,8 @@ The session is busy. You will be connected to the session as soon as it is available. To cancel the Enter-PSSession command, press Ctrl-C. - The command cannot be completed. Script invocation is not supported in this session configuration. This can occur if the session configuration is in no-language mode. + The command cannot be completed. Script invocation is not supported in this session configuration. This can occur if the session configuration is in NoLanguage mode. + {StrContains="NoLanguage"} You cannot use Disconnect and Connect operations on local runspaces. diff --git a/src/System.Management.Automation/resources/SecuritySupportStrings.resx b/src/System.Management.Automation/resources/SecuritySupportStrings.resx index c8ad9f45ef6..cdb6ab6b535 100644 --- a/src/System.Management.Automation/resources/SecuritySupportStrings.resx +++ b/src/System.Management.Automation/resources/SecuritySupportStrings.resx @@ -164,5 +164,6 @@ Script file '{0}' is not trusted by policy and will run in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} diff --git a/src/System.Management.Automation/resources/SessionStateStrings.resx b/src/System.Management.Automation/resources/SessionStateStrings.resx index b106f073d7f..27d3505d36f 100644 --- a/src/System.Management.Automation/resources/SessionStateStrings.resx +++ b/src/System.Management.Automation/resources/SessionStateStrings.resx @@ -653,5 +653,6 @@ Changing or creating the variable '{0}' scope to AllScope will be prevented in ConstrainedLanguage mode. + {StrContains="ConstrainedLanguage"} From 778c6d75353b39505b8c55a8e483bf0078abe1f5 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Wed, 4 Nov 2026 17:37:26 -0800 Subject: [PATCH 09/19] Add ability to consume PowerShell modules from internal feed (#28326) --- .pipelines/MSIXBundle-vPack-Official.yml | 6 + ...Shell-Coordinated_Packages-NonOfficial.yml | 6 + .../PowerShell-Packages-NonOfficial.yml | 6 + .../PowerShell-Release-NonOfficial.yml | 6 + .../PowerShell-vPack-NonOfficial.yml | 6 + ...werShell-Coordinated_Packages-Official.yml | 6 + .pipelines/PowerShell-Packages-Official.yml | 6 + .pipelines/PowerShell-Release-Official.yml | 6 + .pipelines/PowerShell-vPack-Official.yml | 6 + .pipelines/apiscan-gen-notice.yml | 6 + .../templates/insert-nuget-config-azfeed.yml | 54 +++---- build.psm1 | 27 +++- docs/building/internals.md | 27 ++++ test/infrastructure/NugetConfig.Tests.ps1 | 152 ++++++++++++++++++ 14 files changed, 285 insertions(+), 35 deletions(-) create mode 100644 test/infrastructure/NugetConfig.Tests.ps1 diff --git a/.pipelines/MSIXBundle-vPack-Official.yml b/.pipelines/MSIXBundle-vPack-Official.yml index 420a96c3017..ee16e1c00c9 100644 --- a/.pipelines/MSIXBundle-vPack-Official.yml +++ b/.pipelines/MSIXBundle-vPack-Official.yml @@ -2,6 +2,10 @@ trigger: none pr: none parameters: # parameters are shown up in ADO UI in a build queue time +- name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: 'createVPack' displayName: 'Create and Submit VPack' type: boolean @@ -46,6 +50,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: msixbundle_vPack_$(Build.SourceBranchName)_Prod.True_Create.${{ parameters.createVPack }}_$(date:yyyyMMdd).$(rev:rr) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - name: CDP_DEFINITION_BUILD_COUNT value: $[counter('', 0)] - name: system.debug diff --git a/.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml b/.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml index 353e2f6e854..387b28f72e2 100644 --- a/.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml +++ b/.pipelines/NonOfficial/PowerShell-Coordinated_Packages-NonOfficial.yml @@ -1,6 +1,10 @@ trigger: none parameters: + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: InternalSDKBlobURL displayName: URL to the blob having internal .NET SDK type: string @@ -65,6 +69,8 @@ resources: ref: refs/heads/main variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: /.pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml@self parameters: InternalSDKBlobURL: ${{ parameters.InternalSDKBlobURL }} diff --git a/.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml b/.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml index aa42fb19dac..3dfbcf39974 100644 --- a/.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml +++ b/.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml @@ -1,6 +1,10 @@ trigger: none parameters: # parameters are shown up in ADO UI in a build queue time + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: ForceAzureBlobDelete displayName: Delete Azure Blob type: string @@ -51,6 +55,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: pkgs-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: /.pipelines/templates/variables/PowerShell-Packages-Variables.yml@self parameters: debug: ${{ parameters.debug }} diff --git a/.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml b/.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml index c2d71b7a633..8ca1990013e 100644 --- a/.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml +++ b/.pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml @@ -1,6 +1,10 @@ trigger: none parameters: # parameters are shown up in ADO UI in a build queue time + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: 'debug' displayName: 'Enable debug output' type: boolean @@ -52,6 +56,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: release-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: /.pipelines/templates/variables/PowerShell-Release-Variables.yml@self parameters: debug: ${{ parameters.debug }} diff --git a/.pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml b/.pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml index 071db02cff8..3f2918fcacb 100644 --- a/.pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml +++ b/.pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml @@ -1,6 +1,10 @@ trigger: none parameters: # parameters are shown up in ADO UI in a build queue time +- name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: 'createVPack' displayName: 'Create and Submit VPack' type: boolean @@ -33,6 +37,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: vPack_$(Build.SourceBranchName)_NonOfficial_Create.${{ parameters.createVPack }}_Name.${{ parameters.vPackName}}_$(date:yyyyMMdd).$(rev:rr) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: /.pipelines/templates/variables/PowerShell-vPack-Variables.yml@self parameters: debug: ${{ parameters.debug }} diff --git a/.pipelines/PowerShell-Coordinated_Packages-Official.yml b/.pipelines/PowerShell-Coordinated_Packages-Official.yml index 9fb94c4c208..4ca05df5d5b 100644 --- a/.pipelines/PowerShell-Coordinated_Packages-Official.yml +++ b/.pipelines/PowerShell-Coordinated_Packages-Official.yml @@ -1,6 +1,10 @@ trigger: none parameters: + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: InternalSDKBlobURL displayName: URL to the blob having internal .NET SDK type: string @@ -65,6 +69,8 @@ resources: ref: refs/heads/main variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: templates/variables/PowerShell-Coordinated_Packages-Variables.yml parameters: InternalSDKBlobURL: ${{ parameters.InternalSDKBlobURL }} diff --git a/.pipelines/PowerShell-Packages-Official.yml b/.pipelines/PowerShell-Packages-Official.yml index d8223676e81..efe0f0501dd 100644 --- a/.pipelines/PowerShell-Packages-Official.yml +++ b/.pipelines/PowerShell-Packages-Official.yml @@ -1,6 +1,10 @@ trigger: none parameters: # parameters are shown up in ADO UI in a build queue time + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: ForceAzureBlobDelete displayName: Delete Azure Blob type: string @@ -51,6 +55,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: pkgs-$(BUILD.SOURCEBRANCHNAME)-prod-$(Build.BuildId) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: templates/variables/PowerShell-Packages-Variables.yml parameters: debug: ${{ parameters.debug }} diff --git a/.pipelines/PowerShell-Release-Official.yml b/.pipelines/PowerShell-Release-Official.yml index 10ad7f7677a..4b0472475b7 100644 --- a/.pipelines/PowerShell-Release-Official.yml +++ b/.pipelines/PowerShell-Release-Official.yml @@ -1,6 +1,10 @@ trigger: none parameters: # parameters are shown up in ADO UI in a build queue time + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: 'debug' displayName: 'Enable debug output' type: boolean @@ -52,6 +56,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: release-$(BUILD.SOURCEBRANCHNAME)-prod-$(Build.BuildId) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: templates/variables/PowerShell-Release-Variables.yml parameters: debug: ${{ parameters.debug }} diff --git a/.pipelines/PowerShell-vPack-Official.yml b/.pipelines/PowerShell-vPack-Official.yml index 8afdf11eef6..07f142f22b5 100644 --- a/.pipelines/PowerShell-vPack-Official.yml +++ b/.pipelines/PowerShell-vPack-Official.yml @@ -1,6 +1,10 @@ trigger: none parameters: # parameters are shown up in ADO UI in a build queue time +- name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: 'createVPack' displayName: 'Create and Submit VPack' type: boolean @@ -53,6 +57,8 @@ parameters: # parameters are shown up in ADO UI in a build queue time name: vPack_$(Build.SourceBranchName)_Prod_Create.${{ parameters.createVPack }}_Name.${{ parameters.vPackName}}_$(date:yyyyMMdd).$(rev:rr) variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} - template: templates/variables/PowerShell-vPack-Variables.yml parameters: debug: ${{ parameters.debug }} diff --git a/.pipelines/apiscan-gen-notice.yml b/.pipelines/apiscan-gen-notice.yml index 63786ada233..d9cacbf0097 100644 --- a/.pipelines/apiscan-gen-notice.yml +++ b/.pipelines/apiscan-gen-notice.yml @@ -4,6 +4,10 @@ name: apiscan-genNotice-$(BUILD.SOURCEBRANCHNAME)-$(Build.BuildId) trigger: none parameters: + - name: UseEarlyAccessModules + displayName: Use early-access modules + type: boolean + default: false - name: IsEarlyAccess type: boolean default: false @@ -30,6 +34,8 @@ parameters: default: false variables: + - name: UseEarlyAccessModules + value: ${{ parameters.UseEarlyAccessModules }} # PAT permissions NOTE: Declare a SymbolServerPAT variable in this group with a 'microsoft' organizanization scoped PAT with 'Symbols' Read permission. # A PAT in the wrong org will give a single Error 203. No PAT will give a single Error 401, and individual pdbs may be missing even if permissions are correct. - group: symbols diff --git a/.pipelines/templates/insert-nuget-config-azfeed.yml b/.pipelines/templates/insert-nuget-config-azfeed.yml index e724acb8659..131b396463c 100644 --- a/.pipelines/templates/insert-nuget-config-azfeed.yml +++ b/.pipelines/templates/insert-nuget-config-azfeed.yml @@ -17,18 +17,19 @@ steps: Import-Module ${{ parameters.repoRoot }}/build.psm1 -Force $earlyAccess = $env:ISEARLYACCESS -eq 'true' + $useEarlyAccessModules = $env:USEEARLYACCESSMODULES -eq 'true' Write-Verbose -Verbose "Is Early access: $earlyAccess" if (-not $earlyAccess) { Write-Verbose -Verbose "Running: Switch-PSNugetConfig -Source Private -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)'" - Switch-PSNugetConfig -Source Private -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)' + Switch-PSNugetConfig -Source Private -UseEarlyAccessModules:$useEarlyAccessModules -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)' } else { Write-Verbose -Verbose "Running: Switch-PSNugetConfig -Source EarlyAccess (using Azure DevOps feed credentials from pipeline variables)" - Switch-PSNugetConfig -Source EarlyAccess -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)' + Switch-PSNugetConfig -Source EarlyAccess -UseEarlyAccessModules:$useEarlyAccessModules -UserName '$(AzDevopsFeedUserNameKVPAT)' -ClearTextPAT '$(powershellPackageReadPat)' } if(-not (Test-Path $configPath)) @@ -41,7 +42,7 @@ steps: throw } displayName: 'Switch to production Azure DevOps feed for all nuget.configs' - condition: and(succeededOrFailed(), ne(variables['UseAzDevOpsFeed'], '')) + condition: and(succeededOrFailed(), or(ne(variables['UseAzDevOpsFeed'], ''), eq(variables['UseEarlyAccessModules'], 'true'))) env: NugetConfigDir: ${{ parameters.repoRoot }}/src/Modules ob_restore_phase: ${{ parameters.ob_restore_phase }} @@ -63,40 +64,37 @@ steps: Write-Host "##vso[task.setsecret]$azt" Write-Verbose -Verbose "Setting up Azure Artifacts Credential Provider token" - $earlyAccessFeed = '$(EARLY_ACCESS_FEED)' - $ADORepoUri = switch ($earlyAccessFeed) { + $powerShellRepoUri = 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v3/index.json' + $endpointCredentials = @( + @{ + endpoint = $powerShellRepoUri + username = '$(AzDevopsFeedUserNameKVPAT)' + password = '$(powershellPackageReadPat)' + } + ) + + if ($env:ISEARLYACCESS -eq 'true') { + $earlyAccessFeed = '$(EARLY_ACCESS_FEED)' + $ADORepoUri = switch ($earlyAccessFeed) { 'net8' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-8-early-access/nuget/v3/index.json' } 'net9' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-9-early-access/nuget/v3/index.json' } 'net10' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-10-early-access/nuget/v3/index.json' } 'net11' { 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-net-11-early-access/nuget/v3/index.json' } default { throw "Unknown early access feed URL: $earlyAccessFeed" } } - $powerShellRepoUri = 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v3/index.json' - - Write-Verbose -Verbose "ADORepoUri == $ADORepoUri" - - if ([string]::IsNullOrEmpty($ADORepoUri) -eq $false) - { - $endpointCredsObj = @{ endpointCredentials = @( - @{ endpoint = $ADORepoUri; password = $azt } - @{ - endpoint = $powerShellRepoUri - username = '$(AzDevopsFeedUserNameKVPAT)' - password = '$(powershellPackageReadPat)' - } - )} - $VSS_NUGET_EXTERNAL_FEED_ENDPOINTS = $endpointCredsObj | ConvertTo-Json -Compress - - Write-Verbose -Verbose "Setting VSS_NUGET_EXTERNAL_FEED_ENDPOINTS environment variable" - - Write-Host "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS;issecret=true]$VSS_NUGET_EXTERNAL_FEED_ENDPOINTS" + $endpointCredentials += @{ endpoint = $ADORepoUri; password = $azt } } - else - { - Write-Verbose -Verbose "EARLY_ACCESS_FEED_URL is not set" + + if ($env:USEEARLYACCESSMODULES -eq 'true') { + $moduleEarlyAccessRepoUri = 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json' + $endpointCredentials += @{ endpoint = $moduleEarlyAccessRepoUri; password = $azt } } + + $endpointCredsObj = @{ endpointCredentials = $endpointCredentials } + $VSS_NUGET_EXTERNAL_FEED_ENDPOINTS = $endpointCredsObj | ConvertTo-Json -Compress + Write-Host "##vso[task.setvariable variable=VSS_NUGET_EXTERNAL_FEED_ENDPOINTS;issecret=true]$VSS_NUGET_EXTERNAL_FEED_ENDPOINTS" displayName: 'Setup Azure Artifacts Credential Provider secret' - condition: eq(variables['ISEARLYACCESS'], 'true') + condition: and(succeeded(), or(eq(variables['ISEARLYACCESS'], 'true'), eq(variables['UseEarlyAccessModules'], 'true'))) env: ob_restore_phase: ${{ parameters.ob_restore_phase }} diff --git a/build.psm1 b/build.psm1 index 4e8bcd602db..99fa5981190 100644 --- a/build.psm1 +++ b/build.psm1 @@ -900,13 +900,17 @@ Fix steps: function Switch-PSNugetConfig { <# .SYNOPSIS - Switches the NuGet configuration between public, private, and NuGet.org-only sources. + Switches the NuGet configuration between public, private, NuGet.org-only, and early-access sources. .DESCRIPTION Regenerates nuget.config files in the repository root, src/Modules, and test/tools/Modules to point to the specified feed source. Optionally stores authenticated credentials. .PARAMETER Source The feed set to activate: 'Public' (nuget.org + dotnet feed), 'Private' (PowerShell ADO - feed), or 'NuGetOnly' (nuget.org only). + feed), 'NuGetOnly' (nuget.org only), or 'EarlyAccess' (.NET early-access + feed, with the PowerShell feed for released modules). + .PARAMETER UseEarlyAccessModules + Adds the internal module early-access feed for bundled modules independently + of the .NET feed selected by Source. .PARAMETER UserName Username for authenticated private feed access. .PARAMETER ClearTextPAT @@ -922,7 +926,9 @@ function Switch-PSNugetConfig { [string] $UserName, [Parameter(Mandatory = $true, ParameterSetName = 'user')] - [string] $ClearTextPAT + [string] $ClearTextPAT, + + [switch] $UseEarlyAccessModules ) Clear-PipelineNugetAuthentication @@ -938,19 +944,18 @@ function Switch-PSNugetConfig { $dotnetSdk = [NugetPackageSource] @{Url = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v2'; Name = 'dotnet' } $gallery = [NugetPackageSource] @{Url = 'https://www.powershellgallery.com/api/v2/'; Name = 'psgallery' } $nugetorg = [NugetPackageSource] @{Url = 'https://api.nuget.org/v3/index.json'; Name = 'nuget.org' } + $moduleSource = $gallery if ( $Source -eq 'Public') { New-NugetConfigFile -NugetPackageSource $nugetorg, $dotnetSdk -Destination "$PSScriptRoot/" @extraParams - New-NugetConfigFile -NugetPackageSource $gallery -Destination "$PSScriptRoot/src/Modules/" @extraParams New-NugetConfigFile -NugetPackageSource $gallery -Destination "$PSScriptRoot/test/tools/Modules/" @extraParams } elseif ( $Source -eq 'NuGetOnly') { New-NugetConfigFile -NugetPackageSource $nugetorg -Destination "$PSScriptRoot/" @extraParams - New-NugetConfigFile -NugetPackageSource $gallery -Destination "$PSScriptRoot/src/Modules/" @extraParams New-NugetConfigFile -NugetPackageSource $gallery -Destination "$PSScriptRoot/test/tools/Modules/" @extraParams } elseif ( $Source -eq 'Private') { $powerShellPackages = [NugetPackageSource] @{Url = 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v3/index.json'; Name = 'powershell' } + $moduleSource = $powerShellPackages New-NugetConfigFile -NugetPackageSource $powerShellPackages -Destination "$PSScriptRoot/" @extraParams - New-NugetConfigFile -NugetPackageSource $powerShellPackages -Destination "$PSScriptRoot/src/Modules/" @extraParams New-NugetConfigFile -NugetPackageSource $powerShellPackages -Destination "$PSScriptRoot/test/tools/Modules/" @extraParams } elseif ($Source -eq 'EarlyAccess') { $earlyAccess = $env:EARLY_ACCESS_FEED @@ -967,14 +972,22 @@ function Switch-PSNugetConfig { $earlyAccessFeed = [NugetPackageSource] @{Url = $earlyAccessFeedUrl; Name = 'earlyaccess' } $powerShellPackages = [NugetPackageSource] @{Url = 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v3/index.json'; Name = 'powershell' } + $moduleSource = $powerShellPackages New-NugetConfigFile -NugetPackageSource $earlyAccessFeed -Destination "$PSScriptRoot/" - New-NugetConfigFile -NugetPackageSource $powerShellPackages -Destination "$PSScriptRoot/src/Modules/" @extraParams New-NugetConfigFile -NugetPackageSource $powerShellPackages -Destination "$PSScriptRoot/test/tools/Modules/" @extraParams } else { throw "Unknown source: $Source" } + if ($UseEarlyAccessModules) { + $moduleEarlyAccessFeed = [NugetPackageSource] @{Url = 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json'; Name = 'module-earlyaccess' } + # Credentials for moduleSource are registered by the test module configuration above. + New-NugetConfigFile -NugetPackageSource $moduleEarlyAccessFeed, $moduleSource -Destination "$PSScriptRoot/src/Modules/" + } else { + New-NugetConfigFile -NugetPackageSource $moduleSource -Destination "$PSScriptRoot/src/Modules/" @extraParams + } + if ($UserName -or $ClearTextPAT) { Set-PipelineNugetAuthentication } diff --git a/docs/building/internals.md b/docs/building/internals.md index 2f55b6eb762..0d3c0f7dcbf 100644 --- a/docs/building/internals.md +++ b/docs/building/internals.md @@ -28,6 +28,33 @@ it should be listed as a dependency for `$Top` folder (`src\powershell-unix` or ## Preliminary steps +### Bundled modules and early-access feeds + +The package references in [`PSGalleryModules.csproj`](../../src/Modules/PSGalleryModules.csproj) +select the bundled module versions. Their restore sources are configured in +[`src/Modules/nuget.config`](../../src/Modules/nuget.config), not in the project file. + +`Switch-PSNugetConfig -Source Private -UseEarlyAccessModules` enables the +`powershell-module-earlyaccess` Azure Artifacts feed alongside the existing PowerShell +feed for released modules. The `UseEarlyAccessModules` switch is independent of +the .NET feed selected by `Source` and can be used with any source mode. +Without the switch, bundled modules use only the normal module source. +For public source modes, the normal module source is PowerShell Gallery. +Update a module's package-reference version to consume an internal version. +Internal versions should be distinct from released versions because NuGet caches packages by ID and version. + +In Azure Pipelines, enable the `UseEarlyAccessModules` build parameter (default: `false`). +This does not require `IsEarlyAccess`, `EARLY_ACCESS_FEED`, or an early-access .NET SDK. +The flags can also be enabled together. The shared +[`insert-nuget-config-azfeed.yml`](../../.pipelines/templates/insert-nuget-config-azfeed.yml) +template installs the Azure Artifacts Credential Provider and supplies an Azure DevOps +access token through the secret `VSS_NUGET_EXTERNAL_FEED_ENDPOINTS` variable. +The `powershell-net-early-access` service connection identity must have read access +to the module feed. The existing PowerShell feed continues to use its separate PAT. +For local restores, install the Azure Artifacts Credential Provider and use +`Restore-PSPackage -ProjectDirs .\src\Modules -PSModule -Force -InteractiveAuth` +with an identity that has read access to both feeds. + ### ResGen Until the .NET CLI `dotnet-resgen` tool supports the generation of strongly typed resource access classes diff --git a/test/infrastructure/NugetConfig.Tests.ps1 b/test/infrastructure/NugetConfig.Tests.ps1 new file mode 100644 index 00000000000..e5542bb9357 --- /dev/null +++ b/test/infrastructure/NugetConfig.Tests.ps1 @@ -0,0 +1,152 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +Describe 'Early-access module feeds' { + BeforeAll { + Import-Module "$PSScriptRoot\..\..\build.psm1" -Force + $script:originalEarlyAccessFeed = $env:EARLY_ACCESS_FEED + $script:moduleFeed = 'https://pkgs.dev.azure.com/powershell-rel/PowerShell/_packaging/powershell-module-earlyaccess/nuget/v3/index.json' + $script:powerShellFeed = 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShell/nuget/v3/index.json' + } + + Describe 'Early-access pipeline authentication' { + BeforeAll { + $template = Get-Content "$PSScriptRoot\..\..\.pipelines\templates\insert-nuget-config-azfeed.yml" -Raw + $inlineMatch = [regex]::Match($template, '(?ms) inlineScript: \|\r?\n(?