diff --git a/.github/actions/infrastructure/path-filters/action.yml b/.github/actions/infrastructure/path-filters/action.yml
index b50384f698d..18e78e9a2fd 100644
--- a/.github/actions/infrastructure/path-filters/action.yml
+++ b/.github/actions/infrastructure/path-filters/action.yml
@@ -112,6 +112,9 @@ runs:
const globalConfigChanged = files.some(file => file === '.globalconfig' || file === 'nuget.config' || file === 'global.json');
console.log(`✓ Global config changed: ${globalConfigChanged}`);
+ const localizationConfigChanged = files.some(file => file === 'Localize/LocProject.json');
+ console.log(`✓ Localization config changed: ${localizationConfigChanged}`);
+
const packagingChanged = files.some(file =>
file === '.github/workflows/windows-ci.yml' ||
file === '.github/workflows/linux-ci.yml' ||
@@ -128,7 +131,7 @@ runs:
toolsCiPsm1Changed;
console.log(`→ Packaging changed: ${packagingChanged}`);
- const source = mainSourceChanged || toolsChanged || githubChanged || propsChanged || testsChanged || globalConfigChanged;
+ const source = mainSourceChanged || toolsChanged || githubChanged || propsChanged || testsChanged || globalConfigChanged || localizationConfigChanged;
console.log(`→ Source (composite): ${source}`);
core.endGroup();
diff --git a/.github/actions/test/windows/action.yml b/.github/actions/test/windows/action.yml
index ddc5da4d664..7e858d8e835 100644
--- a/.github/actions/test/windows/action.yml
+++ b/.github/actions/test/windows/action.yml
@@ -70,7 +70,7 @@ runs:
Set-GWVariable -Name "DSC_ROOT" -Value $dscRoot
- name: Bootstrap
- shell: powershell
+ shell: pwsh
run: |-
Import-Module ./build.psm1
Write-LogGroupStart -Title 'Bootstrap'
diff --git a/.github/workflows/analyze-reusable.yml b/.github/workflows/analyze-reusable.yml
index aca43b54ca9..194e911ea75 100644
--- a/.github/workflows/analyze-reusable.yml
+++ b/.github/workflows/analyze-reusable.yml
@@ -37,17 +37,17 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: '0'
- - uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
+ - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: ./global.json
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
+ uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -74,4 +74,4 @@ jobs:
shell: pwsh
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
+ uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2
diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml
index d78e745a4a9..7ebd1165f95 100644
--- a/.github/workflows/copilot-setup-steps.yml
+++ b/.github/workflows/copilot-setup-steps.yml
@@ -25,7 +25,7 @@ jobs:
# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index 5f159650425..f05db538031 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: 'Dependency Review'
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
+ uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
\ No newline at end of file
diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml
index 27ceac59bbd..18d254c0e84 100644
--- a/.github/workflows/labels.yml
+++ b/.github/workflows/labels.yml
@@ -18,11 +18,11 @@ jobs:
steps:
- name: Check out the repository
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify PR has label starting with 'cl-'
id: verify-labels
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
+ uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const labels = context.payload.pull_request.labels.map(label => label.name.toLowerCase());
diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml
index b09ecd78cbe..cf229f51c56 100644
--- a/.github/workflows/linux-ci.yml
+++ b/.github/workflows/linux-ci.yml
@@ -59,7 +59,7 @@ jobs:
packagingChanged: ${{ steps.filter.outputs.packagingChanged }}
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
@@ -78,7 +78,7 @@ jobs:
contents: read
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check for merge conflict markers
uses: "./.github/actions/infrastructure/merge-conflict-checker"
@@ -90,7 +90,7 @@ jobs:
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
@@ -105,7 +105,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Linux Unelevated CI
@@ -123,7 +123,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Linux Elevated CI
@@ -141,7 +141,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Linux Unelevated Others
@@ -159,7 +159,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Linux Elevated Others
@@ -183,7 +183,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
@@ -240,7 +240,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Linux Packaging
@@ -259,6 +259,6 @@ jobs:
- infrastructure_tests
# - analyze
if: always()
- uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@c8b3ad5819ad7078f3e375519b4f8c6232d1cbdf # v1.0.0
+ uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@e051ddbdb7865c0a505ce3bf3b2b7abdb50f79d3 # v1.0.0
with:
- needs_context: ${{ toJson(needs) }}
+ needs_context: ${{ toJson(needs) }}
\ No newline at end of file
diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml
index c9fee06a1be..d661252c21e 100644
--- a/.github/workflows/macos-ci.yml
+++ b/.github/workflows/macos-ci.yml
@@ -59,7 +59,7 @@ jobs:
packagingChanged: ${{ steps.filter.outputs.packagingChanged }}
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Change Detection
id: filter
@@ -74,7 +74,7 @@ jobs:
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.buildModuleChanged == 'true' }}
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Build
@@ -88,7 +88,7 @@ jobs:
runs-on: macos-15-large
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: macOS Unelevated CI
@@ -106,7 +106,7 @@ jobs:
runs-on: macos-15-large
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: macOS Elevated CI
@@ -124,7 +124,7 @@ jobs:
runs-on: macos-15-large
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: macOS Unelevated Others
@@ -142,7 +142,7 @@ jobs:
runs-on: macos-15-large
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: macOS Elevated Others
@@ -169,10 +169,10 @@ jobs:
- macos-15-large
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- - uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
+ - uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: ./global.json
- name: Bootstrap packaging
@@ -231,7 +231,7 @@ jobs:
testResultsFolder: "${{ runner.workspace }}/testResults"
- name: Upload package artifact
if: always()
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: macos-package
path: "*.pkg"
@@ -245,6 +245,6 @@ jobs:
- macos_test_unelevated_ci
- macos_test_unelevated_others
if: always()
- uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@c8b3ad5819ad7078f3e375519b4f8c6232d1cbdf # v1.0.0
+ uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@e051ddbdb7865c0a505ce3bf3b2b7abdb50f79d3 # v1.0.0
with:
needs_context: ${{ toJson(needs) }}
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 44378b60b74..76ef3c8ff61 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -32,12 +32,12 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: "Run analysis"
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
+ uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
@@ -59,7 +59,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
@@ -67,6 +67,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
+ uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v3.29.5
with:
sarif_file: results.sarif
\ No newline at end of file
diff --git a/.github/workflows/verify-markdown-links.yml b/.github/workflows/verify-markdown-links.yml
index 3a10b96fc1a..2bec7558eec 100644
--- a/.github/workflows/verify-markdown-links.yml
+++ b/.github/workflows/verify-markdown-links.yml
@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify markdown links
id: verify
diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml
index 9af06f98c41..0783b3f2ac4 100644
--- a/.github/workflows/windows-ci.yml
+++ b/.github/workflows/windows-ci.yml
@@ -62,7 +62,7 @@ jobs:
packagingChanged: ${{ steps.filter.outputs.packagingChanged }}
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Change Detection
id: filter
@@ -77,7 +77,7 @@ jobs:
runs-on: windows-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Build
@@ -91,7 +91,7 @@ jobs:
runs-on: windows-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Windows Unelevated CI
@@ -109,7 +109,7 @@ jobs:
runs-on: windows-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Windows Elevated CI
@@ -127,7 +127,7 @@ jobs:
runs-on: windows-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Windows Unelevated Others
@@ -145,7 +145,7 @@ jobs:
runs-on: windows-latest
steps:
- name: checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Windows Elevated Others
@@ -191,6 +191,6 @@ jobs:
- analyze
- windows_packaging
if: always()
- uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@c8b3ad5819ad7078f3e375519b4f8c6232d1cbdf # v1.0.0
+ uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@e051ddbdb7865c0a505ce3bf3b2b7abdb50f79d3 # v1.0.0
with:
needs_context: ${{ toJson(needs) }}
diff --git a/.github/workflows/windows-packaging-reusable.yml b/.github/workflows/windows-packaging-reusable.yml
index 8d0255d4443..4e589ab7f0e 100644
--- a/.github/workflows/windows-packaging-reusable.yml
+++ b/.github/workflows/windows-packaging-reusable.yml
@@ -39,7 +39,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
@@ -64,7 +64,7 @@ jobs:
shell: pwsh
- name: Setup .NET
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
+ uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: ./global.json
@@ -84,7 +84,7 @@ jobs:
- name: Upload Build Artifacts
if: always()
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: windows-packaging-${{ matrix.architecture }}-${{ matrix.channel }}
path: |
diff --git a/.github/workflows/xunit-tests.yml b/.github/workflows/xunit-tests.yml
index c643917edd0..b9238370289 100644
--- a/.github/workflows/xunit-tests.yml
+++ b/.github/workflows/xunit-tests.yml
@@ -23,12 +23,12 @@ jobs:
runs-on: ${{ inputs.runner_os }}
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1000
- name: Setup .NET
- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
+ uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: ./global.json
@@ -49,7 +49,7 @@ jobs:
Write-Host "Completed xUnit test run."
- name: Upload xUnit results
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: ${{ inputs.test_results_artifact_name }}
diff --git a/.pipelines/store/PDP/PDP-Media/en-US/.gitkeep b/.pipelines/store/PDP/PDP-Media/en-US/.gitkeep
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/.pipelines/store/PDPs/PDP/cs/PDP.xml b/.pipelines/store/PDPs/PDP/cs/PDP.xml
new file mode 100644
index 00000000000..18cf01a1552
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/cs/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ Terminál
+
+ Příkazový řádek
+
+ Automatizace
+
+ Automatizace úloh
+
+ Skriptování
+
+
+ PowerShell je prostředí příkazového řádku a skriptovací jazyk založený na platformě .NET se zaměřením na úlohy. PowerShell pomáhá správcům systému a pokročilým uživatelům rychle automatizovat úlohy, které spravují operační systémy (Linux, macOS a Windows) a procesy.
+
+Příkazy PowerShellu umožňují spravovat počítače z příkazového řádku. Zprostředkovatelé PowerShellu umožňují přístup k úložištím dat, jako jsou registr a úložiště certifikátů, stejně snadno jako k systému souborů. PowerShell obsahuje pokročilý analyzátor výrazů a plnohodnotný skriptovací jazyk.
+
+PowerShell je opensourcový. Viz https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Verze: ___VERSION___
+
+Protokol změn: ___CHANGELOGLINK___
+
+
+
+ Interaktivní prostředí
+
+ Skriptovací jazyk
+
+ Vzdálená správa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/de/PDP.xml b/.pipelines/store/PDPs/PDP/de/PDP.xml
new file mode 100644
index 00000000000..58a6e4f3678
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/de/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ Terminal
+
+ Befehlszeile
+
+ Automatisierung
+
+ Aufgabenautomatisierung
+
+ Skripterstellung
+
+
+ PowerShell ist eine aufgabenbasierte Befehlszeilenshell und Skriptsprache, die auf .NET basiert. PowerShell unterstützt Systemadministratoren und Power-User bei der schnellen Automatisierung von Aufgaben zur Verwaltung von Betriebssystemen (Linux, macOS und Windows) und Prozessen.
+
+Mit PowerShell-Befehlen können Sie Computer über die Befehlszeile verwalten. Mit PowerShell-Anbietern können Sie genauso einfach auf Datenspeicher wie die Registrierung und den Zertifikatspeicher zugreifen wie auf das Dateisystem. PowerShell enthält einen umfangreichen Ausdrucksparser und eine vollständig entwickelte Skriptsprache.
+
+PowerShell ist Open Source. https://github.com/powershell/powershell anzeigen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Version: ___VERSION___
+
+Änderungsprotokoll: ___CHANGELOGLINK___
+
+
+
+ Interaktive Shell
+
+ Skriptsprache
+
+ Remoteverwaltung
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDP/PDP/en-US/PDP.xml b/.pipelines/store/PDPs/PDP/en-US/PDP.xml
similarity index 80%
rename from .pipelines/store/PDP/PDP/en-US/PDP.xml
rename to .pipelines/store/PDPs/PDP/en-US/PDP.xml
index ce36a3677f7..552009ec271 100644
--- a/.pipelines/store/PDP/PDP/en-US/PDP.xml
+++ b/.pipelines/store/PDPs/PDP/en-US/PDP.xml
@@ -1,12 +1,5 @@
-
-
-
-
-
-
-
@@ -51,23 +44,9 @@ PowerShell is Open Source. See https://github.com/powershell/powershell
- Please see our GitHub releases page for additional details.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Version: ___VERSION___
+
+Changelog: ___CHANGELOGLINK___
diff --git a/.pipelines/store/PDPs/PDP/es/PDP.xml b/.pipelines/store/PDPs/PDP/es/PDP.xml
new file mode 100644
index 00000000000..63432f9c800
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/es/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ Terminal
+
+ Línea de comandos
+
+ Automatización
+
+ Automatización de tareas
+
+ Scripting
+
+
+ PowerShell es un shell de línea de comandos basado en tareas y un lenguaje de scripting basado en .NET. PowerShell ayuda a los administradores de sistemas y a los usuarios avanzados a automatizar rápidamente las tareas que administran los sistemas operativos (Linux, macOS y Windows) y los procesos.
+
+Los comandos de PowerShell le permiten administrar equipos desde la línea de comandos. Los proveedores de PowerShell le permiten acceder a los almacenes de datos, como el registro y el almacén de certificados, con la misma facilidad con la que accede al sistema de archivos. PowerShell incluye un analizador de expresiones enriquecido y un lenguaje de scripting completamente desarrollado.
+
+PowerShell es de código abierto. Ver https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Versión: ___VERSION___
+
+Registro de cambios: ___CHANGELOGLINK___
+
+
+
+ Shell interactivo
+
+ Lenguaje de scripting
+
+ Administración remota
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/fr/PDP.xml b/.pipelines/store/PDPs/PDP/fr/PDP.xml
new file mode 100644
index 00000000000..c3015b3965c
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/fr/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ Terminal
+
+ Ligne de commande
+
+ Automation
+
+ Automatisation des tâches
+
+ Script
+
+
+ PowerShell est un shell de ligne de commande basé sur des tâches et un langage de script basé sur .NET. PowerShell aide les administrateurs système et les utilisateurs avancés à automatiser rapidement les tâches de gestion des systèmes d’exploitation (Linux, macOS et Windows) et des processus.
+
+Les commandes PowerShell vous permettent de gérer des ordinateurs à partir de la ligne de commande. Les fournisseurs PowerShell vous permettent d’accéder aux magasins de données, tels que le registre et le magasin de certificats, aussi facilement que vous accédez au système de fichiers. PowerShell comprend un analyseur d’expressions enrichi et un langage de script entièrement développé.
+
+PowerShell est open source. Voir https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Version : ___VERSION___
+
+Journal des modifications : ___CHANGELOGLINK___
+
+
+
+ Shell interactif
+
+ Langage de script
+
+ Gestion à distance
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/it/PDP.xml b/.pipelines/store/PDPs/PDP/it/PDP.xml
new file mode 100644
index 00000000000..c40e933112c
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/it/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ Terminale
+
+ Riga di comando
+
+ Automazione
+
+ Automazione delle attività
+
+ Scripting
+
+
+ PowerShell è una shell da riga di comando basata su attività e un linguaggio di scripting basato su .NET. PowerShell consente agli amministratori di sistema e agli utenti esperti di automatizzare rapidamente le attività di gestione dei sistemi operativi (Linux, macOS e Windows) e dei processi.
+
+I comandi di PowerShell consentono di gestire i computer dalla riga di comando. I provider di PowerShell consentono di accedere agli archivi dati, ad esempio l'archivio certificati e del Registro di sistema, con la stessa facilità con cui si accede al file system. PowerShell include un parser di espressioni avanzate e un linguaggio di scripting completamente sviluppato.
+
+PowerShell è open source. Vedi https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Versione: ___VERSION___
+
+Log delle modifiche: ___CHANGELOGLINK___
+
+
+
+ Shell interattiva
+
+ Linguaggio di scripting
+
+ Gestione remota
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/ja/PDP.xml b/.pipelines/store/PDPs/PDP/ja/PDP.xml
new file mode 100644
index 00000000000..40bc3cb66d1
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/ja/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ シェル
+
+ PowerShell
+
+ ターミナル
+
+ コマンド ライン
+
+ 自動化
+
+ タスクの自動化
+
+ スクリプト
+
+
+ PowerShell は、.NET 上に構築されたタスクベースのコマンドライン シェルおよびスクリプト言語です。 PowerShell は、システム管理者とパワー ユーザーがオペレーティング システム (Linux、macOS、Windows) とプロセスを管理するタスクを迅速に自動化するのに役立ちます。
+
+PowerShell コマンドを使用すると、コマンド ラインからコンピューターを管理できます。 PowerShell プロバイダーを使用すると、レジストリや証明書ストアなどのデータ ストアに、ファイル システムにアクセスするのと同じくらい簡単にアクセスできます。 PowerShell には、豊富な式パーサーと完全に開発されたスクリプト言語が含まれています。
+
+PowerShell はオープン ソースです。 https://github.com/powershell/powershell を表示
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ バージョン: ___VERSION___
+
+変更ログ: ___CHANGELOGLINK___
+
+
+
+ 対話型シェル
+
+ スクリプト言語
+
+ リモート管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/ko/PDP.xml b/.pipelines/store/PDPs/PDP/ko/PDP.xml
new file mode 100644
index 00000000000..b5be262bd92
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/ko/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ 셸
+
+ PowerShell
+
+ 터미널
+
+ 명령줄
+
+ 자동화
+
+ 작업 자동화
+
+ 스크립팅
+
+
+ PowerShell은 .NET에서 구축된 작업 기반 명령줄 셸 및 스크립팅 언어입니다. PowerShell을 사용하면 시스템 관리자와 전원 사용자가 운영 체제(Linux, macOS 및 Windows) 및 프로세스를 관리하는 작업을 신속하게 자동화할 수 있습니다.
+
+PowerShell 명령을 사용하면 명령줄에서 컴퓨터를 관리할 수 있습니다. PowerShell 공급자는 파일 시스템에 액세스하는 것처럼 쉽게, 레지스트리 및 인증서 저장소와 같은 데이터 저장소에 액세스하도록 지원합니다. PowerShell에는 강력한 식 구문 분석기와 완성도 높은 스크립팅 언어가 포함되어 있습니다.
+
+PowerShell이 오픈 소스로 제공됨. See https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 버전: ___VERSION___
+
+변경 로그: ___CHANGELOGLINK___
+
+
+
+ 대화형 셸
+
+ 스크립트 언어
+
+ 원격 관리
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/pl/PDP.xml b/.pipelines/store/PDPs/PDP/pl/PDP.xml
new file mode 100644
index 00000000000..6cefcba1a65
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/pl/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Powłoka
+
+ PowerShell
+
+ Terminal
+
+ Wiersz polecenia
+
+ Automatyzacja
+
+ Automatyzacja zadań
+
+ Obsługa skryptów
+
+
+ Technologia PowerShell to zadaniowa powłoka wiersza polecenia i język skryptowy oparte na platformie .NET. Technologia PowerShell pomaga administratorom systemów i zaawansowanym użytkownikom szybko automatyzować zadania związane z zarządzaniem systemami operacyjnymi (Linux, macOS i Windows) oraz procesami.
+
+Polecenia PowerShell pozwalają zarządzać komputerami z poziomiu wiersza polecenia. Dostawcy PowerShell umożliwiają dostęp do magazynów danych, takich jak rejestr i magazyn certyfikatów, tak samo łatwo jak do systemu plików. PowerShell zawiera rozbudowany parser wyrażeń i w pełni rozwinięty język skryptowy.
+
+PowerShell jest oprogramowaniem open source. Zobacz https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wersja: ___VERSION___
+
+Dziennik zmian: ___CHANGELOGLINK___
+
+
+
+ Interaktywna powłoka
+
+ Język skryptowy
+
+ Zarządzanie zdalne
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/pt-BR/PDP.xml b/.pipelines/store/PDPs/PDP/pt-BR/PDP.xml
new file mode 100644
index 00000000000..d9db72e2a13
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/pt-BR/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Interpretador de comandos
+
+ PowerShell
+
+ Terminal
+
+ Linha de Comando
+
+ Automação
+
+ Automação de Tarefas
+
+ Scripts
+
+
+ PowerShell é um shell de linha de comando baseado em tarefas e uma linguagem de script criada no .NET. O PowerShell ajuda administradores de sistemas e usuários avançados a automatizar rapidamente tarefas que gerenciam sistemas operacionais (Linux, macOS e Windows) e processos.
+
+Os comandos do PowerShell permitem gerenciar computadores pela linha de comando. Os provedores do PowerShell permitem acessar repositórios de dados, como o Registro e o repositório de certificados, com a mesma facilidade com que você acessa o sistema de arquivos. O PowerShell inclui um avançado analisador de expressões e uma linguagem de script totalmente desenvolvida.
+
+O PowerShell é de código aberto. Confira https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Versão: ___VERSION___
+
+Log de Mudanças: ___CHANGELOGLINK___
+
+
+
+ Shell Interativo
+
+ Linguagem de Script
+
+ Gerenciamento Remoto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/ru/PDP.xml b/.pipelines/store/PDPs/PDP/ru/PDP.xml
new file mode 100644
index 00000000000..83db95c169a
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/ru/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Оболочка
+
+ PowerShell
+
+ Терминал
+
+ Командная строка
+
+ Служба автоматизации
+
+ Автоматизация задач
+
+ Создание скрипта
+
+
+ PowerShell — это оболочка командной строки с поддержкой задач и язык скриптов на основе .NET. PowerShell позволяет системным администраторам и опытным пользователям быстро автоматизировать задачи для управления процессами и операционными системами (Linux, macOS и Windows).
+
+Команды PowerShell позволяют управлять компьютерами из командной строки. При использовании поставщиков PowerShell доступ к хранилищам данных, таким как реестр и хранилище сертификатов, становится таким же простым, как и доступ к файловой системе. PowerShell включает многофункциональное средство синтаксического анализа выражений и полностью разработанный язык скриптов.
+
+PowerShell использует открытый код. См. https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Версия: ___VERSION___
+
+Журнал изменений: ___CHANGELOGLINK___
+
+
+
+ Интерактивная оболочка
+
+ Язык сценариев
+
+ Удаленное управление
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Корпорация Майкрософт
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/tr/PDP.xml b/.pipelines/store/PDPs/PDP/tr/PDP.xml
new file mode 100644
index 00000000000..de56e5e004a
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/tr/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Kabuk
+
+ Windows PowerShell
+
+ Terminal
+
+ Komut Satırı
+
+ Otomasyon
+
+ Görev Otomasyonu
+
+ Betik Yazma
+
+
+ Windows PowerShell, .NET üzerine oluşturulmuş görev tabanlı bir komut satırı kabuğu ve betik dilidir. Windows PowerShell, sistem yöneticilerinin ve ileri düzey kullanıcıların işletim sistemlerini (Linux, macOS ve Windows) ve süreçleri yöneten görevleri hızla otomatikleştirmelerine yardımcı olur.
+
+Windows PowerShell komutları, bilgisayarları komut satırından yönetmenizi sağlar. Windows PowerShell sağlayıcıları, kayıt defteri ve sertifika deposu gibi veri depolarına, dosya sistemine eriştiğiniz kadar kolay erişmenizi sağlar. Windows PowerShell, zengin bir ifade ayrıştırıcısı ve tam gelişmiş bir betik dili içerir.
+
+Windows PowerShell Açık Kaynaktır. Daha fazla bilgi için https://github.com/powershell/powershell adresine bakın
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sürüm: ___VERSION___
+
+Değişiklik günlüğü: ___CHANGELOGLINK___
+
+
+
+ Etkileşimli Kabuk
+
+ Betik Dili
+
+ Uzaktan Yönetim
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/zh-Hans/PDP.xml b/.pipelines/store/PDPs/PDP/zh-Hans/PDP.xml
new file mode 100644
index 00000000000..a4a55358d55
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/zh-Hans/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ 终端
+
+ 命令行
+
+ 自动化
+
+ 任务自动化
+
+ 脚本
+
+
+ PowerShell 是基于 .NET 构建的基于任务的命令行 shell 和脚本语言。 PowerShell 可帮助系统管理员和高级用户快速自动执行用于管理操作系统(Linux、macOS 和 Windows)和进程的任务。
+
+使用 PowerShell 命令,可以通过命令行管理计算机。 借助 PowerShell 提供程序,可以访问像访问文件系统一样方便地访问数据存储(如注册表和证书存储)。 PowerShell 具有丰富的表达式分析器和充分开发的脚本语言。
+
+PowerShell 是开放源代码。 请参阅 https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 版本: ___VERSION___
+
+更改日志: ___CHANGELOGLINK___
+
+
+
+ 交互式 Shell
+
+ 脚本语言
+
+ 远程管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/PDPs/PDP/zh-Hant/PDP.xml b/.pipelines/store/PDPs/PDP/zh-Hant/PDP.xml
new file mode 100644
index 00000000000..f2f2bf8dfdf
--- /dev/null
+++ b/.pipelines/store/PDPs/PDP/zh-Hant/PDP.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+ Shell
+
+ PowerShell
+
+ 終端機
+
+ 命令列
+
+ 自動化
+
+ 工作自動化
+
+ 指令碼處理
+
+
+ PowerShell 是工作型命令列殼層與指令碼語言,並建置在 .NET 之上。 PowerShell 可協助系統管理員與進階使用者快速地將管理作業系統 (Linux、macOS 與 Windows) 與處理序的工作自動化。
+
+PowerShell 命令可讓您從命令列管理電腦。 PowerShell 提供者可讓您如同存取檔案系統般輕易地存取資料存放區 (例如登錄與憑證存放區)。 PowerShell 包含豐富的運算式剖析器與完整開發的指令碼語言。
+
+PowerShell 是開放原始碼。 請參閱 https://github.com/powershell/powershell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 版本: ___VERSION___
+
+變更記錄:___CHANGELOGLINK___
+
+
+
+ 互動式殼層
+
+ 指令碼語言
+
+ 遠端管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Corporation
+
+
+
+
+ https://github.com/PowerShell/PowerShell
+
+ https://github.com/PowerShell/PowerShell/issues
+
+ https://go.microsoft.com/fwlink/?LinkID=521839
+
diff --git a/.pipelines/store/SBConfig.json b/.pipelines/store/SBConfig.json
index a52d60b045f..e6c8d543772 100644
--- a/.pipelines/store/SBConfig.json
+++ b/.pipelines/store/SBConfig.json
@@ -14,8 +14,6 @@
"qps-ploca",
"qps-plocm"
],
- "MediaRootPath": "",
- "MediaFallbackLanguage": "en-US",
"PackagePath": [],
"OutPath": "",
"OutName": "",
diff --git a/.pipelines/templates/mac-package-build.yml b/.pipelines/templates/mac-package-build.yml
index 89dab90aa04..bc80c1c0e6d 100644
--- a/.pipelines/templates/mac-package-build.yml
+++ b/.pipelines/templates/mac-package-build.yml
@@ -1,6 +1,7 @@
parameters:
parentJob: ''
buildArchitecture: x64
+ OfficialBuild: true
jobs:
- job: package_macOS_${{ parameters.buildArchitecture }}
@@ -78,12 +79,13 @@ jobs:
continueOnError: true
- pwsh: |
- $signedDir = "$(Pipeline.Workspace)/CoOrdinatedBuildPipeline/drop_macos_sign_${{ parameters.buildArchitecture }}/Signed-${{ parameters.buildArchitecture }}"
- Get-ChildItem $signedDir -Recurse -Include 'pwsh', '*.dylib' | ForEach-Object {
- codesign --verify --deep --strict --verbose=4 $_.FullName
- if ($LASTEXITCODE -ne 0) { throw "codesign verification failed for $($_.FullName)" }
+ $signatureParameters = @{
+ Path = "$(Pipeline.Workspace)/CoOrdinatedBuildPipeline/drop_macos_sign_${{ parameters.buildArchitecture }}/Signed-${{ parameters.buildArchitecture }}"
+ OfficialBuild = [System.Convert]::ToBoolean('${{ parameters.OfficialBuild }}')
+ EntitlementsPath = "$(Build.SourcesDirectory)/assets/macos-entitlements.plist"
}
- displayName: 'Verify Apple codesign on signed binaries'
+ & "$(Build.SourcesDirectory)/tools/packaging/Update-MacOSCodeSignature.ps1" @signatureParameters
+ displayName: 'Apply and verify Apple codesign on signed binaries'
- pwsh: |
# Add -SkipReleaseChecks as a mitigation to unblock release.
diff --git a/.pipelines/templates/mac.yml b/.pipelines/templates/mac.yml
index d1efd0c72bc..1af45eb76c2 100644
--- a/.pipelines/templates/mac.yml
+++ b/.pipelines/templates/mac.yml
@@ -190,21 +190,51 @@ jobs:
- pwsh: |
$signedDir = "$(ob_outputDirectory)/Signed-$(Runtime)"
- $expected = 'Developer ID Application: Microsoft Corporation'
+ $officialBuild = [System.Convert]::ToBoolean('$(ps_official_build)')
+ $officialSignature = 'Developer ID Application: Microsoft Corporation'
+ $codeDirectoryMagic = [byte[]](0xfa, 0xde, 0x0c, 0x02)
$missing = @()
Get-ChildItem $signedDir -Recurse -Include 'pwsh', '*.dylib' | ForEach-Object {
$bytes = [System.IO.File]::ReadAllBytes($_.FullName)
$text = [System.Text.Encoding]::Latin1.GetString($bytes)
- if (-not $text.Contains($expected)) {
+ $hasOfficialSignature = $text.Contains($officialSignature)
+ $hasAdHocSignature = $false
+
+ if (-not $officialBuild -and -not $hasOfficialSignature) {
+ # The package stage runs codesign --verify; here the Windows signing job
+ # verifies that unofficial output contains an ad-hoc CodeDirectory.
+ for ($offset = 0; $offset -le $bytes.Length - 16; $offset++) {
+ if ($bytes[$offset] -eq $codeDirectoryMagic[0] -and
+ $bytes[$offset + 1] -eq $codeDirectoryMagic[1] -and
+ $bytes[$offset + 2] -eq $codeDirectoryMagic[2] -and
+ $bytes[$offset + 3] -eq $codeDirectoryMagic[3] -and
+ ($bytes[$offset + 15] -band 0x02) -ne 0) {
+ $hasAdHocSignature = $true
+ break
+ }
+ }
+ }
+
+ if (-not $hasOfficialSignature -and ($officialBuild -or -not $hasAdHocSignature)) {
$missing += $_.FullName
- Write-Host "##[error]Missing '$expected' signature in $($_.FullName)"
+ $expectedSignature = if ($officialBuild) {
+ "'$officialSignature'"
+ } else {
+ 'a Developer ID signature or ad-hoc CodeDirectory'
+ }
+ Write-Host "##[error]Missing $expectedSignature in $($_.FullName)"
} else {
- Write-Host "OK: $($_.FullName)"
+ $signatureDescription = if ($hasOfficialSignature) {
+ 'a Developer ID signature'
+ } else {
+ 'an ad-hoc CodeDirectory'
+ }
+ Write-Host "OK: $($_.FullName) contains $signatureDescription"
}
}
if ($missing.Count -gt 0) {
- throw "ESRP did not apply a Developer ID signature to $($missing.Count) file(s): $($missing -join ', ')"
+ throw "The expected Apple signature was not found in $($missing.Count) file(s): $($missing -join ', ')"
}
- displayName: 'Verify Developer ID signature on Mach-O binaries'
+ displayName: 'Verify Apple signature on Mach-O binaries'
- template: /.pipelines/templates/step/finalize.yml@self
diff --git a/.pipelines/templates/package-store-package.yml b/.pipelines/templates/package-store-package.yml
index 4ee2098332e..978629cef78 100644
--- a/.pipelines/templates/package-store-package.yml
+++ b/.pipelines/templates/package-store-package.yml
@@ -57,19 +57,16 @@ jobs:
# Define app configurations for each channel
$channelConfigs = @{
'LTS' = @{
- AppStoreName = 'PowerShell-LTS'
ProductId = '$(productId-LTS)'
AppId = '$(AppID-LTS)'
ServiceEndpoint = "StoreAppPublish-Stable"
}
'Stable' = @{
- AppStoreName = 'PowerShell'
ProductId = '$(productId-Stable)'
AppId = '$(AppID-Stable)'
ServiceEndpoint = "StoreAppPublish-Stable"
}
'Preview' = @{
- AppStoreName = 'PowerShell (Preview)'
ProductId = '$(productId-Preview)'
AppId = '$(AppID-Preview)'
ServiceEndpoint = "StoreAppPublish-Preview"
@@ -100,36 +97,8 @@ jobs:
$config = $channelConfigs[$currentChannel]
Write-Verbose -Verbose "Selected channel: $currentChannel"
- Write-Verbose -Verbose "App Store Name: $($config.AppStoreName)"
Write-Verbose -Verbose "Product ID: $($config.ProductId)"
- # Update PDP.xml file
- $pdpPath = '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP/en-US/PDP.xml'
- if (Test-Path $pdpPath) {
- Write-Verbose -Verbose "Updating PDP file: $pdpPath"
-
- [xml]$pdpXml = Get-Content $pdpPath -Raw
-
- # Create namespace manager for XML with default namespace
- $nsManager = New-Object System.Xml.XmlNamespaceManager($pdpXml.NameTable)
- $nsManager.AddNamespace("pd", "http://schemas.microsoft.com/appx/2012/ProductDescription")
-
- $appStoreNameElement = $pdpXml.SelectSingleNode("//pd:AppStoreName", $nsManager)
- if ($appStoreNameElement) {
- $appStoreNameElement.SetAttribute("_locID", $config.AppStoreName)
- Write-Verbose -Verbose "Updated AppStoreName _locID to: $($config.AppStoreName)"
- } else {
- Write-Warning "AppStoreName element not found in PDP file"
- }
-
- $pdpXml.Save($pdpPath)
- Write-Verbose -Verbose "PDP file updated successfully"
- Get-Content -Path $pdpPath | Write-Verbose -Verbose
- } else {
- Write-Error "PDP file not found: $pdpPath"
- exit 1
- }
-
# Update SBConfig.json file
$sbConfigPath = '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/SBConfig.json'
if (Test-Path $sbConfigPath) {
@@ -190,7 +159,7 @@ jobs:
Write-Verbose -Verbose "Variables set successfully"
name: UpdateConfigs
- displayName: Update PDPs and SBConfig.json
+ displayName: Update SBConfig.json and Store Variables
- pwsh: |
Write-Verbose -Verbose "Checking variables after UpdateConfigs:"
@@ -208,8 +177,9 @@ jobs:
sourceFolder: '$(StoreBundleDir)'
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
- pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
- pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
+ pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/PDP'
+ # StoreBroker v3 requires a media root with a PDP root, even when the PDP has no media.
+ pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/PDP'
- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
displayName: 'Create StoreBroker Package (Stable/LTS)'
@@ -220,8 +190,9 @@ jobs:
sourceFolder: '$(StoreBundleDir)'
contents: '*.msixBundle'
outSBName: 'PowerShellStorePackage'
- pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP'
- pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDP/PDP-Media'
+ pdpPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/PDP'
+ # StoreBroker v3 requires a media root with a PDP root, even when the PDP has no media.
+ pdpMediaPath: '$(System.DefaultWorkingDirectory)/PowerShell/.pipelines/store/PDPs/PDP'
- pwsh: |
$outputDirectory = "$(ob_outputDirectory)"
diff --git a/.pipelines/templates/release-MSIX-Publish.yml b/.pipelines/templates/release-MSIX-Publish.yml
index a68755725ce..14ad3d7bec2 100644
--- a/.pipelines/templates/release-MSIX-Publish.yml
+++ b/.pipelines/templates/release-MSIX-Publish.yml
@@ -52,23 +52,42 @@ jobs:
}
$endURL = $tagString -replace '^v','' -replace '\.',''
- $message = "Changelog: https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
+ $changelogLink = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
Write-Verbose -Verbose "Release Notes for the Store:"
- Write-Verbose -Verbose "$message"
$jsonPath = "$(Pipeline.Workspace)\SBOutDir\PowerShellStorePackage.json"
$json = Get-Content $jsonPath -Raw | ConvertFrom-Json
- $json.listings.'en-us'.baseListing.releaseNotes = $message
+ $releaseNoteVariables = @{
+ '___VERSION___' = $tagString
+ '___CHANGELOGLINK___' = $changelogLink
+ }
+
+ $listingProperties = @($json.listings.PSObject.Properties)
+ if ($listingProperties.Count -eq 0) {
+ throw "Store listings are missing from '$jsonPath'."
+ }
- # Add PowerShell version to the top of the description
- $description = $json.listings.'en-us'.baseListing.description
- $version = "$(ReleaseTag)"
- $updatedDescription = "Version: $version`n`n$description"
- $json.listings.'en-us'.baseListing.description = $updatedDescription
- Write-Verbose -Verbose "Updated description: $updatedDescription"
+ foreach ($listingProperty in $listingProperties) {
+ $language = $listingProperty.Name
+ $releaseNotes = $listingProperty.Value.baseListing.releaseNotes
+ if ([string]::IsNullOrWhiteSpace($releaseNotes)) {
+ throw "Store release notes for '$language' are missing from '$jsonPath'."
+ }
+
+ foreach ($placeholder in $releaseNoteVariables.Keys) {
+ if (-not $releaseNotes.Contains($placeholder)) {
+ throw "Store release notes for '$language' do not contain the required placeholder '$placeholder'."
+ }
+ $releaseNotes = $releaseNotes.Replace($placeholder, $releaseNoteVariables[$placeholder])
+ }
+
+ $listingProperty.Value.baseListing.releaseNotes = $releaseNotes
+ Write-Verbose -Verbose "Release notes for '$language':"
+ Write-Verbose -Verbose $releaseNotes
+ }
$json | ConvertTo-Json -Depth 100 | Set-Content $jsonPath -Encoding UTF8
- displayName: 'Add Changelog Link and Version Number to SBJSON'
+ displayName: 'Set Store Release Note Variables'
- task: PowerShell@2
condition: or(eq(variables['LTS'], 'true'), eq(variables['STABLE'], 'true'), eq(variables['PREVIEW'], 'true'))
diff --git a/.pipelines/templates/release-validate-packagenames.yml b/.pipelines/templates/release-validate-packagenames.yml
index 5bce4361669..461e9182e1b 100644
--- a/.pipelines/templates/release-validate-packagenames.yml
+++ b/.pipelines/templates/release-validate-packagenames.yml
@@ -56,7 +56,7 @@ jobs:
- pwsh: |
$message = @()
Get-ChildItem $(System.ArtifactsDirectory)\* -recurse -filter *.rpm | ForEach-Object {
- if($_.Name -notmatch 'powershell\-(preview-|lts-)?\d+\.\d+\.\d+(_[a-z]*\.\d+)?-1.(rh|cm).(x86_64|aarch64)\.rpm')
+ if($_.Name -notmatch '^powershell-(preview-|lts-)?\d+\.\d+\.\d+(_[a-z]*\.\d+)?-1\.(preview\.\d+\.)?(rh|cm|azl4)\.(x86_64|aarch64)\.rpm$')
{
$messageInstance = "$($_.Name) is not a valid package name"
$message += $messageInstance
diff --git a/.pipelines/templates/stages/PowerShell-Packages-Stages.yml b/.pipelines/templates/stages/PowerShell-Packages-Stages.yml
index 2c84885e445..3e2dde75797 100644
--- a/.pipelines/templates/stages/PowerShell-Packages-Stages.yml
+++ b/.pipelines/templates/stages/PowerShell-Packages-Stages.yml
@@ -50,10 +50,12 @@ stages:
- template: /.pipelines/templates/mac-package-build.yml@self
parameters:
buildArchitecture: x64
+ OfficialBuild: ${{ parameters.OfficialBuild }}
- template: /.pipelines/templates/mac-package-build.yml@self
parameters:
buildArchitecture: arm64
+ OfficialBuild: ${{ parameters.OfficialBuild }}
- stage: windows_package_build
displayName: 'Win Pkg (unsigned)'
diff --git a/CHANGELOG/7.6.md b/CHANGELOG/7.6.md
index 2ac39a5925f..a3e00b5bc86 100644
--- a/CHANGELOG/7.6.md
+++ b/CHANGELOG/7.6.md
@@ -1,5 +1,67 @@
# 7.6 Changelog
+## [7.6.7]
+
+### Engine Updates and Fixes
+
+- Tolerate IO/JSON errors reading the per-user `powershell.config.json` (#28084)
+
+### General Cmdlet Updates and Fixes
+
+- Prevent localization of WPF key gesture strings (#28097)
+- Allow user to force the default implicit formatting to use `AutoSize` (#28096)
+- Handle MSIX installation specially when prepending to PATH (#28091)
+- Add `GetImportModuleCommand` method and session restriction check in `Show-Command` (#28088)
+
+### Tests
+
+- Fix the PATH test for MSIX installed PowerShell (#28108)
+- Fix `LocProject.json` tests and trigger CIs on changes to `LocProject.json` (#28104)
+- Mark DSC Profile tests pending on MSIX test runs (#28092)
+
+### Build and Packaging Improvements
+
+
+
+
+
+
Update to .NET SDK 10.0.402
+
+
+
+
+
Move to the latest Microsoft.PowerShell.Native package and add test (#28176)
+
Update Microsoft.PowerShell.Native package version (#28171)
+
Bump CodeQL init and analyze actions to 4.38.2 (#28156)
+
Add native Azure Linux 4 RPM packaging (#28154)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2725870 (#28105)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2734773 (#28102)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2724482 (#28101)
+
Simplify Microsoft Store listing metadata (#28103)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2716742 (#28100)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2730146 (#28099)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2726204 (#28098)
+
Add PDP.xml to the LocProject.json file (#28095)
+
Add Azure Linux 4 RPM support (#28039)
+
Revert "Simplify Microsoft Store listing metadata" (#28094)
+
Simplify Microsoft Store listing metadata (#28079)
+
Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2704971 (#28080)
+
Change Windows CI to stop using PowerShell 5.1 (#28081)
+
Support macOS signatures in nonofficial pipelines (#28076)
+
Bump github/codeql-action from 4.35.4 to 4.36.0 (#28083)
+
Bump actions/checkout from 6.0.2 to 7.0.1 (#28153)
+
Bump ossf/scorecard-action from 2.4.3 to 2.4.4 (#28157)
+
Bump actions/github-script from 8.0.0 to 9.0.0 (#28086)
+
Bump actions/upload-artifact from 7.0.0 to 7.0.1 (#28085)
+
Bump PowerShell/compliance/.github/workflows/ready-to-merge.yml from 1.0.0 to 1.0.1 (#28155)
+
Bump github/codeql-action/upload-sarif from 4.36.0 to 4.38.2 (#28158)
+
Bump actions/setup-dotnet from 5.2.0 to 6.0.0 (#28161)
+
+
+
+
+[7.6.7]: https://github.com/PowerShell/PowerShell/compare/v7.6.6...v7.6.7
+
## [7.6.6]
### Engine Updates and Fixes
diff --git a/DotnetRuntimeMetadata.json b/DotnetRuntimeMetadata.json
index 6fd7617c1b4..c01cd4a76af 100644
--- a/DotnetRuntimeMetadata.json
+++ b/DotnetRuntimeMetadata.json
@@ -4,7 +4,7 @@
"quality": "daily",
"qualityFallback": "preview",
"packageVersionPattern": "9.0.0-preview.6",
- "sdkImageVersion": "10.0.401",
+ "sdkImageVersion": "10.0.402",
"nextChannel": "9.0.0-preview.7",
"azureFeed": "",
"sdkImageOverride": ""
diff --git a/Localize/LocProject.json b/Localize/LocProject.json
index 453d67c3f5a..1ed76903d55 100644
--- a/Localize/LocProject.json
+++ b/Localize/LocProject.json
@@ -752,6 +752,11 @@
"SourceFile": "src\\Microsoft.WSMan.Management\\resources\\WsManResources.resx",
"CopyOption": "LangIDOnPathAndName",
"OutputPath": "src\\Microsoft.WSMan.Management\\resources\\"
+ },
+ {
+ "SourceFile": ".pipelines\\store\\PDPs\\PDP\\en-US\\PDP.xml",
+ "CopyOption": "LangIDOnPath",
+ "OutputPath": ".pipelines\\store\\PDPs\\PDP\\"
}
]
}
diff --git a/assets/AppxManifest.xml b/assets/AppxManifest.xml
index e5b26a892c4..9faaec64995 100644
--- a/assets/AppxManifest.xml
+++ b/assets/AppxManifest.xml
@@ -25,6 +25,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/global.json b/global.json
index e04f218f2a0..e10892e23d4 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "10.0.401"
+ "version": "10.0.402"
}
}
diff --git a/src/Microsoft.Management.UI.Internal/commandHelpers/ShowCommandHelper.cs b/src/Microsoft.Management.UI.Internal/commandHelpers/ShowCommandHelper.cs
index 32c68e961c6..13dfe839b9d 100644
--- a/src/Microsoft.Management.UI.Internal/commandHelpers/ShowCommandHelper.cs
+++ b/src/Microsoft.Management.UI.Internal/commandHelpers/ShowCommandHelper.cs
@@ -489,6 +489,37 @@ private static string GetSerializedCommandScript()
@"Remove-Item -Path 'function:\PSGetSerializedShowCommandInfo' -Force");
}
+ ///
+ /// Gets the command to be run to in order to import a module and refresh the command data.
+ ///
+ /// Module we want to import.
+ /// Boolean flag determining whether Show-Command is queried in the local or remote runspace scenario.
+ /// Boolean flag to indicate that it is the second attempt to query Show-Command data.
+ /// The command to be run to in order to import a module and refresh the command data.
+ internal static string GetImportModuleCommand(string module, bool isRemoteRunspace = false, bool isFirstChance = true)
+ {
+ string scriptBase = "Import-Module " + ShowCommandHelper.SingleQuote(module);
+
+ if (isRemoteRunspace)
+ {
+ if (isFirstChance)
+ {
+ scriptBase += ";@(Get-Command " + ShowCommandHelper.CommandTypeSegment + @" -ShowCommandInfo )";
+ }
+ else
+ {
+ scriptBase += GetSerializedCommandScript();
+ }
+ }
+ else
+ {
+ scriptBase += ";@(Get-Command " + ShowCommandHelper.CommandTypeSegment + ")";
+ }
+
+ scriptBase += ShowCommandHelper.GetGetModuleSuffix();
+ return scriptBase;
+ }
+
///
/// Gets the command to be run in order to show help for a command.
///
diff --git a/src/Microsoft.Management.UI.Internal/resources/cs/public.InvariantResources.cs.resx b/src/Microsoft.Management.UI.Internal/resources/cs/public.InvariantResources.cs.resx
index b92bfb0c515..9c22af9730a 100644
--- a/src/Microsoft.Management.UI.Internal/resources/cs/public.InvariantResources.cs.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/cs/public.InvariantResources.cs.resx
@@ -121,7 +121,8 @@
{0} nelze upravovat přímo. Místo toho použijte {1}.
- Sloupce
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} nepodporuje přidávání do kolekce Položky. Místo toho použijte {1}.
+ {0} nepodporuje přidávání do kolekce Items. Místo toho použijte {1}.
+ {StrContains="Items"}
- Pokud je pro zobrazení nastavena hodnota {0}, musí mít typ {1}.
+ Pokud je View nastaveno na {0}, musí mít typ {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/cs/public.UICultureResources.cs.resx b/src/Microsoft.Management.UI.Internal/resources/cs/public.UICultureResources.cs.resx
index 72b57dbb88e..9758369013b 100644
--- a/src/Microsoft.Management.UI.Internal/resources/cs/public.UICultureResources.cs.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/cs/public.UICultureResources.cs.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+plus na numerické klávesnici
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl+Shift+plus na numerické klávesnici
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- Ctrl+plus
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- Ctrl+Shift+plus
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+minus na numerické klávesnici
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+Shift+minus na numerické klávesnici
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl+minus
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl+Shift+minus
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/de/public.InvariantResources.de.resx b/src/Microsoft.Management.UI.Internal/resources/de/public.InvariantResources.de.resx
index bce5c9ffd77..64bb2b943b9 100644
--- a/src/Microsoft.Management.UI.Internal/resources/de/public.InvariantResources.de.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/de/public.InvariantResources.de.resx
@@ -121,7 +121,8 @@
„{0}“ kann nicht direkt geändert werden. Verwenden Sie stattdessen „{1}“.
- Spalten
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- Das Hinzufügen zur Elementsammlung wird von „{0}“ nicht unterstützt. Verwenden Sie stattdessen „{1}“.
+ Das Hinzufügen zur Items-Sammlung wird von „{0}“ nicht unterstützt. Verwenden Sie stattdessen „{1}“.
+ {StrContains="Items"}
- Wenn die Ansicht auf „{0}“ eingestellt ist, sollte sie den Typ „{1}“ aufweisen.
+ Wenn View auf „{0}“ eingestellt ist, sollte der Typ „{1}“ sein.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/de/public.UICultureResources.de.resx b/src/Microsoft.Management.UI.Internal/resources/de/public.UICultureResources.de.resx
index b7a01e57d48..0705520f94a 100644
--- a/src/Microsoft.Management.UI.Internal/resources/de/public.UICultureResources.de.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/de/public.UICultureResources.de.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- STRG+Hinzufügen
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- STRG+UMSCHALT+Hinzufügen
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- STRG+Plus
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- STRG+UMSCHALT+Plus
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- STRG+Subtrahieren
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- STRG+UMSCHALT+Subtrahieren
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- STRG+Minus
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- STRG+UMSCHALT+Minus
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/es/public.InvariantResources.es.resx b/src/Microsoft.Management.UI.Internal/resources/es/public.InvariantResources.es.resx
index 1e2f5ac226c..3ec20fbdbd8 100644
--- a/src/Microsoft.Management.UI.Internal/resources/es/public.InvariantResources.es.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/es/public.InvariantResources.es.resx
@@ -121,7 +121,8 @@
{0} no se puede modificar directamente, use {1} en su lugar.
- Columnas
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -141,8 +142,10 @@
{0} no admite la adición a la colección Items, use {1} en su lugar.
+ {StrContains="Items"}Si View se establece en un {0}, debe tener el tipo {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/es/public.UICultureResources.es.resx b/src/Microsoft.Management.UI.Internal/resources/es/public.UICultureResources.es.resx
index dd68aeee157..e6fd285e3f0 100644
--- a/src/Microsoft.Management.UI.Internal/resources/es/public.UICultureResources.es.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/es/public.UICultureResources.es.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+Agregar
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl+Mayús+Agregar
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- Ctrl+Mayús+Más
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+Restar
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+Mayús+Restar
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl+Menos
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl+Mayús+Menos
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/fr/public.InvariantResources.fr.resx b/src/Microsoft.Management.UI.Internal/resources/fr/public.InvariantResources.fr.resx
index f97187289ab..b54bc7844ae 100644
--- a/src/Microsoft.Management.UI.Internal/resources/fr/public.InvariantResources.fr.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/fr/public.InvariantResources.fr.resx
@@ -121,7 +121,8 @@
{0} ne peut pas être modifié directement, utilisez {1} à la place.
- Colonnes
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} ne prend pas en charge les ajouts dans les collections d’éléments, utilisez {1} à la place.
+ {0} ne prend pas en charge l’ajout à la collection Items, utilisez {1} à la place.
+ {StrContains="Items"}
- Si Affichage a la valeur {0}, le type doit être {1}.
+ Si View a la valeur {0}, le type doit être {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/fr/public.UICultureResources.fr.resx b/src/Microsoft.Management.UI.Internal/resources/fr/public.UICultureResources.fr.resx
index a9e702b472c..6f479b297a3 100644
--- a/src/Microsoft.Management.UI.Internal/resources/fr/public.UICultureResources.fr.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/fr/public.UICultureResources.fr.resx
@@ -205,26 +205,34 @@
Ctrl+Add
+ {StrContains="Ctrl+Add"}Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}Ctrl+Minus
+ {StrContains="Ctrl+Minus"}Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/it/public.InvariantResources.it.resx b/src/Microsoft.Management.UI.Internal/resources/it/public.InvariantResources.it.resx
index 3f4c8ff8b9f..87673ee52a8 100644
--- a/src/Microsoft.Management.UI.Internal/resources/it/public.InvariantResources.it.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/it/public.InvariantResources.it.resx
@@ -121,7 +121,8 @@
Non è possibile modificare direttamente {0}. Utilizzare invece {1}.
- Colonne
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} non supporta l'aggiunta alla raccolta di elementi. Utilizzare invece {1}.
+ {0} non supporta l'aggiunta alla raccolta Items. Utilizzare invece {1}.
+ {StrContains="Items"}
- Se la visualizzazione è impostata su {0}, il tipo deve essere {1}.
+ Se View è impostato su {0}, il tipo deve essere {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/it/public.UICultureResources.it.resx b/src/Microsoft.Management.UI.Internal/resources/it/public.UICultureResources.it.resx
index 774c8488f12..bad4174d252 100644
--- a/src/Microsoft.Management.UI.Internal/resources/it/public.UICultureResources.it.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/it/public.UICultureResources.it.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+Aggiungi
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl+MAIUSC+Aggiungi
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- Ctrl+MAIUSC+segno più
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+Sottrai
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+MAIUSC+Sottrai
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl+segno meno
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl+MAIUSC+segno meno
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/ja/public.InvariantResources.ja.resx b/src/Microsoft.Management.UI.Internal/resources/ja/public.InvariantResources.ja.resx
index 63122368ee5..602c3f0cd8d 100644
--- a/src/Microsoft.Management.UI.Internal/resources/ja/public.InvariantResources.ja.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/ja/public.InvariantResources.ja.resx
@@ -121,7 +121,8 @@
{0} を直接変更することはできません。代わりに {1} を使用してください。
- 列
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} は項目コレクションへの追加をサポートしていません。代わりに {1} を使用してください。
+ {0} では Items コレクションへの追加はサポートされていません。代わりに {1} を使用してください。
+ {StrContains="Items"}
- ビューが {0} に設定されている場合、種類は {1} である必要があります。
+ View が {0} に設定されている場合、型は {1} である必要があります。
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/ja/public.UICultureResources.ja.resx b/src/Microsoft.Management.UI.Internal/resources/ja/public.UICultureResources.ja.resx
index 08766cc91a2..4920835793b 100644
--- a/src/Microsoft.Management.UI.Internal/resources/ja/public.UICultureResources.ja.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/ja/public.UICultureResources.ja.resx
@@ -205,26 +205,34 @@
Ctrl+Add
+ {StrContains="Ctrl+Add"}Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- Ctrl + プラス
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- CTRL + SHIFT + P
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl + 減算
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl + Shift + 減算
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl + マイナス
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl + Shift + マイナス
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/ko/public.InvariantResources.ko.resx b/src/Microsoft.Management.UI.Internal/resources/ko/public.InvariantResources.ko.resx
index c6030c4a8cc..71e2111e2e0 100644
--- a/src/Microsoft.Management.UI.Internal/resources/ko/public.InvariantResources.ko.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/ko/public.InvariantResources.ko.resx
@@ -121,7 +121,8 @@
{0}은(는) 직접 수정할 수 없습니다. 대신 {1}을(를) 사용하세요.
- 열
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0}은(는) 항목 컬렉션에 대한 추가를 지원하지 않습니다. 대신 {1}을(를) 사용하세요.
+ {0}은(는) Items 컬렉션에 대한 추가를 지원하지 않습니다. 대신 {1}을(를) 사용하세요.
+ {StrContains="Items"}
- 보기가 {0}(으)로 설정된 경우 {1} 유형이어야 합니다.
+ View가 {0}(으)로 설정된 경우 {1} 유형이어야 합니다.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/ko/public.UICultureResources.ko.resx b/src/Microsoft.Management.UI.Internal/resources/ko/public.UICultureResources.ko.resx
index 1e1f252871f..45b88f7aaf9 100644
--- a/src/Microsoft.Management.UI.Internal/resources/ko/public.UICultureResources.ko.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/ko/public.UICultureResources.ko.resx
@@ -205,26 +205,34 @@
Ctrl+Add
+ {StrContains="Ctrl+Add"}Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}Ctrl+Minus
+ {StrContains="Ctrl+Minus"}Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/pl/public.InvariantResources.pl.resx b/src/Microsoft.Management.UI.Internal/resources/pl/public.InvariantResources.pl.resx
index 9f7d50f7349..ee475cb0d6c 100644
--- a/src/Microsoft.Management.UI.Internal/resources/pl/public.InvariantResources.pl.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/pl/public.InvariantResources.pl.resx
@@ -121,7 +121,8 @@
{0} nie można modyfikować bezpośrednio, zamiast tego użyj {1}.
- Kolumny
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} nie obsługuje czynności dodawania do kolekcji obiektów, użyj zamiennie {1}.
+ {0} nie obsługuje dodawania do kolekcji Items, użyj zamiast tego {1}.
+ {StrContains="Items"}
- Jeśli dla parametru Widok ustawiono wartość {0}, powinien on mieć typ {1}.
+ Jeśli dla parametru View ustawiono wartość {0}, powinien on mieć typ {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/pl/public.UICultureResources.pl.resx b/src/Microsoft.Management.UI.Internal/resources/pl/public.UICultureResources.pl.resx
index aa97338c019..c800c6d281d 100644
--- a/src/Microsoft.Management.UI.Internal/resources/pl/public.UICultureResources.pl.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/pl/public.UICultureResources.pl.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+Dodaj
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl + Shift + Dodaj
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+Odejmowanie
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+Shift+Odejmowanie
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}Ctrl+Minus
+ {StrContains="Ctrl+Minus"}Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.InvariantResources.pt-BR.resx b/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.InvariantResources.pt-BR.resx
index 9c174b642fa..38503b482d0 100644
--- a/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.InvariantResources.pt-BR.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.InvariantResources.pt-BR.resx
@@ -121,7 +121,8 @@
{0} cannot be modified directly, use {1} instead.
- Colunas
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} does not support adding to the Items collection, use {1} instead.
+ {0} não dá suporte à inclusão da coleção Items, use {1}.
+ {StrContains="Items"}
- If View is set to a {0}, it should have the type {1}.
+ Se o Modo de View estiver definido como {0}, ele deverá ter o tipo {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.UICultureResources.pt-BR.resx b/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.UICultureResources.pt-BR.resx
index 5dacc74283f..b721cabc10f 100644
--- a/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.UICultureResources.pt-BR.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/pt-BR/public.UICultureResources.pt-BR.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+Adicionar
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl+Shift+Adicionar
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- Ctrl+Mais
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- Ctrl+Shift+Mais
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+Subtrair
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+Shift+Subtrair
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl+Menos
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl+Shift+Menos
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/public.InvariantResources.resx b/src/Microsoft.Management.UI.Internal/resources/public.InvariantResources.resx
index 64c8e33ccde..088b1667c72 100644
--- a/src/Microsoft.Management.UI.Internal/resources/public.InvariantResources.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/public.InvariantResources.resx
@@ -122,6 +122,7 @@
Columns
+ {StrContains="Columns"}{0:G}
@@ -141,8 +142,10 @@
{0} does not support adding to the Items collection, use {1} instead.
+ {StrContains="Items"}If View is set to a {0}, it should have the type {1}.
+ {StrContains="View"}
diff --git a/src/Microsoft.Management.UI.Internal/resources/public.UICultureResources.resx b/src/Microsoft.Management.UI.Internal/resources/public.UICultureResources.resx
index de8b07134e2..8e390bba946 100644
--- a/src/Microsoft.Management.UI.Internal/resources/public.UICultureResources.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/public.UICultureResources.resx
@@ -205,26 +205,34 @@
Ctrl+Add
+ {StrContains="Ctrl+Add"}Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}Ctrl+Minus
+ {StrContains="Ctrl+Minus"}Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
diff --git a/src/Microsoft.Management.UI.Internal/resources/ru/public.InvariantResources.ru.resx b/src/Microsoft.Management.UI.Internal/resources/ru/public.InvariantResources.ru.resx
index 1e98456d841..c43e13c49d7 100644
--- a/src/Microsoft.Management.UI.Internal/resources/ru/public.InvariantResources.ru.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/ru/public.InvariantResources.ru.resx
@@ -121,7 +121,8 @@
Не удается изменить {0} напрямую. Используйте {1}.
- Столбцы
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} не поддерживает добавление в коллекцию элементов. Используйте {1}.
+ {0} не поддерживает добавление в коллекцию Items. Используйте {1}.
+ {StrContains="Items"}
- Если задано представление {0}, его тип должен быть {1}.
+ Если для View задано значение {0}, его тип должен быть {1}.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/ru/public.UICultureResources.ru.resx b/src/Microsoft.Management.UI.Internal/resources/ru/public.UICultureResources.ru.resx
index 2c2f98e9143..6d97713a728 100644
--- a/src/Microsoft.Management.UI.Internal/resources/ru/public.UICultureResources.ru.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/ru/public.UICultureResources.ru.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- CTRL+ДОБАВИТЬ
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- CTRL+SHIFT+A
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- CTRL+ПЛЮС
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- CTRL+SHIFT+ПЛЮС
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- CTRL+ВЫЧЕСТЬ
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- CTRL+SHIFT+ВЫЧЕСТЬ
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- CTRL+МИНУС
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- CTRL + SHIFT + МИНУС
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/tr/public.InvariantResources.tr.resx b/src/Microsoft.Management.UI.Internal/resources/tr/public.InvariantResources.tr.resx
index e6168a47fd8..1cc89f86621 100644
--- a/src/Microsoft.Management.UI.Internal/resources/tr/public.InvariantResources.tr.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/tr/public.InvariantResources.tr.resx
@@ -121,7 +121,8 @@
{0} doğrudan değiştirilemiyor, bunun yerine {1} kullanın.
- Sütunlar
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} Öğeler koleksiyonuna eklenmeyi desteklemiyor, bunun yerine {1} kullanın.
+ {0} Items koleksiyonuna eklenmeyi desteklemiyor, bunun yerine {1} kullanın.
+ {StrContains="Items"}
- Görünüm {0} olarak ayarlanırsa {1} türünde olmalıdır.
+ View {0} olarak ayarlanırsa {1} türünde olmalıdır.
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/tr/public.UICultureResources.tr.resx b/src/Microsoft.Management.UI.Internal/resources/tr/public.UICultureResources.tr.resx
index 24d7a72fcaf..b20695ca024 100644
--- a/src/Microsoft.Management.UI.Internal/resources/tr/public.UICultureResources.tr.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/tr/public.UICultureResources.tr.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+Ekle
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl+Shift+Ekle
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- Ctrl+Artı
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- Ctrl+Shift+Artı
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+Çıkar
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+Shift+Çıkar
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl+Eksi
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl+Shift+Eksi
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.InvariantResources.zh-Hans.resx b/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.InvariantResources.zh-Hans.resx
index 7809267d7bc..fc9cb6ac59a 100644
--- a/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.InvariantResources.zh-Hans.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.InvariantResources.zh-Hans.resx
@@ -121,7 +121,8 @@
无法直接修改 {0},请改用 {1}。
- 列
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} 不支持添加到项目集合,请改用 {1}。
+ {0} 不支持添加到 Items 集合,请改用 {1}。
+ {StrContains="Items"}
- 如果“视图”设置为 {0},则它应该具有类型 {1}。
+ 如果“View”设置为 {0},则它应该具有类型 {1}。
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.UICultureResources.zh-Hans.resx b/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.UICultureResources.zh-Hans.resx
index 5989d363c2f..e1b7364dd21 100644
--- a/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.UICultureResources.zh-Hans.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/zh-Hans/public.UICultureResources.zh-Hans.resx
@@ -204,27 +204,35 @@
An ellipsis character.
- Ctrl+小键盘加号
+ Ctrl+Add
+ {StrContains="Ctrl+Add"}
- Ctrl+Shift+小键盘加号
+ Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}
- Ctrl+主键盘加号
+ Ctrl+Plus
+ {StrContains="Ctrl+Plus"}
- Ctrl+Shift+主键盘加号
+ Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}
- Ctrl+小键盘减号
+ Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}
- Ctrl+Shift+小键盘减号
+ Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}
- Ctrl+主键盘减号
+ Ctrl+Minus
+ {StrContains="Ctrl+Minus"}
- Ctrl+Shift+主键盘减号
+ Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.InvariantResources.zh-Hant.resx b/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.InvariantResources.zh-Hant.resx
index e7005b49d57..0d73a65399d 100644
--- a/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.InvariantResources.zh-Hant.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.InvariantResources.zh-Hant.resx
@@ -121,7 +121,8 @@
無法直接修改 {0},請改為使用 {1}。
- 資料行
+ Columns
+ {StrContains="Columns"}{0:G}
@@ -140,9 +141,11 @@
The format string that is used by the InnerList in the case where a whole number type is used. The {0} will be the column value.
- {0} 不支援新增至項目集合,請改為使用 {1}。
+ {0} 不支援新增至 Items 集合,請改為使用 {1}。
+ {StrContains="Items"}
- 若將檢視設為 {0},則應該有類型 {1}。
+ 若將 View 設為 {0},則應該有類型 {1}。
+ {StrContains="View"}
\ No newline at end of file
diff --git a/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.UICultureResources.zh-Hant.resx b/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.UICultureResources.zh-Hant.resx
index 9f92a52d0b4..1897e496c21 100644
--- a/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.UICultureResources.zh-Hant.resx
+++ b/src/Microsoft.Management.UI.Internal/resources/zh-Hant/public.UICultureResources.zh-Hant.resx
@@ -205,26 +205,34 @@
Ctrl+Add
+ {StrContains="Ctrl+Add"}Ctrl+Shift+Add
+ {StrContains="Ctrl+Shift+Add"}Ctrl+Plus
+ {StrContains="Ctrl+Plus"}Ctrl+Shift+Plus
+ {StrContains="Ctrl+Shift+Plus"}Ctrl+Subtract
+ {StrContains="Ctrl+Subtract"}Ctrl+Shift+Subtract
+ {StrContains="Ctrl+Shift+Subtract"}Ctrl+Minus
+ {StrContains="Ctrl+Minus"}Ctrl+Shift+Minus
+ {StrContains="Ctrl+Shift+Minus"}
\ No newline at end of file
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs
index 16b7db47d41..c9edfa5c85f 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs
@@ -1419,18 +1419,25 @@ private void AddRemoteCommandMetadata(
return;
}
- if (resolvedCommandName != null && !IsSafeNameOrIdentifier(commandMetadata.Name))
+ if (resolvedCommandName is not null && !IsSafeNameOrIdentifier(resolvedCommandName))
{
this.WriteError(this.GetErrorSkippedUnsafeCommandName(resolvedCommandName));
return;
}
- if (IsCommandSkippedByServerDeclaration(commandMetadata.Name))
+ // - We do the skip-list check on 'commandMetadata.Name' regardless to keep the existing behavior.
+ // - We do the skip-list check on the resolved command if no prefix is specified, to avoid a server skipped command
+ // from being exported and shadow the same-name command on client side without the user explicitly asking for it.
+ if (IsCommandSkippedByServerDeclaration(commandMetadata.Name)
+ || (resolvedCommandName is not null
+ && string.IsNullOrEmpty(Prefix)
+ && IsCommandSkippedByServerDeclaration(resolvedCommandName)))
{
return;
}
- if (!IsCommandNameAllowedForImport(commandMetadata.Name))
+ if (!IsCommandNameAllowedForImport(commandMetadata.Name)
+ || (resolvedCommandName is not null && !IsCommandNameAllowedForImport(resolvedCommandName)))
{
return;
}
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs
index 60b05807d48..01267bab680 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommand.cs
@@ -170,6 +170,13 @@ public void Dispose()
///
protected override void BeginProcessing()
{
+ if (Utils.IsSessionRestricted(this.Context))
+ {
+ Exception e = new InvalidOperationException(HelpErrors.NotAllowedInRestrictedRemoting);
+ ErrorRecord errorRecord = new ErrorRecord(e, "CommandNotAllowed", ErrorCategory.InvalidOperation, null);
+ this.ThrowTerminatingError(errorRecord);
+ }
+
_showCommandProxy = new ShowCommandProxy(this);
if (_showCommandProxy.ScreenHeight < this.Height)
diff --git a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs
index 32603f160f8..a506284addd 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs
+++ b/src/Microsoft.PowerShell.Commands.Utility/commands/utility/TestJsonCommand.cs
@@ -113,6 +113,17 @@ public string LiteralPath
[ValidateSet(IgnoreCommentsOption, AllowTrailingCommasOption)]
public string[] Options { get; set; } = Array.Empty();
+ ///
+ /// If set, the cmdlet will retrieve external (URI, file) references in the JSON schema.
+ ///
+ [Parameter(ParameterSetName = JsonStringWithSchemaStringParameterSet)]
+ [Parameter(ParameterSetName = JsonStringWithSchemaFileParameterSet)]
+ [Parameter(ParameterSetName = JsonPathWithSchemaStringParameterSet)]
+ [Parameter(ParameterSetName = JsonPathWithSchemaFileParameterSet)]
+ [Parameter(ParameterSetName = JsonLiteralPathWithSchemaStringParameterSet)]
+ [Parameter(ParameterSetName = JsonLiteralPathWithSchemaFileParameterSet)]
+ public SwitchParameter FetchExternalReference { get; set; }
+
#endregion
#region Private Members
@@ -120,6 +131,7 @@ public string LiteralPath
private bool _isLiteralPath = false;
private JsonSchema _jschema;
private JsonDocumentOptions _documentOptions;
+ private EvaluationOptions _evaluationOptions;
#endregion
@@ -128,42 +140,47 @@ public string LiteralPath
///
protected override void BeginProcessing()
{
- // By default, a JSON Schema implementation isn't supposed to automatically fetch content.
- // Instead JsonSchema.Net has been set up with a registry so that users can pre-register
- // any schemas they may need to resolve.
- // However, pre-registering schemas doesn't make sense in the context of a Powershell command,
- // and automatically fetching referenced URIs is likely the preferred behavior. To do that,
- // this property must be set with a method to retrieve and deserialize the content.
- // For more information, see https://json-everything.net/json-schema#automatic-resolution
- SchemaRegistry.Global.Fetch = static uri =>
+ _evaluationOptions = new EvaluationOptions { OutputFormat = OutputFormat.Hierarchical };
+
+ if (FetchExternalReference)
{
- try
+ // By default, a JSON Schema implementation isn't supposed to automatically fetch content.
+ // Instead JsonSchema.Net has been set up with a registry so that users can pre-register
+ // any schemas they may need to resolve.
+ // However, pre-registering schemas doesn't make sense in the context of a Powershell command,
+ // and automatically fetching referenced URIs is likely the preferred behavior. To do that,
+ // this property must be set with a method to retrieve and deserialize the content.
+ // For more information, see https://json-everything.net/json-schema#automatic-resolution
+ _evaluationOptions.SchemaRegistry.Fetch = static uri =>
{
- string text;
- switch (uri.Scheme)
+ try
{
- case "http":
- case "https":
- {
- using var client = new HttpClient();
- text = client.GetStringAsync(uri).Result;
+ string text;
+ switch (uri.Scheme)
+ {
+ case "http":
+ case "https":
+ {
+ using var client = new HttpClient();
+ text = client.GetStringAsync(uri).Result;
+ break;
+ }
+ case "file":
+ var filename = Uri.UnescapeDataString(uri.AbsolutePath);
+ text = File.ReadAllText(filename);
break;
- }
- case "file":
- var filename = Uri.UnescapeDataString(uri.AbsolutePath);
- text = File.ReadAllText(filename);
- break;
- default:
- throw new FormatException(string.Format(TestJsonCmdletStrings.InvalidUriScheme, uri.Scheme));
- }
+ default:
+ throw new FormatException(string.Format(TestJsonCmdletStrings.InvalidUriScheme, uri.Scheme));
+ }
- return JsonSerializer.Deserialize(text);
- }
- catch (Exception e)
- {
- throw new JsonSchemaReferenceResolutionException(e);
- }
- };
+ return JsonSerializer.Deserialize(text);
+ }
+ catch (Exception e)
+ {
+ throw new JsonSchemaReferenceResolutionException(e);
+ }
+ };
+ }
string resolvedpath = string.Empty;
@@ -264,7 +281,7 @@ protected override void ProcessRecord()
if (_jschema != null)
{
- EvaluationResults evaluationResults = _jschema.Evaluate(parsedJson, new EvaluationOptions { OutputFormat = OutputFormat.List });
+ EvaluationResults evaluationResults = _jschema.Evaluate(parsedJson, _evaluationOptions);
result = evaluationResults.IsValid;
if (!result)
{
@@ -287,6 +304,13 @@ protected override void ProcessRecord()
Exception exception = new(TestJsonCmdletStrings.InvalidJsonSchema, jsonExc);
WriteError(new ErrorRecord(exception, "InvalidJsonSchema", ErrorCategory.InvalidData, _jschema));
}
+ catch (RefResolutionException refExc)
+ {
+ result = false;
+
+ Exception exception = new(TestJsonCmdletStrings.UnresolvedJsonSchemaRef, refExc);
+ WriteError(new ErrorRecord(exception, "UnresolvedJsonSchemaRef", ErrorCategory.InvalidData, _jschema));
+ }
catch (Exception exc)
{
result = false;
diff --git a/src/Microsoft.PowerShell.Commands.Utility/resources/TestJsonCmdletStrings.resx b/src/Microsoft.PowerShell.Commands.Utility/resources/TestJsonCmdletStrings.resx
index e9a19f81793..8cdc8c0d03c 100644
--- a/src/Microsoft.PowerShell.Commands.Utility/resources/TestJsonCmdletStrings.resx
+++ b/src/Microsoft.PowerShell.Commands.Utility/resources/TestJsonCmdletStrings.resx
@@ -132,4 +132,7 @@
URI scheme '{0}' is not supported. Only HTTP(S) and local file system URIs are allowed.
+
+ The JSON schema contains a reference that could not be resolved. External schema references are not supported by default, use the 'FetchExternalReference' parameter to enable it.
+
diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
index f923481bc5e..632181d4161 100644
--- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
+++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
@@ -118,31 +118,21 @@ internal static int Start(
throw new ConsoleHostStartupException(ConsoleHostStrings.ShellCannotBeStartedWithConfigConflict);
}
- // Put PSHOME in front of PATH so that calling `pwsh` within `pwsh` always starts the same running version.
+ // Put pwsh executable home in front of PATH so that calling `pwsh` within `pwsh` always starts the same running version.
+ string psExeHome = GetPSExecutableHome();
string path = Environment.GetEnvironmentVariable("PATH");
- string pshome = Utils.DefaultPowerShellAppBase;
- string dotnetToolsPathSegment = $"{Path.DirectorySeparatorChar}.store{Path.DirectorySeparatorChar}powershell{Path.DirectorySeparatorChar}";
- int index = pshome.IndexOf(dotnetToolsPathSegment, StringComparison.Ordinal);
- if (index > 0)
- {
- // We're running PowerShell global tool. In this case the real entry executable should be the 'pwsh'
- // or 'pwsh.exe' within the tool folder which should be the path right before the '\.store', not what
- // PSHome is pointing to.
- pshome = pshome[0..index];
- }
-
- pshome += Path.PathSeparator;
+ psExeHome += Path.PathSeparator;
// To not impact startup perf, we don't remove duplicates, but we avoid adding a duplicate to the front
// we also don't handle the edge case where PATH only contains $PSHOME
if (string.IsNullOrEmpty(path))
{
- Environment.SetEnvironmentVariable("PATH", pshome);
+ Environment.SetEnvironmentVariable("PATH", psExeHome);
}
- else if (!path.StartsWith(pshome, StringComparison.Ordinal))
+ else if (!path.StartsWith(psExeHome, StringComparison.Ordinal))
{
- Environment.SetEnvironmentVariable("PATH", pshome + path);
+ Environment.SetEnvironmentVariable("PATH", psExeHome + path);
}
try
@@ -383,6 +373,43 @@ internal static void ParseCommandLine(string[] args)
private static readonly CommandLineParameterParser s_cpp = new CommandLineParameterParser();
+ private static string GetPSExecutableHome()
+ {
+#if UNIX
+ const string pwshName = "pwsh";
+ const string dotnetToolPathSegment = "/.store/powershell/";
+#else
+ const string pwshName = "pwsh.exe";
+ const string dotnetToolPathSegment = @"\.store\powershell\";
+#endif
+
+ string psExePath = Environment.ProcessPath;
+ string psExeHome = Path.GetDirectoryName(psExePath);
+ string processName = Path.GetFileName(psExePath);
+
+ // Use 'Environment.ProcessPath' if it points to 'pwsh.exe' or 'pwsh'.
+ if (pwshName.Equals(processName, StringComparison.Ordinal))
+ {
+#if !UNIX
+ psExeHome = ResolveStablePathIfMsix(psExeHome);
+#endif
+ return psExeHome;
+ }
+
+ psExeHome = Utils.DefaultPowerShellAppBase;
+
+ int index = psExeHome.IndexOf(dotnetToolPathSegment, StringComparison.Ordinal);
+ if (index > 0)
+ {
+ // We're running PowerShell dotnet tool. In this case the real entry executable should be the 'pwsh'
+ // or 'pwsh.exe' within the tool folder which should be the path right before the '\.store', because
+ // the pwsh executable under $PSHOME is an x86-64 binary that won't work on non-x86/64 platforms.
+ return psExeHome[0..index];
+ }
+
+ return psExeHome;
+ }
+
#if UNIX
///
/// The break handler for the program. Dispatches a break event to the current Executor.
@@ -412,6 +439,49 @@ private static void MyBreakHandler(object sender, ConsoleCancelEventArgs args)
}
}
#else
+ ///
+ /// Handle the MSIX package scenario where points to the MSIX package folder under "Program Files".
+ ///
+ /// That path contains a version string and will change with every update. Prepending that path to the PATH environment variable
+ /// caused a problem for CMake-based build systems: CMake cached the path to 'pwsh.exe' when running for the first time from the
+ /// MSIX PowerShell. That cached path became invalid after the MSIX PowerShell was updated, which broke CMake.
+ ///
+ /// So, instead of using the "Program Files" package folder path, we need to use the stable path that contains the execution alias
+ /// for the specific MSIX package, e.g. use "%LOCALAPPDATA%\Microsoft\WindowsApps\Microsoft.PowerShell_8wekyb3d8bbwe" instead of
+ /// "%ProgramFiles%\WindowsApps\Microsoft.PowerShell_7.x.x.0_x64__8wekyb3d8bbwe".
+ ///
+ /// Path to the directory that contains the pwsh executable.
+ private static string ResolveStablePathIfMsix(string psExeHome)
+ {
+ const string msixPublisherSuffix = "_8wekyb3d8bbwe";
+ const string msixPackageBaseName = "Microsoft.PowerShell";
+
+ if (psExeHome.EndsWith(msixPublisherSuffix, StringComparison.Ordinal))
+ {
+ string programFileDir = Environment.GetFolderPath(
+ Environment.SpecialFolder.ProgramFiles,
+ Environment.SpecialFolderOption.DoNotVerify);
+
+ string prefix = $"{programFileDir}\\WindowsApps\\{msixPackageBaseName}";
+ if (psExeHome.StartsWith(prefix, StringComparison.Ordinal))
+ {
+ int startIndex = prefix.Length;
+ int underbarIndex = psExeHome.IndexOf('_', startIndex);
+ if (underbarIndex > 0)
+ {
+ ReadOnlySpan channelSuffix = psExeHome.AsSpan(startIndex, underbarIndex - startIndex);
+ string localAppDataDir = Environment.GetFolderPath(
+ Environment.SpecialFolder.LocalApplicationData,
+ Environment.SpecialFolderOption.DoNotVerify);
+
+ psExeHome = $"{localAppDataDir}\\Microsoft\\WindowsApps\\{msixPackageBaseName}{channelSuffix}{msixPublisherSuffix}";
+ }
+ }
+ }
+
+ return psExeHome;
+ }
+
///
/// The break handler for the program. Dispatches a break event to the current Executor.
///
diff --git a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
index ef0d506d122..e24765d7052 100644
--- a/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
+++ b/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
@@ -2128,6 +2128,7 @@ private static IEnumerable ViewsOf_System_Management_Autom
.AddItemScriptBlock(@"""$($_.StrikethroughOff)$($_.StrikethroughOff.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "StrikethroughOff")
.AddItemScriptBlock(@"""$($_.Strikethrough)$($_.Strikethrough.Replace(""""`e"""",'`e'))$($_.Reset)""", label: "Strikethrough")
.AddItemProperty(@"OutputRendering")
+ .AddItemProperty(@"AutoSizeDefaultFormatting")
.AddItemScriptBlock(@"""$($_.Formatting.FormatAccent)$($_.Formatting.FormatAccent.Replace(""""`e"""",'`e'))$($PSStyle.Reset)""", label: "Formatting.FormatAccent")
.AddItemScriptBlock(@"""$($_.Formatting.ErrorAccent)$($_.Formatting.ErrorAccent.Replace(""""`e"""",'`e'))$($PSStyle.Reset)""", label: "Formatting.ErrorAccent")
.AddItemScriptBlock(@"""$($_.Formatting.Error)$($_.Formatting.Error.Replace(""""`e"""",'`e'))$($PSStyle.Reset)""", label: "Formatting.Error")
diff --git a/src/System.Management.Automation/FormatAndOutput/common/FormatViewGenerator.cs b/src/System.Management.Automation/FormatAndOutput/common/FormatViewGenerator.cs
index db1bc0704aa..80a976f47f2 100644
--- a/src/System.Management.Automation/FormatAndOutput/common/FormatViewGenerator.cs
+++ b/src/System.Management.Automation/FormatAndOutput/common/FormatViewGenerator.cs
@@ -134,6 +134,12 @@ private void InitializeGroupBy()
private void InitializeAutoSize()
{
+ // Only Table and Wide views support autosize.
+ if (this is not (TableViewGenerator or WideViewGenerator))
+ {
+ return;
+ }
+
// check the autosize flag first
if (parameters != null && parameters.autosize.HasValue)
{
diff --git a/src/System.Management.Automation/FormatAndOutput/common/PSStyle.cs b/src/System.Management.Automation/FormatAndOutput/common/PSStyle.cs
index 3f927afd7d5..00452508ff3 100644
--- a/src/System.Management.Automation/FormatAndOutput/common/PSStyle.cs
+++ b/src/System.Management.Automation/FormatAndOutput/common/PSStyle.cs
@@ -641,6 +641,11 @@ public FileInfoFormatting()
///
public OutputRendering OutputRendering { get; set; } = OutputRendering.Host;
+ ///
+ /// Gets or sets whether to force the default implicit formatting to use 'AutoSize'.
+ ///
+ public bool AutoSizeDefaultFormatting { get; set; }
+
///
/// Gets value to turn off all attributes.
///
diff --git a/src/System.Management.Automation/FormatAndOutput/format-default/format-default.cs b/src/System.Management.Automation/FormatAndOutput/format-default/format-default.cs
index 7d7a993d539..a33272a3a26 100644
--- a/src/System.Management.Automation/FormatAndOutput/format-default/format-default.cs
+++ b/src/System.Management.Automation/FormatAndOutput/format-default/format-default.cs
@@ -20,5 +20,20 @@ public FormatDefaultCommand()
{
this.implementation = new InnerFormatShapeCommand(FormatShape.Undefined);
}
+
+ ///
+ /// Hook up the AutoSize override, if requested, before handing off to the
+ /// implementation.
+ ///
+ protected override void BeginProcessing()
+ {
+ if (PSStyle.Instance.AutoSizeDefaultFormatting)
+ {
+ var parameters = new FormattingCommandLineParameters { autosize = true };
+ ((InnerFormatShapeCommand)this.implementation).SetCommandLineParameters(parameters);
+ }
+
+ base.BeginProcessing();
+ }
}
}
diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj
index 1f536241688..47354f62c6c 100644
--- a/src/System.Management.Automation/System.Management.Automation.csproj
+++ b/src/System.Management.Automation/System.Management.Automation.csproj
@@ -43,7 +43,7 @@
-
+
diff --git a/src/System.Management.Automation/engine/PSConfiguration.cs b/src/System.Management.Automation/engine/PSConfiguration.cs
index 419a4cae95f..63996cebdf0 100644
--- a/src/System.Management.Automation/engine/PSConfiguration.cs
+++ b/src/System.Management.Automation/engine/PSConfiguration.cs
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.IO;
using System.Management.Automation.Internal;
+using System.Security;
using System.Text;
using System.Threading;
@@ -411,6 +412,23 @@ private T ReadValueFromFile(ConfigScope scope, string key, T defaultValue = d
configData = serializer.Deserialize(jsonReader) ?? emptyConfig;
}
+ catch (Exception exc) when (
+ scope == ConfigScope.CurrentUser &&
+ (exc is IOException || exc is UnauthorizedAccessException || exc is SecurityException || exc is JsonException))
+ {
+ // The per-user configuration file is unreadable (e.g. OneDrive cloud file provider
+ // not running, permission denied, ACL denied, or corrupt/malformed JSON). Rather
+ // than failing pwsh startup, fall back to defaults and emit a warning so the user
+ // knows the file was skipped. See https://github.com/PowerShell/PowerShell/issues/27370.
+ //
+ // We intentionally do NOT apply this fallback to ConfigScope.AllUsers: that file is
+ // admin-owned and on non-Windows platforms is the only source for security-relevant
+ // policies (ScriptBlockLogging, Transcription, ConsoleSessionConfiguration, etc.).
+ // If we cannot prove the admin's intent we must fail closed.
+ TryWriteConfigWarning(StringUtil.Format(PSConfigurationStrings.CanNotReadConfigurationFile, fileName, exc.Message));
+
+ configData = emptyConfig;
+ }
catch (Exception exc)
{
throw PSTraceSource.NewInvalidOperationException(exc, PSConfigurationStrings.CanNotConfigurationFile, args: fileName);
@@ -435,12 +453,47 @@ private T ReadValueFromFile(ConfigScope scope, string key, T defaultValue = d
if (configData != emptyConfig && configData.TryGetValue(key, StringComparison.OrdinalIgnoreCase, out JToken jToken))
{
- return jToken.ToObject(serializer) ?? defaultValue;
+ try
+ {
+ return jToken.ToObject(serializer) ?? defaultValue;
+ }
+ catch (JsonException exc) when (scope == ConfigScope.CurrentUser)
+ {
+ // The per-user JSON parsed successfully, but the value at can't be
+ // materialized as T (wrong type, malformed sub-document, etc.). Fall back
+ // to the caller's default for this setting and emit a warning, mirroring
+ // the file-level fallback above. AllUsers stays fail-closed for
+ // security-relevant policies.
+ // See https://github.com/PowerShell/PowerShell/issues/27370.
+ TryWriteConfigWarning(StringUtil.Format(PSConfigurationStrings.CanNotReadConfigurationValue, key, fileName, exc.Message));
+ return defaultValue;
+ }
}
return defaultValue;
}
+ ///
+ /// Best-effort emission of a warning when the per-user configuration file (or one of its
+ /// values) can't be read. is invoked very early in pwsh
+ /// startup -- before any host, runspace, or PowerShell warning stream exists -- so we
+ /// write directly to . This matches existing startup-time
+ /// stderr writes in ConsoleHost (e.g. CannotLoadPSReadline). Centralizing this here
+ /// keeps formatting consistent and gives future hosts a single seam to swap the channel.
+ /// Failures inside the writer itself are swallowed so logging issues never block startup.
+ ///
+ private static void TryWriteConfigWarning(string message)
+ {
+ try
+ {
+ Console.Error.WriteLine("WARNING: " + message);
+ }
+ catch
+ {
+ // Best-effort warning; never let logging failures block startup.
+ }
+ }
+
private static FileStream OpenFileStreamWithRetry(string fullPath, FileMode mode, FileAccess access, FileShare share)
{
const int MaxTries = 5;
diff --git a/src/System.Management.Automation/engine/parser/Compiler.cs b/src/System.Management.Automation/engine/parser/Compiler.cs
index 5ce6a6c6dc8..f83ed0fe63c 100644
--- a/src/System.Management.Automation/engine/parser/Compiler.cs
+++ b/src/System.Management.Automation/engine/parser/Compiler.cs
@@ -477,6 +477,9 @@ internal static class CachedReflectionInfo
internal static readonly MethodInfo PSSetMemberBinder_SetAdaptedValue =
typeof(PSSetMemberBinder).GetMethod(nameof(PSSetMemberBinder.SetAdaptedValue), StaticFlags);
+ internal static readonly MethodInfo PSSetMemberBinder_SetInstanceMemberValue =
+ typeof(PSSetMemberBinder).GetMethod(nameof(PSSetMemberBinder.SetInstanceMemberValue), StaticFlags);
+
internal static readonly MethodInfo PSTraceSource_WriteLine =
typeof(PSTraceSource).GetMethod(nameof(PSTraceSource.WriteLine), InstanceFlags, new[] { typeof(string), typeof(object) });
diff --git a/src/System.Management.Automation/engine/remoting/common/RemoteSessionHyperVSocket.cs b/src/System.Management.Automation/engine/remoting/common/RemoteSessionHyperVSocket.cs
index cd18dc511b1..512cc475922 100644
--- a/src/System.Management.Automation/engine/remoting/common/RemoteSessionHyperVSocket.cs
+++ b/src/System.Management.Automation/engine/remoting/common/RemoteSessionHyperVSocket.cs
@@ -177,6 +177,25 @@ internal sealed class RemoteSessionHyperVSocketServer : IDisposable
#endregion
+ #region Helpers
+
+ ///
+ /// Gets the partition-specific Hyper-V VM ID that the session server listens on.
+ ///
+ ///
+ /// When , communication stays within the same partition
+ /// (HV_GUID_LOOPBACK); otherwise it targets the parent/host partition (HV_GUID_PARENT).
+ ///
+ /// The VM ID used to bind the listening socket.
+ internal static Guid GetListenerVmId(bool loopbackMode)
+ {
+ Guid loopbackId = new Guid("e0e16197-dd56-4a10-9195-5ee7a155a838"); // HV_GUID_LOOPBACK
+ Guid parentId = new Guid("a42e7cda-d03f-480c-9cc2-a4de20abb878"); // HV_GUID_PARENT
+ return loopbackMode ? loopbackId : parentId;
+ }
+
+ #endregion
+
#region Constructors
public RemoteSessionHyperVSocketServer(bool LoopbackMode)
@@ -188,9 +207,7 @@ public RemoteSessionHyperVSocketServer(bool LoopbackMode)
try
{
Guid serviceId = new Guid("a5201c21-2770-4c11-a68e-f182edb29220"); // HV_GUID_VM_SESSION_SERVICE_ID_2
- Guid loopbackId = new Guid("e0e16197-dd56-4a10-9195-5ee7a155a838"); // HV_GUID_LOOPBACK
- Guid parentId = new Guid("a42e7cda-d03f-480c-9cc2-a4de20abb878"); // HV_GUID_PARENT
- Guid vmId = LoopbackMode ? loopbackId : parentId;
+ Guid vmId = GetListenerVmId(LoopbackMode);
HyperVSocketEndPoint endpoint = new HyperVSocketEndPoint(HyperVSocketEndPoint.AF_HYPERV, vmId, serviceId);
Socket listenSocket = new Socket(endpoint.AddressFamily, SocketType.Stream, (System.Net.Sockets.ProtocolType)1);
@@ -250,7 +267,11 @@ public RemoteSessionHyperVSocketServer(bool LoopbackMode, string token, DateTime
try
{
Guid serviceId = new Guid("a5201c21-2770-4c11-a68e-f182edb29220"); // HV_GUID_VM_SESSION_SERVICE_ID_2
- HyperVSocketEndPoint endpoint = new HyperVSocketEndPoint(HyperVSocketEndPoint.AF_HYPERV, Guid.Empty, serviceId);
+
+ // Bind to a partition-specific VM ID (host parent, or local loopback), consistent
+ // with the V1 server constructor above.
+ Guid vmId = GetListenerVmId(LoopbackMode);
+ HyperVSocketEndPoint endpoint = new HyperVSocketEndPoint(HyperVSocketEndPoint.AF_HYPERV, vmId, serviceId);
Socket listenSocket = new Socket(endpoint.AddressFamily, SocketType.Stream, (System.Net.Sockets.ProtocolType)1);
listenSocket.Bind(endpoint);
diff --git a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs
index 5913c98829b..879af36b005 100644
--- a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs
+++ b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs
@@ -6112,9 +6112,10 @@ public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, Dy
// If there is an instance member, we generate (roughly) the following:
// PSMemberInfo memberInfo;
// if (PSGetMemberBinder.TryGetInstanceMember(target.Value, Name, out memberInfo))
- // memberInfo.Value = value;
+ // PSSetMemberBinder.SetInstanceMemberValue(memberInfo, target.Value, value);
// else
// update the site
+ //
// We use a generic method like this because:
// * If one object has an instance property with a given name, it's like many others do as well
// * We want to avoid generating new sites for every object with an instance member
@@ -6129,19 +6130,28 @@ public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, Dy
// but we add the check because the DLR requires a non-empty check when the target implements IDynamicMetaObjectProvider,
// which PSObject does. The version check is also marginally useful if we knew we'd never see another
// instance member with this member name, but we're not tracking things to make that a useful test.
+ ParameterExpression memberInfoVar = Expression.Variable(typeof(PSMemberInfo));
- var memberInfoVar = Expression.Variable(typeof(PSMemberInfo));
- var temp = Expression.Variable(typeof(object));
- var expr = Expression.Condition(
- Expression.Call(CachedReflectionInfo.PSGetMemberBinder_TryGetInstanceMember,
- target.Expression.Cast(typeof(object)), Expression.Constant(Name), memberInfoVar),
- Expression.Assign(Expression.Property(memberInfoVar, "Value"), value.Expression.Cast(typeof(object))),
+ ConditionalExpression expr = Expression.Condition(
+ Expression.Call(
+ CachedReflectionInfo.PSGetMemberBinder_TryGetInstanceMember,
+ target.Expression.Cast(typeof(object)),
+ Expression.Constant(Name),
+ memberInfoVar),
+ Expression.Call(
+ CachedReflectionInfo.PSSetMemberBinder_SetInstanceMemberValue,
+ memberInfoVar,
+ target.Expression.Cast(typeof(object)),
+ value.Expression.Cast(typeof(object))),
this.GetUpdateExpression(typeof(object)));
- var bindingRestrictions = BinderUtils.GetVersionCheck(_getMemberBinder, _getMemberBinder._version)
+
+ BindingRestrictions bindingRestrictions = BinderUtils.GetVersionCheck(_getMemberBinder, _getMemberBinder._version)
.Merge(value.PSGetTypeRestriction());
- return (new DynamicMetaObject(Expression.Block(new[] { memberInfoVar, temp }, expr),
- bindingRestrictions)).WriteToDebugLog(this);
+ return new DynamicMetaObject(
+ Expression.Block(new[] { memberInfoVar }, expr),
+ bindingRestrictions)
+ .WriteToDebugLog(this);
}
if (targetValue is IDictionary)
@@ -6194,13 +6204,35 @@ public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, Dy
{
restrictions = restrictions.Merge(BinderUtils.GetLanguageModeCheckIfHasEverUsedConstrainedLanguage());
- // Validate that this is allowed in the current language mode.
- DynamicMetaObject runtimeError = PSGetMemberBinder.EnsureAllowedInLanguageMode(
- target, targetValue, Name, _static, new[] { value }, restrictions,
- "PropertySetterNotSupportedInConstrainedLanguage", ParserStrings.PropertySetConstrainedLanguage);
- if (runtimeError != null)
+ ExecutionContext context = LocalPipeline.GetExecutionContextFromTLS();
+ if (context is { LanguageMode: PSLanguageMode.ConstrainedLanguage })
{
- return runtimeError.WriteToDebugLog(this);
+ Type constrainedTargetType = targetValue as Type;
+ if ((!_static) || (constrainedTargetType == null))
+ {
+ constrainedTargetType = targetValue.GetType();
+ }
+
+ if (!CoreTypes.Contains(constrainedTargetType))
+ {
+ if (SystemPolicy.GetSystemLockdownPolicy() != SystemEnforcementMode.Audit)
+ {
+ return target.ThrowRuntimeError(
+ new[] { value },
+ restrictions,
+ "PropertySetterNotSupportedInConstrainedLanguage",
+ ParserStrings.PropertySetConstrainedLanguage)
+ .WriteToDebugLog(this);
+ }
+
+ string targetName = constrainedTargetType.FullName ?? string.Empty;
+ SystemPolicy.LogWDACAuditMessage(
+ context: context,
+ title: ParameterBinderStrings.WDACBinderInvocationLogTitle,
+ message: StringUtil.Format(ParameterBinderStrings.WDACBinderInvocationLogMessage, Name, targetName),
+ fqid: "MethodOrPropertyInvocationNotAllowed",
+ dropIntoDebugger: true);
+ }
}
}
@@ -6448,6 +6480,45 @@ public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, Dy
restrictions).WriteToDebugLog(this);
}
+ internal static object SetInstanceMemberValue(PSMemberInfo memberInfo, object target, object value)
+ {
+ if (ExecutionContext.HasEverUsedConstrainedLanguage)
+ {
+ ExecutionContext context = LocalPipeline.GetExecutionContextFromTLS();
+ // Explicit `GetType() ==` instead of `is` as we only want to allow `PSNoteProperty`,
+ // classes that inherits from it should be excluded.
+ if ((context != null) && (context.LanguageMode == PSLanguageMode.ConstrainedLanguage) && (memberInfo.GetType() != typeof(PSNoteProperty)))
+ {
+ object baseObject = PSObject.Base(target);
+ if ((baseObject == null) || !CoreTypes.Contains(baseObject.GetType()))
+ {
+ if (SystemPolicy.GetSystemLockdownPolicy() != SystemEnforcementMode.Audit)
+ {
+ throw InterpreterError.NewInterpreterException(
+ target,
+ typeof(PSInvalidOperationException),
+ null,
+ "PropertySetterNotSupportedInConstrainedLanguage",
+ ParserStrings.PropertySetConstrainedLanguage);
+ }
+
+ SystemPolicy.LogWDACAuditMessage(
+ context: context,
+ title: ParameterBinderStrings.WDACBinderInvocationLogTitle,
+ message: StringUtil.Format(
+ ParameterBinderStrings.WDACBinderInvocationLogMessage,
+ memberInfo.Name ?? string.Empty,
+ baseObject?.GetType().FullName ?? target.GetType().FullName ?? string.Empty),
+ fqid: "MethodOrPropertyInvocationNotAllowed",
+ dropIntoDebugger: true);
+ }
+ }
+ }
+
+ memberInfo.Value = value;
+ return value;
+ }
+
private DynamicMetaObject GeneratePropertyAssignmentException(BindingRestrictions restrictions)
{
Expression innerException = Expression.New(CachedReflectionInfo.SetValueException_ctor,
diff --git a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs
index 50054f6501d..0c9b31e1d31 100644
--- a/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs
+++ b/src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs
@@ -3102,6 +3102,30 @@ internal static object ForEach(IEnumerator enumerator, object expression, object
else
{
var property = member as PSPropertyInfo;
+ if (languageMode == PSLanguageMode.ConstrainedLanguage
+ && numArgs != 0
+ && !CoreTypes.Contains(basedCurrent.GetType()))
+ {
+ if (SystemPolicy.GetSystemLockdownPolicy() != SystemEnforcementMode.Audit)
+ {
+ throw InterpreterError.NewInterpreterException(
+ current,
+ typeof(PSInvalidOperationException),
+ null,
+ "PropertySetterNotSupportedInConstrainedLanguage",
+ ParserStrings.PropertySetConstrainedLanguage);
+ }
+
+ SystemPolicy.LogWDACAuditMessage(
+ context: context,
+ title: ParameterBinderStrings.WDACBinderInvocationLogTitle,
+ message: StringUtil.Format(
+ ParameterBinderStrings.WDACBinderInvocationLogMessage,
+ name,
+ basedCurrent.GetType().FullName ?? string.Empty),
+ fqid: "MethodOrPropertyInvocationNotAllowed",
+ dropIntoDebugger: true);
+ }
switch (numArgs)
{
diff --git a/src/System.Management.Automation/help/CabinetNativeApi.cs b/src/System.Management.Automation/help/CabinetNativeApi.cs
index cbf466a99fa..c33b711b04f 100644
--- a/src/System.Management.Automation/help/CabinetNativeApi.cs
+++ b/src/System.Management.Automation/help/CabinetNativeApi.cs
@@ -251,6 +251,17 @@ internal static IntPtr FdiOpen(string filename, int oflag, int pmode)
{
return new IntPtr(-1);
}
+ catch (Exception e) when (e is UnauthorizedAccessException ||
+ e is ArgumentException ||
+ e is NotSupportedException ||
+ e is System.Security.SecurityException)
+ {
+ // FdiOpen is used both as a reverse-P/Invoke callback (invoked by the native
+ // FDI engine) and as a direct call from FdiNotify to create the destination file.
+ // In either path it must never throw across native FDI frames; return -1 to
+ // signal open failure, matching the IOException handler above.
+ return new IntPtr(-1);
+ }
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
@@ -315,18 +326,27 @@ internal static int FdiWrite(IntPtr fp, byte[] buffer, int count)
internal static int FdiClose(IntPtr fp)
{
- GCHandle handle = GCHandle.FromIntPtr(fp);
- FileStream stream = (FileStream)handle.Target;
-
- if (stream == null)
+ if (fp == IntPtr.Zero || fp == new IntPtr(-1))
{
return -1;
}
- else
+
+ GCHandle handle = GCHandle.FromIntPtr(fp);
+ try
{
+ FileStream stream = (FileStream)handle.Target;
+ if (stream == null)
+ {
+ return -1;
+ }
+
stream.Dispose();
return 0;
}
+ catch (IOException)
+ {
+ return -1;
+ }
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
@@ -364,6 +384,13 @@ internal static int FdiSeek(IntPtr fp, int offset, int origin)
/// Thrown when path validation fails.
private static string ValidateExtractionPath(string helpDirectory, string entryPath)
{
+ // Reject empty CAB entry names that would otherwise resolve to the help directory root.
+ if (string.IsNullOrEmpty(entryPath))
+ {
+ throw new InvalidOperationException(
+ $"CAB entry contains an empty path: '{entryPath}'");
+ }
+
// Reject absolute paths, UNC paths, or rooted paths in CAB entries
if (Path.IsPathRooted(entryPath))
{
@@ -401,6 +428,13 @@ private static string ValidateExtractionPath(string helpDirectory, string entryP
$"CAB entry path is invalid. Entry '{entryPath}' would extract to '{resolvedPath}' which is outside the intended directory '{canonicalHelpDir}'");
}
+ // Reject entries that resolve exactly to the help directory root (e.g. empty entries).
+ if (resolvedPath.Length <= canonicalHelpDir.Length)
+ {
+ throw new InvalidOperationException(
+ $"CAB entry '{entryPath}' resolves to the help directory root '{canonicalHelpDir}'");
+ }
+
return resolvedPath;
}
@@ -443,7 +477,16 @@ e is IOException ||
case FdiNotificationType.FdintCLOSE_FILE_INFO:
{
// Close the file
- CabinetNativeApi.FdiClose(fdin.hf);
+ int closeResult = CabinetNativeApi.FdiClose(fdin.hf);
+
+ // FDI's FNFDINOTIFY contract uses FALSE (0) to signal a CLOSE_FILE_INFO
+ // failure. A non-zero FdiClose result here means the final flush/Dispose
+ // failed (e.g. disk-full / I/O error), leaving a truncated file on disk;
+ // abort this entry rather than reporting a corrupt extraction as success.
+ if (closeResult != 0)
+ {
+ return IntPtr.Zero;
+ }
// Get the intended help directory
string helpDirectory = Marshal.PtrToStringAnsi(fdin.pv);
@@ -466,7 +509,6 @@ e is PathTooLongException ||
try
{
- // Set the file attributes
IntPtr hFile = PlatformInvokes.CreateFile(
absoluteFilePath,
PlatformInvokes.FileDesiredAccess.GenericRead | PlatformInvokes.FileDesiredAccess.GenericWrite,
@@ -476,7 +518,10 @@ e is PathTooLongException ||
PlatformInvokes.FileAttributes.Normal,
IntPtr.Zero);
- if (hFile != IntPtr.Zero)
+ // CreateFile returns INVALID_HANDLE_VALUE (-1) on failure, not Zero.
+ bool validHandle = hFile != IntPtr.Zero && hFile != new IntPtr(-1);
+
+ if (validHandle)
{
PlatformInvokes.FILETIME ftFile = new PlatformInvokes.FILETIME();
if (PlatformInvokes.DosDateTimeToFileTime(fdin.date, fdin.time, ftFile))
@@ -506,6 +551,11 @@ e is UnauthorizedAccessException ||
// Call notification function
return new IntPtr(1);
}
+ case FdiNotificationType.FdintNEXT_CABINET:
+ {
+ // Update-Help content is always a single self-contained cabinet.
+ return new IntPtr(-1);
+ }
}
return new IntPtr(0);
diff --git a/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs b/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs
index 687faa68246..c484969c3f3 100644
--- a/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs
+++ b/src/System.Management.Automation/help/UpdatableHelpCommandBase.cs
@@ -261,6 +261,17 @@ private void ProcessSingleModuleObject(PSModuleInfo module, ExecutionContext con
return;
}
+ if (module.Name.Length > UpdatableHelpModuleInfo.MaxModuleNameLength)
+ {
+ if (!noErrors)
+ {
+ ProcessException(module.Name, null, new UpdatableHelpSystemException(
+ "ModuleNameTooLong", StringUtil.Format(HelpDisplayStrings.ModuleNameTooLong, module.Name.Length, UpdatableHelpModuleInfo.MaxModuleNameLength),
+ ErrorCategory.InvalidArgument, null, null));
+ }
+ return;
+ }
+
var keyTuple2 = new Tuple(module.Name, module.Version);
if (!helpModules.ContainsKey(keyTuple2))
{
diff --git a/src/System.Management.Automation/help/UpdatableHelpModuleInfo.cs b/src/System.Management.Automation/help/UpdatableHelpModuleInfo.cs
index ccf0b95f0f6..410a5dd18eb 100644
--- a/src/System.Management.Automation/help/UpdatableHelpModuleInfo.cs
+++ b/src/System.Management.Automation/help/UpdatableHelpModuleInfo.cs
@@ -18,6 +18,14 @@ internal class UpdatableHelpModuleInfo
#endif
internal static readonly string HelpIntoXmlName = "HelpInfo.xml";
+ // Defensive upper bound on the module name length. The module name flows
+ // unmodified into generated help file names (GetHelpContentName /
+ // GetHelpInfoName) and, via ModuleBase (...\Modules\\\), can
+ // appear more than once in a resolved path. This is a defensive cap on the
+ // caller-influenced component; it does not by itself guarantee the full path
+ // stays within any specific OS limit (long paths are honored when enabled).
+ internal const int MaxModuleNameLength = 128;
+
///
/// Class constructor.
///
diff --git a/src/System.Management.Automation/resources/HelpDisplayStrings.resx b/src/System.Management.Automation/resources/HelpDisplayStrings.resx
index 5f4b7119ef9..2acf07685a0 100644
--- a/src/System.Management.Automation/resources/HelpDisplayStrings.resx
+++ b/src/System.Management.Automation/resources/HelpDisplayStrings.resx
@@ -346,6 +346,9 @@
The following parameter must not be null or empty: Module.
+
+ The module name exceeds the maximum supported length of {1} characters (actual length: {0}).
+
The following parameter must not be null or empty: Path.
diff --git a/src/System.Management.Automation/resources/HelpErrors.resx b/src/System.Management.Automation/resources/HelpErrors.resx
index cf8f8fa8808..029548fb9da 100644
--- a/src/System.Management.Automation/resources/HelpErrors.resx
+++ b/src/System.Management.Automation/resources/HelpErrors.resx
@@ -190,4 +190,7 @@ To update these Help topics, start PowerShell by using the "Run as Administrator
Cannot get help from a network location when in a restricted session.
+
+ Command not allowed in a restricted session.
+
diff --git a/src/System.Management.Automation/resources/PSConfigurationStrings.resx b/src/System.Management.Automation/resources/PSConfigurationStrings.resx
index 26dff6b06fb..0e665322092 100644
--- a/src/System.Management.Automation/resources/PSConfigurationStrings.resx
+++ b/src/System.Management.Automation/resources/PSConfigurationStrings.resx
@@ -120,4 +120,10 @@
PowerShell has stopped working because of a security issue: Cannot read the configuration file: {0}
+
+ Cannot read the PowerShell configuration file '{0}': {1}. Falling back to default settings.
+
+
+ Cannot read setting '{0}' from PowerShell configuration file '{1}': {2}. Falling back to default for this setting.
+
diff --git a/src/System.Management.Automation/resources/cs/CoreClrStubResources.cs.resx b/src/System.Management.Automation/resources/cs/CoreClrStubResources.cs.resx
index 22a5f3ea2d7..2e58c50083d 100644
--- a/src/System.Management.Automation/resources/cs/CoreClrStubResources.cs.resx
+++ b/src/System.Management.Automation/resources/cs/CoreClrStubResources.cs.resx
@@ -138,4 +138,8 @@
Neznámá chyba {0}.
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/cs/FileSystemProviderStrings.cs.resx b/src/System.Management.Automation/resources/cs/FileSystemProviderStrings.cs.resx
index 4420cda59a0..a3ba67e3460 100644
--- a/src/System.Management.Automation/resources/cs/FileSystemProviderStrings.cs.resx
+++ b/src/System.Management.Automation/resources/cs/FileSystemProviderStrings.cs.resx
@@ -240,6 +240,15 @@
Cestu {0} nejde zpracovat, protože cíl představuje rezervovaný název zařízení.
+
+ Vzdálený název adresáře „{0}“ nejde zpracovat, protože by mohl vést k procházení cest.
+
+
+ Vzdálený název souboru „{0}“ nejde zpracovat, protože by mohl vést k procházení cest.
+
+
+ Vzdálený název alternativního datového proudu „{0}“ nejde zpracovat, protože by mohl vést k procházení cest.
+
Při zadání -AsByteStream se kódování nepoužívá.
diff --git a/src/System.Management.Automation/resources/cs/HelpErrors.cs.resx b/src/System.Management.Automation/resources/cs/HelpErrors.cs.resx
index 7a5e9e89d2c..744bc16cefb 100644
--- a/src/System.Management.Automation/resources/cs/HelpErrors.cs.resx
+++ b/src/System.Management.Automation/resources/cs/HelpErrors.cs.resx
@@ -190,4 +190,7 @@ Pokud chcete tato témata nápovědy aktualizovat, spusťte PowerShell pomocí p
V omezené relaci nejde získat nápovědu ze síťového umístění.
+
+ Příkaz není v omezené relaci povolen.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/cs/PSConfigurationStrings.cs.resx b/src/System.Management.Automation/resources/cs/PSConfigurationStrings.cs.resx
index 900b72e9fc1..80fd29d24bd 100644
--- a/src/System.Management.Automation/resources/cs/PSConfigurationStrings.cs.resx
+++ b/src/System.Management.Automation/resources/cs/PSConfigurationStrings.cs.resx
@@ -120,4 +120,10 @@
PowerShell přestal fungovat kvůli problému se zabezpečením: Konfigurační soubor nejde přečíst: {0}
+
+ Konfigurační soubor prostředí PowerShell nelze číst '{0}': {1}. Návrat k výchozímu nastavení.
+
+
+ Nelze číst '{0}' nastavení z konfiguračního souboru prostředí PowerShell '{1}': {2}. Pro toto nastavení se obnoví výchozí nastavení.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/de/CoreClrStubResources.de.resx b/src/System.Management.Automation/resources/de/CoreClrStubResources.de.resx
index 2bce9eb9687..91956f86c8d 100644
--- a/src/System.Management.Automation/resources/de/CoreClrStubResources.de.resx
+++ b/src/System.Management.Automation/resources/de/CoreClrStubResources.de.resx
@@ -138,4 +138,8 @@
Unbekannter Fehler „{0}“.
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/de/FileSystemProviderStrings.de.resx b/src/System.Management.Automation/resources/de/FileSystemProviderStrings.de.resx
index 43f7e9fa78f..1eca9afe3cb 100644
--- a/src/System.Management.Automation/resources/de/FileSystemProviderStrings.de.resx
+++ b/src/System.Management.Automation/resources/de/FileSystemProviderStrings.de.resx
@@ -240,6 +240,15 @@
Der Pfad „{0}“ kann nicht verarbeitet werden, da das Ziel einen reservierten Gerätenamen darstellt.
+
+ Der Remoteverzeichnisname „{0}“ kann nicht verarbeitet werden, da dies zu einem Pfaddurchlauf führen kann.
+
+
+ Der Remotedateiname „{0}“ kann nicht verarbeitet werden, da dies zu einem Pfaddurchlauf führen kann.
+
+
+ Der Remotename des alternativen Datenstroms „{0}“ kann nicht verarbeitet werden, da dies zu einem Pfaddurchlauf führen kann.
+
Die Codierung wird nicht verwendet, wenn „-AsByteStream“ angegeben ist.
diff --git a/src/System.Management.Automation/resources/de/HelpErrors.de.resx b/src/System.Management.Automation/resources/de/HelpErrors.de.resx
index 2e0b6273476..59f243a9edb 100644
--- a/src/System.Management.Automation/resources/de/HelpErrors.de.resx
+++ b/src/System.Management.Automation/resources/de/HelpErrors.de.resx
@@ -190,4 +190,7 @@ Um diese Hilfethemen zu aktualisieren, starten Sie PowerShell mit dem Befehl „
In einer eingeschränkten Sitzung kann keine Hilfe von einem Netzwerkstandort abgerufen werden.
+
+ Der Befehl ist in einer eingeschränkten Sitzung nicht zulässig.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/de/PSConfigurationStrings.de.resx b/src/System.Management.Automation/resources/de/PSConfigurationStrings.de.resx
index 73dd8f23625..7daf0628772 100644
--- a/src/System.Management.Automation/resources/de/PSConfigurationStrings.de.resx
+++ b/src/System.Management.Automation/resources/de/PSConfigurationStrings.de.resx
@@ -120,4 +120,10 @@
PowerShell funktioniert aufgrund eines Sicherheitsproblems nicht mehr: Die Konfigurationsdatei kann nicht gelesen werden: {0}
+
+ Die PowerShell-Konfigurationsdatei '{0}' kann nicht gelesen werden: {1}. Fallback auf Standardeinstellungen.
+
+
+ Die Einstellungs'{0}' aus der PowerShell-Konfigurationsdatei '{1}': {2} kann nicht gelesen werden. Fallback auf die Standardeinstellung für diese Einstellung.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/es/CoreClrStubResources.es.resx b/src/System.Management.Automation/resources/es/CoreClrStubResources.es.resx
index 8430eb4b19c..cb661989c3a 100644
--- a/src/System.Management.Automation/resources/es/CoreClrStubResources.es.resx
+++ b/src/System.Management.Automation/resources/es/CoreClrStubResources.es.resx
@@ -138,4 +138,8 @@
Error desconocido "{0}".
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/es/FileSystemProviderStrings.es.resx b/src/System.Management.Automation/resources/es/FileSystemProviderStrings.es.resx
index 53e932534a4..6346f6b421a 100644
--- a/src/System.Management.Automation/resources/es/FileSystemProviderStrings.es.resx
+++ b/src/System.Management.Automation/resources/es/FileSystemProviderStrings.es.resx
@@ -240,6 +240,15 @@
No se puede procesar la ruta de acceso "{0}" porque el destino representa un nombre de dispositivo reservado.
+
+ No se puede procesar el nombre del directorio remoto "{0}" porque puede dar lugar a un recorrido de ruta de acceso.
+
+
+ No se puede procesar el nombre de archivo remoto "{0}" porque puede dar lugar a un recorrido de ruta de acceso.
+
+
+ No se puede procesar el nombre de flujo de datos alternativo remoto "{0}" porque puede dar lugar a un recorrido de ruta de acceso.
+
No se usa la codificación cuando se especifica "-AsByteStream".
diff --git a/src/System.Management.Automation/resources/es/HelpErrors.es.resx b/src/System.Management.Automation/resources/es/HelpErrors.es.resx
index bd2a7f276e8..975afdfb9f0 100644
--- a/src/System.Management.Automation/resources/es/HelpErrors.es.resx
+++ b/src/System.Management.Automation/resources/es/HelpErrors.es.resx
@@ -190,4 +190,7 @@ Para actualizar estos temas de Ayuda, inicie PowerShell con el comando "Ejecutar
No se puede obtener Ayuda de una ubicación de red cuando se está en una sesión restringida.
+
+ Comando no permitido en una sesión restringida.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/es/PSConfigurationStrings.es.resx b/src/System.Management.Automation/resources/es/PSConfigurationStrings.es.resx
index 7c833695182..832542fc6b2 100644
--- a/src/System.Management.Automation/resources/es/PSConfigurationStrings.es.resx
+++ b/src/System.Management.Automation/resources/es/PSConfigurationStrings.es.resx
@@ -120,4 +120,10 @@
PowerShell ha dejado de funcionar debido a un problema de seguridad: no se puede leer el archivo de configuración: {0}
+
+ No se puede leer el archivo de configuración de PowerShell '{0}': {1}. Revirtiendo a la configuración predeterminada.
+
+
+ No se puede leer la configuración '{0}' del archivo de configuración de PowerShell '{1}': {2}. Revirtiendo al valor predeterminado para esta configuración.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/fr/CoreClrStubResources.fr.resx b/src/System.Management.Automation/resources/fr/CoreClrStubResources.fr.resx
index 6ff6ba06271..3f4bef27f50 100644
--- a/src/System.Management.Automation/resources/fr/CoreClrStubResources.fr.resx
+++ b/src/System.Management.Automation/resources/fr/CoreClrStubResources.fr.resx
@@ -138,4 +138,8 @@
Erreur inconnue : « {0} ».
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/fr/FileSystemProviderStrings.fr.resx b/src/System.Management.Automation/resources/fr/FileSystemProviderStrings.fr.resx
index 331170171e1..c06a3429fb4 100644
--- a/src/System.Management.Automation/resources/fr/FileSystemProviderStrings.fr.resx
+++ b/src/System.Management.Automation/resources/fr/FileSystemProviderStrings.fr.resx
@@ -240,6 +240,15 @@
Impossible de traiter le chemin d’accès « {0} », car la cible représente un nom d’appareil réservé.
+
+ Impossible de traiter le nom de répertoire distant «{0}», car cela peut entraîner une traversée de chemin d’accès.
+
+
+ Impossible de traiter le nom de fichier distant «{0}», car cela peut entraîner une traversée de chemin d’accès.
+
+
+ Impossible de traiter le nom de flux de données alternatif distant « {0} » car cela pourrait entraîner un parcours de chemin d'accès (path traversal).
+
L’encodage n’est pas utilisé quand « -AsByteStream » est spécifié.
diff --git a/src/System.Management.Automation/resources/fr/HelpErrors.fr.resx b/src/System.Management.Automation/resources/fr/HelpErrors.fr.resx
index c18e57407f4..2e3762f9169 100644
--- a/src/System.Management.Automation/resources/fr/HelpErrors.fr.resx
+++ b/src/System.Management.Automation/resources/fr/HelpErrors.fr.resx
@@ -190,4 +190,7 @@ Pour mettre à jour ces rubriques d’Aide, démarrez PowerShell à l’aide de
Nous ne pouvons pas obtenir de l’Aide à partir d’un emplacement réseau dans une session restreinte.
+
+ Commande non autorisée dans une session restreinte.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/fr/PSConfigurationStrings.fr.resx b/src/System.Management.Automation/resources/fr/PSConfigurationStrings.fr.resx
index 30ee6c66a25..f2c1969f159 100644
--- a/src/System.Management.Automation/resources/fr/PSConfigurationStrings.fr.resx
+++ b/src/System.Management.Automation/resources/fr/PSConfigurationStrings.fr.resx
@@ -120,4 +120,10 @@
PowerShell a cessé de fonctionner en raison d’un problème de sécurité : impossible de lire le fichier de configuration : {0}
+
+ Impossible de lire le fichier de configuration PowerShell '{0}' : {1}. Rétablissement des paramètres par défaut.
+
+
+ Impossible de lire le paramètre '{0}' à partir du fichier de configuration PowerShell '{1}' : {2}. Retour à la valeur par défaut pour ce paramètre.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/it/CoreClrStubResources.it.resx b/src/System.Management.Automation/resources/it/CoreClrStubResources.it.resx
index 0e35bd74ccd..fc538fb2363 100644
--- a/src/System.Management.Automation/resources/it/CoreClrStubResources.it.resx
+++ b/src/System.Management.Automation/resources/it/CoreClrStubResources.it.resx
@@ -138,4 +138,8 @@
Errore sconosciuto: "{0}".
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/it/FileSystemProviderStrings.it.resx b/src/System.Management.Automation/resources/it/FileSystemProviderStrings.it.resx
index 00a2d9e1470..d107767a057 100644
--- a/src/System.Management.Automation/resources/it/FileSystemProviderStrings.it.resx
+++ b/src/System.Management.Automation/resources/it/FileSystemProviderStrings.it.resx
@@ -240,6 +240,15 @@
Non è possibile elaborare il percorso ''{0}'' perché la destinazione rappresenta un nome di dispositivo riservato.
+
+ Non è possibile elaborare il nome della directory remota '{0}' perché potrebbe causare l'attraversamento del percorso.
+
+
+ Non è possibile elaborare il nome del file remoto '{0}' perché potrebbe causare l'attraversamento del percorso.
+
+
+ Non è possibile elaborare il nome remoto del flusso di dati alternativo '{0}' perché potrebbe causare l'attraversamento del percorso.
+
Codifica non utilizzata quando è specificato ''-AsByteStream''.
diff --git a/src/System.Management.Automation/resources/it/HelpErrors.it.resx b/src/System.Management.Automation/resources/it/HelpErrors.it.resx
index ae5228ba676..b6b48f5422e 100644
--- a/src/System.Management.Automation/resources/it/HelpErrors.it.resx
+++ b/src/System.Management.Automation/resources/it/HelpErrors.it.resx
@@ -190,4 +190,7 @@ Per aggiornare questi argomenti della Guida, avviare PowerShell usando il comand
Non è possibile ottenere la Guida da una posizione di rete in una sessione con restrizioni.
+
+ Comando non consentito in una sessione con restrizioni.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/it/PSConfigurationStrings.it.resx b/src/System.Management.Automation/resources/it/PSConfigurationStrings.it.resx
index dceea43e1d5..d84f1458b98 100644
--- a/src/System.Management.Automation/resources/it/PSConfigurationStrings.it.resx
+++ b/src/System.Management.Automation/resources/it/PSConfigurationStrings.it.resx
@@ -120,4 +120,10 @@
PowerShell ha smesso di funzionare a causa di un problema di sicurezza: non è possibile leggere il file di configurazione: {0}
+
+ Non è possibile leggere il file di configurazione di PowerShell '{0}': {1}. Verrà eseguito il fallback alle impostazioni predefinite.
+
+
+ Cannot read setting '{0}' from PowerShell configuration file '{1}': {2}. Falling back to default for this setting.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ja/CoreClrStubResources.ja.resx b/src/System.Management.Automation/resources/ja/CoreClrStubResources.ja.resx
index 4f9a0f17557..4b698561651 100644
--- a/src/System.Management.Automation/resources/ja/CoreClrStubResources.ja.resx
+++ b/src/System.Management.Automation/resources/ja/CoreClrStubResources.ja.resx
@@ -138,4 +138,8 @@
不明なエラー "{0}"。
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ja/FileSystemProviderStrings.ja.resx b/src/System.Management.Automation/resources/ja/FileSystemProviderStrings.ja.resx
index 513db782e05..a155638cb6f 100644
--- a/src/System.Management.Automation/resources/ja/FileSystemProviderStrings.ja.resx
+++ b/src/System.Management.Automation/resources/ja/FileSystemProviderStrings.ja.resx
@@ -240,6 +240,15 @@
ターゲットが予約済みデバイス名を表しているため、パス '{0}' を処理できません。
+
+ リモートのディレクトリ名 '{0}' は、パスのトラバーサルを引き起こす可能性があるため、処理できません。
+
+
+ リモートのファイル名 '{0}' は、パスのトラバーサルを引き起こす可能性があるため、処理できません。
+
+
+ リモートの代替データ ストリーム名 '{0}' は、パスのトラバーサルを引き起こす可能性があるため、処理できません。
+
エンコードは、'-AsByteStream' が指定されている場合は使用されません。
diff --git a/src/System.Management.Automation/resources/ja/HelpErrors.ja.resx b/src/System.Management.Automation/resources/ja/HelpErrors.ja.resx
index 593bdd7c41e..6048f8416da 100644
--- a/src/System.Management.Automation/resources/ja/HelpErrors.ja.resx
+++ b/src/System.Management.Automation/resources/ja/HelpErrors.ja.resx
@@ -190,4 +190,7 @@
制限されたセッションでは、ネットワークの場所からヘルプを取得できません。
+
+ 制限されたセッションではコマンドを使用できません。
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ja/PSConfigurationStrings.ja.resx b/src/System.Management.Automation/resources/ja/PSConfigurationStrings.ja.resx
index 15fd480ced2..8c69a482337 100644
--- a/src/System.Management.Automation/resources/ja/PSConfigurationStrings.ja.resx
+++ b/src/System.Management.Automation/resources/ja/PSConfigurationStrings.ja.resx
@@ -120,4 +120,10 @@
PowerShell はセキュリティ上の問題により動作を停止しました: 構成ファイル {0} を読み取れません
+
+ PowerShell 構成ファイル '{0}' を読み取れません: {1}。既定値にフォールバックしています。
+
+
+ PowerShell 構成ファイル '{1}' から設定 '{0}' を読み取ることができません: {2}。この設定の既定値にフォールバックします。
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ko/CoreClrStubResources.ko.resx b/src/System.Management.Automation/resources/ko/CoreClrStubResources.ko.resx
index 4e5c305d920..09e76183084 100644
--- a/src/System.Management.Automation/resources/ko/CoreClrStubResources.ko.resx
+++ b/src/System.Management.Automation/resources/ko/CoreClrStubResources.ko.resx
@@ -138,4 +138,8 @@
알 수 없는 오류 {0}이(가) 발생했습니다.
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ko/FileSystemProviderStrings.ko.resx b/src/System.Management.Automation/resources/ko/FileSystemProviderStrings.ko.resx
index 83ff373cc05..353cfe26366 100644
--- a/src/System.Management.Automation/resources/ko/FileSystemProviderStrings.ko.resx
+++ b/src/System.Management.Automation/resources/ko/FileSystemProviderStrings.ko.resx
@@ -240,6 +240,15 @@
대상이 예약된 디바이스 이름을 나타내므로 경로 '{0}'을(를) 처리할 수 없습니다.
+
+ 경로 통과가 발생할 수 있으므로 원격 디렉터리 이름 '{0}'을(를) 처리할 수 없습니다.
+
+
+ 경로 통과가 발생할 수 있으므로 원격 파일 이름 '{0}'을(를) 처리할 수 없습니다.
+
+
+ 경로 통과가 발생할 수 있으므로 원격 대체 데이터 스트림 이름 '{0}'을(를) 처리할 수 없습니다.
+
'-AsByteStream'이 지정되면 인코딩은 사용되지 않습니다.
diff --git a/src/System.Management.Automation/resources/ko/HelpErrors.ko.resx b/src/System.Management.Automation/resources/ko/HelpErrors.ko.resx
index 3ce13056f98..c0c030a4bb2 100644
--- a/src/System.Management.Automation/resources/ko/HelpErrors.ko.resx
+++ b/src/System.Management.Automation/resources/ko/HelpErrors.ko.resx
@@ -190,4 +190,7 @@
제한된 세션에 있을 때 네트워크 위치에서 도움을 받을 수 없습니다.
+
+ 제한된 세션에서는 명령을 사용할 수 없습니다.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ko/PSConfigurationStrings.ko.resx b/src/System.Management.Automation/resources/ko/PSConfigurationStrings.ko.resx
index 5cc6ae88f91..0dcb056634d 100644
--- a/src/System.Management.Automation/resources/ko/PSConfigurationStrings.ko.resx
+++ b/src/System.Management.Automation/resources/ko/PSConfigurationStrings.ko.resx
@@ -120,4 +120,10 @@
보안 문제로 인해 PowerShell이 작동을 중지했습니다. 구성 파일을 읽을 수 없습니다. {0}
+
+ PowerShell 구성 파일 '{0}' 읽을 수 없습니다. {1}. 기본 설정으로 대체합니다.
+
+
+ PowerShell 구성 파일 '{1}'에서 설정 '{0}' 읽을 수 없습니다. {2}. 이 설정에 대한 기본값으로 되돌아갑니다.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/pl/CoreClrStubResources.pl.resx b/src/System.Management.Automation/resources/pl/CoreClrStubResources.pl.resx
index 96cd795fde3..27aa1410ef9 100644
--- a/src/System.Management.Automation/resources/pl/CoreClrStubResources.pl.resx
+++ b/src/System.Management.Automation/resources/pl/CoreClrStubResources.pl.resx
@@ -138,4 +138,8 @@
Nieznany błąd „{0}”.
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/pl/FileSystemProviderStrings.pl.resx b/src/System.Management.Automation/resources/pl/FileSystemProviderStrings.pl.resx
index a810900c7e2..6d3e7993d66 100644
--- a/src/System.Management.Automation/resources/pl/FileSystemProviderStrings.pl.resx
+++ b/src/System.Management.Automation/resources/pl/FileSystemProviderStrings.pl.resx
@@ -240,6 +240,15 @@
Nie można przetworzyć ścieżki „{0}”, ponieważ element docelowy reprezentuje zastrzeżoną nazwę urządzenia.
+
+ Nie można przetworzyć nazwy katalogu zdalnego '{0}', ponieważ może to spowodować przechodzenie ścieżek.
+
+
+ Nie można przetworzyć nazwy pliku zdalnego '{0}', ponieważ może to spowodować przechodzenie ścieżki.
+
+
+ Nie można przetworzyć nazwy Stream danych alternatywnych '{0}', ponieważ może to spowodować przechodzenie ścieżek.
+
Kodowanie nie jest używane, gdy określono element „-AsByteStream”.
diff --git a/src/System.Management.Automation/resources/pl/HelpErrors.pl.resx b/src/System.Management.Automation/resources/pl/HelpErrors.pl.resx
index 764db714552..24dedb0343b 100644
--- a/src/System.Management.Automation/resources/pl/HelpErrors.pl.resx
+++ b/src/System.Management.Automation/resources/pl/HelpErrors.pl.resx
@@ -190,4 +190,7 @@ Aby zaktualizować te tematy Pomocy, uruchom program PowerShell za pomocą polec
Nie można uzyskać pomocy z lokalizacji sieciowej w sesji z ograniczeniami.
+
+ Polecenie jest niedozwolone w sesji z ograniczeniami.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/pl/PSConfigurationStrings.pl.resx b/src/System.Management.Automation/resources/pl/PSConfigurationStrings.pl.resx
index e7b5611cdb7..8ba6ecdcfd1 100644
--- a/src/System.Management.Automation/resources/pl/PSConfigurationStrings.pl.resx
+++ b/src/System.Management.Automation/resources/pl/PSConfigurationStrings.pl.resx
@@ -120,4 +120,10 @@
Program PowerShell przestał działać z powodu problemu z zabezpieczeniami: nie można odczytać pliku konfiguracji: {0}
+
+ Nie można odczytać pliku konfiguracji programu PowerShell '{0}': {1}. Powrót do ustawień domyślnych.
+
+
+ Nie można odczytać '{0}' ustawień z pliku konfiguracji programu PowerShell '{1}': {2}. Przywracanie ustawień domyślnych dla tego ustawienia.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/pt-BR/CoreClrStubResources.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/CoreClrStubResources.pt-BR.resx
index e2bd8f78ca7..b92284afaa4 100644
--- a/src/System.Management.Automation/resources/pt-BR/CoreClrStubResources.pt-BR.resx
+++ b/src/System.Management.Automation/resources/pt-BR/CoreClrStubResources.pt-BR.resx
@@ -138,4 +138,8 @@
Erro desconhecido "{0}".
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/pt-BR/FileSystemProviderStrings.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/FileSystemProviderStrings.pt-BR.resx
index e94cb719cca..d4a9aa30e39 100644
--- a/src/System.Management.Automation/resources/pt-BR/FileSystemProviderStrings.pt-BR.resx
+++ b/src/System.Management.Automation/resources/pt-BR/FileSystemProviderStrings.pt-BR.resx
@@ -240,6 +240,15 @@
Não é possível processar o caminho '{0}' porque o destino representa um nome de dispositivo reservado.
+
+ Não é possível processar o nome do diretório remoto '{0}' porque ele pode resultar em passagem de caminho.
+
+
+ Não é possível processar o nome do arquivo remoto '{0}' porque ele pode resultar em passagem de caminho.
+
+
+ Não é possível processar o nome do Stream de Dados Alternativos remoto '{0}' porque ele pode resultar em passagem de caminho.
+
A codificação não é usada quando '-AsByteStream' é especificado.
diff --git a/src/System.Management.Automation/resources/pt-BR/HelpErrors.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/HelpErrors.pt-BR.resx
index 8590315b1b5..b88be3d768d 100644
--- a/src/System.Management.Automation/resources/pt-BR/HelpErrors.pt-BR.resx
+++ b/src/System.Management.Automation/resources/pt-BR/HelpErrors.pt-BR.resx
@@ -190,4 +190,7 @@ Para atualizar esses tópicos da Ajuda, inicie o PowerShell usando o comando "Ex
Não é possível obter ajuda de um local de rede em uma sessão restrita.
+
+ Comando não permitido em uma sessão restrita.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/pt-BR/PSConfigurationStrings.pt-BR.resx b/src/System.Management.Automation/resources/pt-BR/PSConfigurationStrings.pt-BR.resx
index 45b469db758..09644287ecb 100644
--- a/src/System.Management.Automation/resources/pt-BR/PSConfigurationStrings.pt-BR.resx
+++ b/src/System.Management.Automation/resources/pt-BR/PSConfigurationStrings.pt-BR.resx
@@ -120,4 +120,10 @@
PowerShell has stopped working because of a security issue: Cannot read the configuration file: {0}
+
+ Não é possível ler o arquivo de configuração do PowerShell '{0}': {1}. Voltando para as configurações padrão.
+
+
+ Não é possível ler o '{0}' de configuração do arquivo de configuração do PowerShell '{1}': {2}. Voltando ao padrão para esta configuração.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ru/CoreClrStubResources.ru.resx b/src/System.Management.Automation/resources/ru/CoreClrStubResources.ru.resx
index 9b9bd19baa3..e817f7fabd1 100644
--- a/src/System.Management.Automation/resources/ru/CoreClrStubResources.ru.resx
+++ b/src/System.Management.Automation/resources/ru/CoreClrStubResources.ru.resx
@@ -138,4 +138,8 @@
Неизвестная ошибка: "{0}".
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ru/FileSystemProviderStrings.ru.resx b/src/System.Management.Automation/resources/ru/FileSystemProviderStrings.ru.resx
index 6583905d948..8a72e86e26d 100644
--- a/src/System.Management.Automation/resources/ru/FileSystemProviderStrings.ru.resx
+++ b/src/System.Management.Automation/resources/ru/FileSystemProviderStrings.ru.resx
@@ -240,6 +240,15 @@
Невозможно обработать путь "{0}", так как целевой объект представляет зарезервированное имя устройства.
+
+ Невозможно обработать имя удаленного каталога "{0}", поскольку это может привести к обходу пути.
+
+
+ Невозможно обработать имя удаленного файла "{0}", поскольку это может привести к обходу пути.
+
+
+ Невозможно обработать имя удаленного альтернативного потока данных "{0}", поскольку это может привести к обходу пути.
+
Кодирование не используется, если указан параметр "-AsByteStream".
diff --git a/src/System.Management.Automation/resources/ru/HelpErrors.ru.resx b/src/System.Management.Automation/resources/ru/HelpErrors.ru.resx
index 7295cefa5af..c3f304e0a12 100644
--- a/src/System.Management.Automation/resources/ru/HelpErrors.ru.resx
+++ b/src/System.Management.Automation/resources/ru/HelpErrors.ru.resx
@@ -190,4 +190,7 @@
Невозможно получить помощь из сетевого расположения в режиме ограниченного доступа.
+
+ Команда не разрешена в ограниченном сеансе.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/ru/PSConfigurationStrings.ru.resx b/src/System.Management.Automation/resources/ru/PSConfigurationStrings.ru.resx
index 93bdaf35be1..d6b9aec02f4 100644
--- a/src/System.Management.Automation/resources/ru/PSConfigurationStrings.ru.resx
+++ b/src/System.Management.Automation/resources/ru/PSConfigurationStrings.ru.resx
@@ -120,4 +120,10 @@
Windows PowerShell перестал работать из-за проблемы безопасности: Не удается прочитать файл конфигурации: {0}
+
+ Не удается прочитать файл конфигурации PowerShell '{0}': {1}. Возврат к параметрам по умолчанию.
+
+
+ Не удается прочитать '{0}' параметров из файла конфигурации PowerShell '{1}': {2}. Возврат к значениям по умолчанию для этого параметра.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/tr/CoreClrStubResources.tr.resx b/src/System.Management.Automation/resources/tr/CoreClrStubResources.tr.resx
index dddf2691373..d68c95c253e 100644
--- a/src/System.Management.Automation/resources/tr/CoreClrStubResources.tr.resx
+++ b/src/System.Management.Automation/resources/tr/CoreClrStubResources.tr.resx
@@ -138,4 +138,8 @@
Bilinmeyen hata: "{0}".
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/tr/FileSystemProviderStrings.tr.resx b/src/System.Management.Automation/resources/tr/FileSystemProviderStrings.tr.resx
index cbd54390600..60e8415f4ef 100644
--- a/src/System.Management.Automation/resources/tr/FileSystemProviderStrings.tr.resx
+++ b/src/System.Management.Automation/resources/tr/FileSystemProviderStrings.tr.resx
@@ -240,6 +240,15 @@
Hedef ayrılmış bir cihaz adını temsil ettiğinden '{0}' yolu işlenemiyor.
+
+ Yol geçişine neden olabileceği için uzak dizin adı '{0}' işlenemiyor.
+
+
+ Yol geçişine neden olabileceği için uzak dosya adı '{0}' işlenemiyor.
+
+
+ Yol geçişine neden olabileceği için Uzak Alternatif Veri Akışı adı '{0}' işlenemiyor.
+
'-AsByteStream' belirtildiğinde kodlama kullanılmaz.
diff --git a/src/System.Management.Automation/resources/tr/HelpErrors.tr.resx b/src/System.Management.Automation/resources/tr/HelpErrors.tr.resx
index ab1799bf1e4..4e103ca58a1 100644
--- a/src/System.Management.Automation/resources/tr/HelpErrors.tr.resx
+++ b/src/System.Management.Automation/resources/tr/HelpErrors.tr.resx
@@ -190,4 +190,7 @@ Bu Yardım konularını güncelleştirmek için, PowerShell'i "Yönetici olarak
Kısıtlanmış bir oturumdayken ağ konumundan yardım alınamaz.
+
+ Kısıtlı bir oturumda komuta izin verilmez.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/tr/PSConfigurationStrings.tr.resx b/src/System.Management.Automation/resources/tr/PSConfigurationStrings.tr.resx
index 63176ae2286..cb6f2c696d0 100644
--- a/src/System.Management.Automation/resources/tr/PSConfigurationStrings.tr.resx
+++ b/src/System.Management.Automation/resources/tr/PSConfigurationStrings.tr.resx
@@ -120,4 +120,10 @@
PowerShell, bir güvenlik sorunu nedeniyle çalışmayı durdurdu: Yapılandırma dosyası okunamıyor: {0}
+
+ PowerShell yapılandırma dosyası '{0}' okunamıyor: {1}. Varsayılan ayarlara geri dönülüyor.
+
+
+ Ayar '{0}' '{1}' PowerShell yapılandırma dosyasından okunamıyor: {2}. Bu ayar için varsayılana geri dönülüyor.
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/zh-Hans/CoreClrStubResources.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/CoreClrStubResources.zh-Hans.resx
index f62e94c0e7e..bef18fdb8e3 100644
--- a/src/System.Management.Automation/resources/zh-Hans/CoreClrStubResources.zh-Hans.resx
+++ b/src/System.Management.Automation/resources/zh-Hans/CoreClrStubResources.zh-Hans.resx
@@ -138,4 +138,8 @@
未知错误: {0}。
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/zh-Hans/FileSystemProviderStrings.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/FileSystemProviderStrings.zh-Hans.resx
index be4a583e929..f8230c284d9 100644
--- a/src/System.Management.Automation/resources/zh-Hans/FileSystemProviderStrings.zh-Hans.resx
+++ b/src/System.Management.Automation/resources/zh-Hans/FileSystemProviderStrings.zh-Hans.resx
@@ -240,6 +240,15 @@
无法处理路径 "{0}",因为目标代表保留的设备名称。
+
+ 无法处理远程目录名 '{0}',因为它可能导致路径遍历。
+
+
+ 无法处理远程文件名 '{0}',因为它可能导致路径遍历。
+
+
+ 无法处理远程备用数据流名称 '{0}',因为它可能导致路径遍历。
+
指定 "-AsByteStream" 时不使用编码。
diff --git a/src/System.Management.Automation/resources/zh-Hans/HelpErrors.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/HelpErrors.zh-Hans.resx
index 2c4d4e79a5c..0f69cd89097 100644
--- a/src/System.Management.Automation/resources/zh-Hans/HelpErrors.zh-Hans.resx
+++ b/src/System.Management.Automation/resources/zh-Hans/HelpErrors.zh-Hans.resx
@@ -190,4 +190,7 @@
在受限会话中,无法从网络位置获取帮助。
+
+ 受限会话中不允许使用命令。
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/zh-Hans/PSConfigurationStrings.zh-Hans.resx b/src/System.Management.Automation/resources/zh-Hans/PSConfigurationStrings.zh-Hans.resx
index bcff924d325..cfa9983ff38 100644
--- a/src/System.Management.Automation/resources/zh-Hans/PSConfigurationStrings.zh-Hans.resx
+++ b/src/System.Management.Automation/resources/zh-Hans/PSConfigurationStrings.zh-Hans.resx
@@ -120,4 +120,10 @@
由于安全问题,PowerShell 已停止工作: 无法读取配置文件: {0}
+
+ 无法读取 PowerShell 配置文件 '{0}': {1}。回退到默认设置。
+
+
+ 无法从 PowerShell 配置文件 '{1}' 读取设置 '{0}': {2}。回退到此设置的默认值。
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/zh-Hant/CoreClrStubResources.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/CoreClrStubResources.zh-Hant.resx
index c33a793dd25..e07612467a0 100644
--- a/src/System.Management.Automation/resources/zh-Hant/CoreClrStubResources.zh-Hant.resx
+++ b/src/System.Management.Automation/resources/zh-Hant/CoreClrStubResources.zh-Hant.resx
@@ -138,4 +138,8 @@
未知的錯誤 "{0}"。
+
+ The temporary HOME directory '{0}' already exists but does not have the expected user-only permission. It may have been created by a different user, which is a potential security risk. PowerShell will not start until this directory is removed, its permission is corrected, or the 'HOME' environment variable is set.
+ {StrContains="HOME"}
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/zh-Hant/FileSystemProviderStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/FileSystemProviderStrings.zh-Hant.resx
index f386a965f57..939da17aa82 100644
--- a/src/System.Management.Automation/resources/zh-Hant/FileSystemProviderStrings.zh-Hant.resx
+++ b/src/System.Management.Automation/resources/zh-Hant/FileSystemProviderStrings.zh-Hant.resx
@@ -240,6 +240,15 @@
無法處理路徑 '{0}',因為目標代表保留的裝置名稱。
+
+ 無法處理遠端目錄名稱 '{0}',因為這可能會導致路徑穿越。
+
+
+ 無法處理遠端檔案名稱 '{0}',因為這可能會導致路徑穿越。
+
+
+ 無法處理遠端替代資料流名稱 '{0}',因為這可能會導致路徑穿越。
+
指定 '-AsByteStream' 時不使用編碼。
diff --git a/src/System.Management.Automation/resources/zh-Hant/HelpErrors.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/HelpErrors.zh-Hant.resx
index b816c8af7d2..e88acf06eb7 100644
--- a/src/System.Management.Automation/resources/zh-Hant/HelpErrors.zh-Hant.resx
+++ b/src/System.Management.Automation/resources/zh-Hant/HelpErrors.zh-Hant.resx
@@ -190,4 +190,7 @@
在受限制的工作階段中,無法從網路位置取得說明。
+
+ 受限工作階段中不允許命令。
+
\ No newline at end of file
diff --git a/src/System.Management.Automation/resources/zh-Hant/PSConfigurationStrings.zh-Hant.resx b/src/System.Management.Automation/resources/zh-Hant/PSConfigurationStrings.zh-Hant.resx
index 3cc5246e898..c171673fcc5 100644
--- a/src/System.Management.Automation/resources/zh-Hant/PSConfigurationStrings.zh-Hant.resx
+++ b/src/System.Management.Automation/resources/zh-Hant/PSConfigurationStrings.zh-Hant.resx
@@ -120,4 +120,10 @@
PowerShell 已因安全性問題而停止運作: 無法讀取設定檔: {0}
+
+ 無法讀取 PowerShell 組態檔 '{0}': {1}。回復為預設設定。
+
+
+ 無法從 PowerShell 組態檔 '{1}' 讀取設定 '{0}': {2}。回到此設定的預設值。
+
\ No newline at end of file
diff --git a/test/packaging/linux/package-validation.tests.ps1 b/test/packaging/linux/package-validation.tests.ps1
index 3b961120f2f..8607b39347d 100644
--- a/test/packaging/linux/package-validation.tests.ps1
+++ b/test/packaging/linux/package-validation.tests.ps1
@@ -15,9 +15,37 @@ Describe "Linux Package Name Validation" {
}
Write-Verbose "Artifacts directory: $artifactsDir" -Verbose
+
+ # Keep this pattern aligned with the release validation pipeline.
+ $rpmPackageNamePattern = '^powershell-(preview-|lts-)?\d+\.\d+\.\d+(_[a-z]*\.\d+)?-1\.(preview\.\d+\.)?(rh|cm|azl4)\.(x86_64|aarch64)\.rpm$'
}
Context "RPM Package Names" {
+ It "Should accept the Azure Linux 4 package name" -TestCases @(
+ @{
+ Architecture = "x86_64"
+ Name = "powershell-preview-7.7.0_preview.5-1.azl4.x86_64.rpm"
+ }
+ @{
+ Architecture = "aarch64"
+ Name = "powershell-preview-7.7.0_preview.5-1.azl4.aarch64.rpm"
+ }
+ ) {
+ param($Name)
+
+ $Name | Should -Match $rpmPackageNamePattern
+ }
+
+ It "Should reject malformed RPM package name " -TestCases @(
+ @{ Name = "prefix-powershell-preview-7.7.0_preview.5-1.azl4.x86_64.rpm" }
+ @{ Name = "powershell-preview-7.7.0_preview.5-1Xazl4.x86_64.rpm" }
+ @{ Name = "powershell-preview-7.7.0_preview.5-1.azl4.x86_64.rpm.backup" }
+ ) {
+ param($Name)
+
+ $Name | Should -Not -Match $rpmPackageNamePattern
+ }
+
It "Should have valid RPM package names" {
$rpmPackages = Get-ChildItem -Path $artifactsDir -Recurse -Filter *.rpm -ErrorAction SilentlyContinue
@@ -32,9 +60,8 @@ Describe "Linux Package Name Validation" {
# (_[a-z]*\.\d+)? : Optional underscore, letters, dot, and digits (e.g., _alpha.1)
# -1\. : Literal '-1.'
# (preview\.\d+\.)? : Optional 'preview.' and digits, followed by a dot
- # (rh|cm)\. : Either 'rh.' or 'cm.'
+ # (rh|cm|azl4)\. : RPM distribution suffix
# (x86_64|aarch64)\.rpm$ : Architecture and file extension
- $rpmPackageNamePattern = 'powershell\-(preview-|lts-)?\d+\.\d+\.\d+(_[a-z]*\.\d+)?-1\.(preview\.\d+\.)?(rh|cm)\.(x86_64|aarch64)\.rpm'
foreach ($package in $rpmPackages) {
if ($package.Name -notmatch $rpmPackageNamePattern) {
diff --git a/test/packaging/packaging.tests.ps1 b/test/packaging/packaging.tests.ps1
index a7d322205bc..480726978d1 100644
--- a/test/packaging/packaging.tests.ps1
+++ b/test/packaging/packaging.tests.ps1
@@ -24,6 +24,159 @@ Describe "Packaging Module Functions" {
}
}
+ Context "Azure Linux RPM packaging" {
+ BeforeAll {
+ $afterInstallScript = Join-Path $TestDrive "after-install.sh"
+ $afterRemoveScript = Join-Path $TestDrive "after-remove.sh"
+ "echo installed" | Set-Content -Path $afterInstallScript
+ "echo removed" | Set-Content -Path $afterRemoveScript
+ $linkInfo = & (Get-Module packaging) {
+ [LinkInfo] @{
+ Source = "/tmp/pwsh"
+ Destination = "/usr/bin/pwsh"
+ }
+ }
+ }
+
+ It "Should target Azure Linux 3 and 4 for framework-dependent RPMs" {
+ $distributions = & (Get-Module packaging) { $Script:RedhatFddDistributions }
+ $distributions | Should -Be @("cm", "azl4")
+ }
+
+ It "Should generate an Azure Linux 4 RPM file name for " -TestCases @(
+ @{
+ HostArchitecture = "x86_64"
+ Expected = "powershell-preview-7.7.0_preview.5-1.azl4.x86_64.rpm"
+ }
+ @{
+ HostArchitecture = "aarch64"
+ Expected = "powershell-preview-7.7.0_preview.5-1.azl4.aarch64.rpm"
+ }
+ ) {
+ param($HostArchitecture, $Expected)
+
+ Get-RpmPackageFileName `
+ -Name "powershell-preview" `
+ -Version "7.7.0-preview.5" `
+ -Iteration "1" `
+ -Distribution "azl4" `
+ -HostArchitecture $HostArchitecture |
+ Should -BeExactly $Expected
+ }
+
+ It "Should write the Azure Linux 4 RPM Release metadata for " -TestCases @(
+ @{ HostArchitecture = "x86_64" }
+ @{ HostArchitecture = "aarch64" }
+ ) {
+ param($HostArchitecture)
+
+ $spec = New-RpmSpec `
+ -Name "powershell-preview" `
+ -Version "7.7.0-preview.5" `
+ -Iteration "1" `
+ -Description "PowerShell test package" `
+ -Staging "/tmp/staging" `
+ -Destination "/opt/microsoft/powershell/7-preview" `
+ -ManGzipFile "/tmp/pwsh.1.gz" `
+ -ManDestination "/usr/share/man/man1/pwsh-preview.1.gz" `
+ -LinkInfo $linkInfo `
+ -Dependencies @("glibc") `
+ -AfterInstallScript $afterInstallScript `
+ -AfterRemoveScript $afterRemoveScript `
+ -Distribution "azl4" `
+ -HostArchitecture $HostArchitecture
+
+ $spec | Should -Match "(?m)^Release:\s+1\.azl4\r?$"
+ $spec | Should -Match "(?m)^\* .+ - 7\.7\.0_preview\.5-1\.azl4\r?$"
+ }
+
+ It "Should select the current master dependencies for with runtime " -TestCases @(
+ @{ Distribution = "cm"; Runtime = "linux-x64"; IncludeDotnetRuntime = $false }
+ @{ Distribution = "azl4"; Runtime = "linux-arm64"; IncludeDotnetRuntime = $false }
+ @{ Distribution = "cm"; Runtime = "fxdependent-linux-x64"; IncludeDotnetRuntime = $true }
+ @{ Distribution = "azl4"; Runtime = "fxdependent-linux-arm64"; IncludeDotnetRuntime = $true }
+ ) {
+ param($Distribution, $Runtime, $IncludeDotnetRuntime)
+
+ $dependencies = & (Get-Module packaging) {
+ param($Distribution, $Runtime)
+
+ $previousOptions = $Script:Options
+ try {
+ $Script:Options = [pscustomobject] @{ Runtime = $Runtime }
+ @(Get-PackageDependencies -Distribution $Distribution)
+ }
+ finally {
+ $Script:Options = $previousOptions
+ }
+ } $Distribution $Runtime
+
+ $expectedDependencies = @(
+ "ca-certificates"
+ "glibc"
+ "icu"
+ "libgcc"
+ "libstdc++"
+ "openssl-libs"
+ "tzdata"
+ )
+ if ($IncludeDotnetRuntime) {
+ $expectedDependencies += "dotnet-runtime-10.0"
+ }
+
+ $dependencies | Should -BeExactly $expectedDependencies
+ }
+ }
+
+ Context "Azure Linux PMC mappings" {
+ BeforeAll {
+ $mappingPath = Join-Path $PSScriptRoot "../../tools/packages.microsoft.com/mapping.json"
+ $mapping = Get-Content -Path $mappingPath -Raw | ConvertFrom-Json
+ }
+
+ It "Should map 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)
+
+ $mappedPackage = @($mapping.Packages | Where-Object url -EQ $Url)
+ $mappedPackage.Count | Should -Be 1
+ $mappedPackage[0].channel | Should -BeExactly $Channel
+ $mappedPackage[0].distribution | Should -BeExactly @("azl")
+ $mappedPackage[0].PackageFormat |
+ Should -BeExactly "PACKAGE_NAME-POWERSHELL_RELEASE-1.azl4.$Architecture.rpm"
+ }
+
+ It "Should remove the Azure Linux 4 beta mappings" {
+ @($mapping.Packages | Where-Object url -Like "azurelinux-4.0-beta-*").Count | Should -Be 0
+ }
+
+ It "Should retain all Azure Linux 3 .cm mappings" {
+ $azureLinux3Mappings = @($mapping.Packages | Where-Object url -Like "azurelinux-3.0-*")
+ $azureLinux3Mappings.Count | Should -Be 4
+ $azureLinux3Mappings.PackageFormat | Should -Match "\.cm\.(x86_64|aarch64)\.rpm$"
+ }
+ }
+
Context "Get-MacOSPackageIdentifierInfo function (New-MacOSPackage logic)" {
It "Should detect preview builds and return preview identifier" {
$result = Get-MacOSPackageIdentifierInfo -Version "7.6.0-preview.6" -LTS:$false
@@ -61,4 +214,4 @@ Describe "Packaging Module Functions" {
$result.PackageIdentifier | Should -Be "com.microsoft.powershell-preview"
}
}
-}
+}
\ No newline at end of file
diff --git a/test/powershell/Host/ConsoleHost.Tests.ps1 b/test/powershell/Host/ConsoleHost.Tests.ps1
index fffd959654b..54e61eb951e 100644
--- a/test/powershell/Host/ConsoleHost.Tests.ps1
+++ b/test/powershell/Host/ConsoleHost.Tests.ps1
@@ -718,8 +718,8 @@ $powershell -c '[System.Management.Automation.Platform]::SelectProductNameForDir
}
Context "PATH environment variable" {
- It "`$PSHOME should be in front so that pwsh.exe starts current running PowerShell" {
- & $powershell -v | Should -Match $PSVersionTable.GitCommitId
+ It "Running 'pwsh' should start the currently running PowerShell" {
+ pwsh -v | Should -Match $PSVersionTable.GitCommitId
}
It "powershell starts if PATH is not set" -Skip:($IsWindows) {
@@ -1156,11 +1156,23 @@ Describe 'Pwsh startup and PATH' -Tag CI {
$version | Should -BeExactly "PowerShell $($PSVersionTable.GitCommitId)"
}
- It 'pwsh starts even if PATH is not defined' {
+ It 'pwsh updates PATH correctly even if PATH is not defined' {
$pwsh = Join-Path -Path $PSHOME -ChildPath "pwsh"
Remove-Item Env:\PATH
$path = & $pwsh -noprofile -command '$env:PATH'
- $path | Should -BeExactly ($PSHOME + [System.IO.Path]::PathSeparator)
+
+ $ExpectedPath = $PSHOME
+ if ($PSHOME.StartsWith("$env:ProgramFiles\WindowsApps\Microsoft.PowerShell")) {
+ # MSIX installed PowerShell uses the stable path instead of PSHOME.
+ $ExpectedPath = $PSHOME.Replace($env:ProgramFiles, "$env:LOCALAPPDATA\Microsoft")
+
+ # Remove the version-specific part from the expected path.
+ $version = $PSVersionTable.PSVersion
+ $verStrRegex = "$($version.Major)\.$($version.Minor)\.$($version.Build).+__"
+ $ExpectedPath = $ExpectedPath -replace $verStrRegex, ''
+ }
+
+ $path | Should -BeExactly ($ExpectedPath + [System.IO.Path]::PathSeparator)
}
}
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/ConstrainedLanguageRestriction.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/ConstrainedLanguageRestriction.Tests.ps1
index 6fb97a46cab..712907879bb 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Security/ConstrainedLanguageRestriction.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Security/ConstrainedLanguageRestriction.Tests.ps1
@@ -18,6 +18,41 @@ try
$defaultParamValues = $PSDefaultParameterValues.Clone()
$PSDefaultParameterValues["it:Skip"] = !$IsWindows
+ Describe "Property setting in constrained language" -Tags 'Feature' {
+
+ It "rejects setting an instance script property" {
+ $obj = [System.Text.StringBuilder]::new()
+ $obj | Add-Member -MemberType NoteProperty -Name Value -Value 0
+ $obj | Add-Member -MemberType ScriptProperty -Name Test -Value { $this.Value } -SecondValue { param($value) $this.Value = $value }
+
+ try
+ {
+ $ExecutionContext.SessionState.LanguageMode = "ConstrainedLanguage"
+ { $obj.Test = 1 } | Should -Throw -ErrorId "PropertySetterNotSupportedInConstrainedLanguage"
+ }
+ finally
+ {
+ Invoke-LanguageModeTestingSupportCmdlet -EnableFullLanguageMode
+ }
+ }
+
+ It "rejects setting an alias property that references a note property" {
+ $obj = [System.Text.StringBuilder]::new()
+ $obj | Add-Member -MemberType NoteProperty -Name Value -Value 0
+ $obj | Add-Member -MemberType AliasProperty -Name Alias -Value Value
+
+ try
+ {
+ $ExecutionContext.SessionState.LanguageMode = "ConstrainedLanguage"
+ { $obj.Alias = 1 } | Should -Throw -ErrorId "PropertySetterNotSupportedInConstrainedLanguage"
+ }
+ finally
+ {
+ Invoke-LanguageModeTestingSupportCmdlet -EnableFullLanguageMode
+ }
+ }
+ }
+
Describe "Help built-in function should not expose nested module private functions when run on locked down systems" -Tags 'Feature','RequireAdminOnWindows' {
BeforeAll {
@@ -838,6 +873,47 @@ try
$expectedError.FullyQualifiedErrorId | Should -BeExactly "MethodInvocationNotSupportedInConstrainedLanguage"
}
+
+ It "Verify ForEach engine intrinsic method cannot set property values for non-core types when in constrained language mode" {
+
+ try
+ {
+ $ExecutionContext.SessionState.LanguageMode = 'ConstrainedLanguage'
+ & {
+ @($ExecutionContext.SessionState).ForEach('LanguageMode', 'FullLanguage')
+ }
+
+ throw "No Exception!"
+ }
+ catch
+ {
+ $expectedError = $_
+ }
+ finally
+ {
+ Invoke-LanguageModeTestingSupportCmdlet -EnableFullLanguageMode
+ }
+
+ $expectedError.FullyQualifiedErrorId | Should -BeExactly "PropertySetterNotSupportedInConstrainedLanguage"
+ }
+
+ It "Verify ForEach engine intrinsic method correctly allows setting property values for core types in constrained language mode" {
+
+ $validateSet = [ValidateSet]::new('test')
+ try
+ {
+ $ExecutionContext.SessionState.LanguageMode = 'ConstrainedLanguage'
+ & {
+ @($validateSet).ForEach('ErrorMessage', 'NewMessage')
+ }
+ }
+ finally
+ {
+ Invoke-LanguageModeTestingSupportCmdlet -EnableFullLanguageMode
+ }
+
+ $validateSet.ErrorMessage | Should -BeExactly 'NewMessage'
+ }
}
Describe "ThreadJob Constrained Language Tests" -Tags 'Feature','RequireAdminOnWindows' {
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1
index b532d7523ef..ec70c9c3cd9 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1
@@ -1823,7 +1823,11 @@ try
It "Bad verb alias causes no error or warning" {
try {
- $ps = [powershell]::Create().AddCommand("Import-PSSession", $true).AddParameter("Session", $session).AddParameter("CommandName", "BadVerb-Variable")
+ $ps = [powershell]::Create().
+ AddCommand("Import-PSSession", $true).
+ AddParameter("Session", $session).
+ AddParameter("CommandName", "BadVerb-Variable").
+ AddParameter("AllowClobber")
$module = $ps.Invoke() | Select-Object -First 1
$ps.Streams.Error.Count | Should -Be 0
@@ -2077,6 +2081,61 @@ try
$errorVariable | Should -BeNullOrEmpty
}
}
+
+ Describe "Import-PSSession resolved command of an alias" -tags "Feature","RequireAdminOnWindows" {
+
+ BeforeAll {
+ if ($skipTest) { return }
+ $session = New-RemoteSession
+
+ # Define a remote function
+ Invoke-Command -Session $session { function MyFunction { "Remote!" } Set-Alias SafeAlias -Value MyFunction }
+ # Define an alias to 'Get-Help', which is in the skip-list of the remote session configuration.
+ Invoke-Command -Session $session { Set-Alias -Name myhelp -Value Get-Help }
+ }
+
+ AfterAll {
+ if ($skipTest) { return }
+ if ($null -ne $session) { Remove-PSSession $session -ErrorAction SilentlyContinue }
+ }
+
+ It "When '-AllowClobber' is false, shadowing command cannot be bypassed using an alias to it" -Skip:$skipTest {
+ function MyFunction { "Local!" }
+
+ { Import-PSSession -Session $session -CommandName SafeAlias -AllowClobber:$false -DisableNameChecking } | Should -Throw -ErrorId "ErrorNoCommandsImportedBecauseOfSkipping,Microsoft.PowerShell.Commands.ImportPSSessionCommand"
+ MyFunction | Should -BeExactly "Local!"
+ }
+
+ It "Command in server skip-list cannot be bypassed using an alias to it" -Skip:$skipTest {
+ try {
+ $m = Import-PSSession -Session $session -CommandName myhelp -AllowClobber
+ $m.ExportedCommands.Count | Should -Be 0
+ { myhelp } | Should -Throw -ErrorId "CommandNotFoundException"
+ }
+ finally {
+ if ($null -ne $m) {
+ Remove-Module $m -Force -ErrorAction SilentlyContinue
+ Remove-Item $m.ModuleBase -Recurse -Force -ErrorAction SilentlyContinue
+ }
+ }
+ }
+
+ It "Server skip-list check should be skipped for the resolved command of an alias when '-Prefix' is specified" -Skip:$skipTest {
+ try {
+ $m = Import-PSSession -Session $session -CommandName myhelp -AllowClobber -Prefix "Remote"
+ $m.ExportedCommands.Count | Should -Be 2
+ $exportedCommands = Get-Command -Module $m -All | ForEach-Object Name
+ $exportedCommands | Should -Contain "Remotemyhelp"
+ $exportedCommands | Should -Contain "Get-RemoteHelp"
+ }
+ finally {
+ if ($null -ne $m) {
+ Remove-Module $m -Force -ErrorAction SilentlyContinue
+ Remove-Item $m.ModuleBase -Recurse -Force -ErrorAction SilentlyContinue
+ }
+ }
+ }
+ }
}
finally
{
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Test-Json.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Test-Json.Tests.ps1
index 32a6cf3ce63..4334a18ea28 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Test-Json.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Test-Json.Tests.ps1
@@ -4,8 +4,12 @@
Describe "Test-Json" -Tags "CI" {
BeforeAll {
$assetsPath = Join-Path $PSScriptRoot -ChildPath assets
- $validSchemaJsonPath = Join-Path -Path $assetsPath -ChildPath valid_schema_reference.json
- $invalidSchemaJsonPath = Join-Path -Path $assetsPath -ChildPath invalid_schema_reference.json
+ $validSchemaJsonPath = Join-Path -Path $assetsPath -ChildPath valid_schema.json
+ $validSchemaWithLocalRefJsonPath = Join-Path -Path $assetsPath -ChildPath valid_schema_references_internal.json
+ $validSchemaWithExternalFileRefJsonPath = Join-Path -Path $assetsPath -ChildPath valid_schema_references_external.json
+ $validSchemaWithExternalUriRefJsonPath = Join-Path -Path $assetsPath -ChildPath valid_schema_uri_references_external.json
+ $invalidSchemaWithExternalRefJsonPath = Join-Path -Path $assetsPath -ChildPath invalid_schema_reference.json
+ $invalidSchemaJsonPath = Join-Path -Path $assetsPath -ChildPath invalid_schema.json
$missingSchemaJsonPath = Join-Path -Path $assetsPath -ChildPath no_such_file.json
$missingJsonPath = Join-Path -Path $assetsPath -ChildPath no_such_file.json
@@ -117,6 +121,46 @@ Describe "Test-Json" -Tags "CI" {
Test-Json -Json $validJson -Schema $validSchemaJson | Should -BeTrue
}
+ It "Json is valid against a valid schema with local reference" {
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithLocalRefJsonPath | Should -BeTrue
+ }
+
+ It "Json is invalid by default against a schema with external file reference" {
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalFileRefJsonPath -ErrorVariable ErrorVar -ErrorAction SilentlyContinue | Should -BeFalse
+ $ErrorVar[0].FullyQualifiedErrorId | Should -BeExactly "UnresolvedJsonSchemaRef,Microsoft.PowerShell.Commands.TestJsonCommand"
+ }
+
+ It "Json is invalid by default against a schema file with external URI reference" {
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalUriRefJsonPath -ErrorVariable ErrorVar -ErrorAction SilentlyContinue | Should -BeFalse
+ $ErrorVar[0].FullyQualifiedErrorId | Should -BeExactly "UnresolvedJsonSchemaRef,Microsoft.PowerShell.Commands.TestJsonCommand"
+ }
+
+ It "Json is valid, with FetchExternalReference parameter, against a schema from file with external file reference" {
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalFileRefJsonPath -FetchExternalReference | Should -BeTrue
+ }
+
+ It "Json is valid but unresolvable, with FetchExternalReference parameter, against a schema with external URI reference" {
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalUriRefJsonPath -FetchExternalReference -ErrorVariable ErrorVar -ErrorAction SilentlyContinue | Should -BeFalse
+ $ErrorVar[0].FullyQualifiedErrorId | Should -BeExactly "InvalidJsonSchema,Microsoft.PowerShell.Commands.TestJsonCommand"
+ }
+
+ It "Json is invalid, with FetchExternalReference parameter, against an invalid schema with external file reference" {
+ Test-Json -Json $validJson -SchemaFile $invalidSchemaWithExternalRefJsonPath -FetchExternalReference -ErrorVariable ErrorVar -ErrorAction SilentlyContinue | Should -BeFalse
+ $ErrorVar[0].FullyQualifiedErrorId | Should -BeExactly "InvalidJsonSchema,Microsoft.PowerShell.Commands.TestJsonCommand"
+ }
+
+ It "FetchExternalReference does not affect later invocations" {
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalFileRefJsonPath -FetchExternalReference | Should -BeTrue
+
+ $ErrorVar = @()
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalFileRefJsonPath -ErrorVariable ErrorVar -ErrorAction SilentlyContinue | Should -BeFalse
+ $ErrorVar[0].FullyQualifiedErrorId | Should -BeExactly "UnresolvedJsonSchemaRef,Microsoft.PowerShell.Commands.TestJsonCommand"
+
+ $ErrorVar = @()
+ Test-Json -Json $validJson -SchemaFile $validSchemaWithExternalUriRefJsonPath -ErrorVariable ErrorVar -ErrorAction SilentlyContinue | Should -BeFalse
+ $ErrorVar[0].FullyQualifiedErrorId | Should -BeExactly "UnresolvedJsonSchemaRef,Microsoft.PowerShell.Commands.TestJsonCommand"
+ }
+
It "Json is valid against a valid schema from file" {
Test-Json -Json $validJson -SchemaFile $validSchemaJsonPath | Should -BeTrue
($validJson | Test-Json -SchemaFile $validSchemaJsonPath) | Should -BeTrue
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_reference.json b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/invalid_schema.json
similarity index 50%
rename from test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_reference.json
rename to test/powershell/Modules/Microsoft.PowerShell.Utility/assets/invalid_schema.json
index aa9c18a30c7..ccba6a89330 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_reference.json
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/invalid_schema.json
@@ -3,10 +3,10 @@
"type": "object",
"properties": {
"name": {
- "$ref": "valid_schema_definitions.json#/definitions/name"
+ "type":"string"
},
"hobbies": {
- "$ref": "valid_schema_definitions.json#/definitions/hobbies"
+ "type": 5
}
}
}
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema.json b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema.json
new file mode 100644
index 00000000000..2cdd8d00459
--- /dev/null
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema.json
@@ -0,0 +1,15 @@
+{
+ "description": "A person",
+ "type": "object",
+ "properties": {
+ "name": {
+ "type":"string"
+ },
+ "hobbies": {
+ "type":"array",
+ "items":{
+ "type":"string"
+ }
+ }
+ }
+}
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_definitions.json b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_definitions_external.json
similarity index 100%
rename from test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_definitions.json
rename to test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_definitions_external.json
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_references_external.json b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_references_external.json
new file mode 100644
index 00000000000..dcd25c655fe
--- /dev/null
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_references_external.json
@@ -0,0 +1,12 @@
+{
+ "description": "A person",
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "valid_schema_definitions_external.json#/definitions/name"
+ },
+ "hobbies": {
+ "$ref": "valid_schema_definitions_external.json#/definitions/hobbies"
+ }
+ }
+}
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_references_internal.json b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_references_internal.json
new file mode 100644
index 00000000000..91e62f0bd13
--- /dev/null
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_references_internal.json
@@ -0,0 +1,23 @@
+{
+ "description": "A person",
+ "type": "object",
+ "definitions": {
+ "name": {
+ "type": "string"
+ },
+ "hobbies": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "properties": {
+ "name": {
+ "$ref": "#/definitions/name"
+ },
+ "hobbies": {
+ "$ref": "#/definitions/hobbies"
+ }
+ }
+}
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_uri_references_external.json b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_uri_references_external.json
new file mode 100644
index 00000000000..b0f6f9ecabc
--- /dev/null
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/assets/valid_schema_uri_references_external.json
@@ -0,0 +1,3 @@
+{
+ "$ref":"http://example.com/root.json"
+}
diff --git a/test/powershell/dsc/dsc.profileresource.Tests.ps1 b/test/powershell/dsc/dsc.profileresource.Tests.ps1
index cb357c7350b..4f89a8a1377 100644
--- a/test/powershell/dsc/dsc.profileresource.Tests.ps1
+++ b/test/powershell/dsc/dsc.profileresource.Tests.ps1
@@ -3,6 +3,13 @@
Describe "DSC PowerShell Profile Resource Tests" -Tag "CI" {
BeforeAll {
+
+ $isMsix = $pshome -like '*WindowsApps*'
+ if ($isMsix) {
+ Write-Verbose "Running in MSIX context. Marking tests as pending." -Verbose
+ return
+ }
+
$DSC_ROOT = $env:DSC_ROOT
$skipCleanup = $false
@@ -46,6 +53,10 @@ Describe "DSC PowerShell Profile Resource Tests" -Tag "CI" {
return
}
+ if ($isMsix) {
+ return
+ }
+
# Restore original profile
$testProfilePathCurrentUserCurrentHost = $PROFILE.CurrentUserCurrentHost
if (Test-Path "$TestDrive/currentuser-currenthost-profile.bak") {
@@ -69,6 +80,12 @@ Describe "DSC PowerShell Profile Resource Tests" -Tag "CI" {
}
It 'DSC resource is located at $PSHome' {
+
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$resourceFile = Join-Path -Path $PSHome -ChildPath 'pwsh.profile.resource.ps1'
$resourceFile | Should -Exist
@@ -77,16 +94,31 @@ Describe "DSC PowerShell Profile Resource Tests" -Tag "CI" {
}
It 'DSC resource can be found' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
(& $dscExe resource list -o json | ConvertFrom-Json | Select-Object -Property type).type | Should -Contain 'Microsoft.PowerShell/Profile'
}
It 'DSC resource can set current user current host profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$setOutput = (& $dscExe config set --file $PSScriptRoot/psprofile_currentuser_currenthost.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - CurrentUserCurrentHost!'"
$setOutput.results.result.afterState.content | Should -BeExactly $expectedContent
}
It 'DSC resource can get current user current host profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$getOutput = (& $dscExe config get --file $PSScriptRoot/psprofile_currentuser_currenthost.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - CurrentUserCurrentHost!'"
$getOutput.results.result.actualState.content | Should -BeExactly $expectedContent
@@ -98,18 +130,33 @@ Describe "DSC PowerShell Profile Resource Tests" -Tag "CI" {
}
It 'DSC resource can set current user all hosts profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$setOutput = (& $dscExe config set --file $PSScriptRoot/psprofile_currentuser_allhosts.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - CurrentUserAllHosts!'"
$setOutput.results.result.afterState.content | Should -BeExactly $expectedContent
}
It 'DSC resource can get current user all hosts profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$getOutput = (& $dscExe config get --file $PSScriptRoot/psprofile_currentuser_allhosts.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - CurrentUserAllHosts!'"
$getOutput.results.result.actualState.content | Should -BeExactly $expectedContent
}
It 'DSC resource can export all profiles' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$exportOutput = (& $dscExe config export --file $PSScriptRoot/psprofile_export.dsc.yaml -o json) | ConvertFrom-Json
$exportOutput.resources | Should -HaveCount 4
@@ -123,6 +170,12 @@ Describe "DSC PowerShell Profile Resource Tests" -Tag "CI" {
Describe "DSC PowerShell Profile resource elevated tests" -Tag "CI", 'RequireAdminOnWindows', 'RequireSudoOnUnix' {
BeforeAll {
+ $isMsix = $pshome -like '*WindowsApps*'
+ if ($isMsix) {
+ Write-Verbose "Running in MSIX context. Marking tests as pending." -Verbose
+ return
+ }
+
$DSC_ROOT = $env:DSC_ROOT
$skipCleanup = $false
@@ -166,6 +219,10 @@ Describe "DSC PowerShell Profile resource elevated tests" -Tag "CI", 'RequireAdm
return
}
+ if ($isMsix) {
+ return
+ }
+
$env:PATH = $originalPath
$testProfilePathAllUsersCurrentHost = $PROFILE.AllUsersCurrentHost
@@ -189,24 +246,44 @@ Describe "DSC PowerShell Profile resource elevated tests" -Tag "CI", 'RequireAdm
}
It 'DSC resource can set all users all hosts profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$setOutput = (& $dscExe config set --file $PSScriptRoot/psprofile_alluser_allhost.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - AllUsersAllHosts!'"
$setOutput.results.result.afterState.content | Should -BeExactly $expectedContent
}
It 'DSC resource can get all users all hosts profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$getOutput = (& $dscExe config get --file $PSScriptRoot/psprofile_alluser_allhost.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - AllUsersAllHosts!'"
$getOutput.results.result.actualState.content | Should -BeExactly $expectedContent
}
It 'DSC resource can set all users current hosts profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$setOutput = (& $dscExe config set --file $PSScriptRoot/psprofile_allusers_currenthost.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - AllUsersCurrentHost!'"
$setOutput.results.result.afterState.content | Should -BeExactly $expectedContent
}
It 'DSC resource can get all users current hosts profile' {
+ if ($isMsix) {
+ Set-ItResult -Pending -Because "Running in MSIX context. Skipping test."
+ return
+ }
+
$getOutput = (& $dscExe config get --file $PSScriptRoot/psprofile_allusers_currenthost.dsc.yaml -o json) | ConvertFrom-Json
$expectedContent = "Write-Host 'Welcome to your PowerShell profile - AllUsersCurrentHost!'"
$getOutput.results.result.actualState.content | Should -BeExactly $expectedContent
diff --git a/test/powershell/engine/Formatting/PSStyle.Tests.ps1 b/test/powershell/engine/Formatting/PSStyle.Tests.ps1
index d8a124a2332..6eb512c251d 100644
--- a/test/powershell/engine/Formatting/PSStyle.Tests.ps1
+++ b/test/powershell/engine/Formatting/PSStyle.Tests.ps1
@@ -89,6 +89,10 @@ Describe 'Tests for $PSStyle automatic variable' -Tag 'CI' {
$PSStyle.OutputRendering | Should -BeExactly 'Host'
}
+ It '$PSStyle default view includes AutoSizeDefaultFormatting' {
+ $PSStyle | Out-String | Should -Match 'AutoSizeDefaultFormatting'
+ }
+
It '$PSStyle has correct defaults for style ' -TestCases (Get-TestCases $styleDefaults) {
param($key, $value)
@@ -526,3 +530,166 @@ Billy Bob… Senior DevOps … 13
$text.Trim().Replace("`r", "") | Should -BeExactly $expected.Replace("`r", "")
}
}
+
+Describe 'Default formatting AutoSize override' -Tag 'CI' {
+ BeforeAll {
+ $formatFile = Join-Path $TestDrive 'AutoSizeDefaultFormatting.format.ps1xml'
+ @'
+
+
+
+ AutoSizeWide
+
+ Test.AutoSizeWide
+
+
+
+
+
+ Name
+
+
+
+
+
+
+ AutoSizeComplex
+
+ Test.AutoSizeComplex
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+
+'@ | Set-Content -Path $formatFile
+ }
+
+ It "Forces default table formatting to use 'AutoSize'" {
+ $oldOutputRendering = $PSStyle.OutputRendering
+ $oldAutoSizeDefaultFormatting = $PSStyle.AutoSizeDefaultFormatting
+
+ try {
+ $PSStyle.OutputRendering = 'PlainText'
+ $PSStyle.AutoSizeDefaultFormatting = $false
+ $defaultOutput = Get-Command Import-Module | Out-String
+ $PSStyle.AutoSizeDefaultFormatting = $true
+ $autoSizedOutput = Get-Command Import-Module | Out-String
+
+ $defaultOutput = $defaultOutput.Trim().Split("`n")
+ $autoSizedOutput = $autoSizedOutput.Trim().Split("`n")
+
+ $defaultOutput.Count | Should -BeExactly $autoSizedOutput.Count
+ for ($i = 0; $i -lt $defaultOutput.Count; $i++) {
+ $defaultOutput[$i].Length | Should -BeGreaterThan $autoSizedOutput[$i].Length
+ $elements_1 = $defaultOutput[$i].Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries)
+ $elements_2 = $autoSizedOutput[$i].Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries)
+ $elements_1 -join ' ' | Should -BeExactly ($elements_2 -join ' ')
+ }
+ }
+ finally {
+ $PSStyle.AutoSizeDefaultFormatting = $oldAutoSizeDefaultFormatting
+ $PSStyle.OutputRendering = $oldOutputRendering
+ }
+ }
+
+ It "Forces default wide formatting to use 'AutoSize'" {
+ $powerShell = [PowerShell]::Create()
+
+ try {
+ $result = $powerShell.AddScript({
+ param($Path)
+
+ Update-FormatData -PrependPath $Path
+ $oldOutputRendering = $PSStyle.OutputRendering
+ $oldAutoSizeDefaultFormatting = $PSStyle.AutoSizeDefaultFormatting
+
+ try {
+ $PSStyle.OutputRendering = 'PlainText'
+ $items = 1..6 | ForEach-Object {
+ [pscustomobject]@{ PSTypeName = 'Test.AutoSizeWide'; Name = "Item$_" }
+ }
+
+ $PSStyle.AutoSizeDefaultFormatting = $false
+ $defaultOutput = $items | Out-String -Width 40
+ $PSStyle.AutoSizeDefaultFormatting = $true
+ $autoSizedOutput = $items | Out-String -Width 40
+
+ [pscustomobject]@{
+ DefaultOutput = $defaultOutput
+ AutoSizedOutput = $autoSizedOutput
+ }
+ }
+ finally {
+ $PSStyle.AutoSizeDefaultFormatting = $oldAutoSizeDefaultFormatting
+ $PSStyle.OutputRendering = $oldOutputRendering
+ }
+ }).AddArgument($formatFile).Invoke()
+
+ $powerShell.HadErrors | Should -BeFalse
+ $defaultLines = $result.DefaultOutput.Trim().Split("`n")
+ $autoSizedLines = $result.AutoSizedOutput.Trim().Split("`n")
+ $defaultLines | Should -HaveCount 3
+ $autoSizedLines | Should -HaveCount 1
+ $autoSizedLines[0].Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries) | Should -HaveCount 6
+ }
+ finally {
+ $powerShell.Dispose()
+ }
+ }
+
+ It 'Does not buffer default formatting until pipeline completion' -TestCases @(
+ @{ ViewType = 'List' }
+ @{ ViewType = 'Complex' }
+ ) {
+ param($ViewType)
+
+ $powerShell = [PowerShell]::Create()
+
+ try {
+ $producerFinished = $powerShell.AddScript({
+ param($Path, $ViewType)
+
+ Update-FormatData -PrependPath $Path
+ $oldAutoSizeDefaultFormatting = $PSStyle.AutoSizeDefaultFormatting
+
+ try {
+ $PSStyle.AutoSizeDefaultFormatting = $true
+ $inputObject = $ViewType -eq 'List' ? $PSStyle : [pscustomobject]@{ PSTypeName = 'Test.AutoSizeComplex'; Name = 'Item' }
+
+ $script:producerFinished = $false
+ & {
+ $inputObject
+ $script:producerFinished = $true
+ } |
+ Out-String -Stream |
+ Where-Object { -not [string]::IsNullOrWhiteSpace($_) } | ## Ignore the newline written out by 'Out-String'
+ Select-Object -First 1 |
+ Out-Null
+
+ $script:producerFinished
+ }
+ finally {
+ $PSStyle.AutoSizeDefaultFormatting = $oldAutoSizeDefaultFormatting
+ }
+ }).AddArgument($formatFile).AddArgument($ViewType).Invoke()
+
+ $powerShell.HadErrors | Should -BeFalse
+ # When rendering streams, the first non-whitespace string reaches 'Select-Object' before '$script:producerFinished = $true' runs. 'Select-Object -First 1' then stops
+ # the upstream script, so that assignment is never evaluated and '$producerFinished' remains false.
+ # If rendering is buffered, 'Out-String' emits no non-whitespace payload until the upstream script finishes and the assignment runs, making '$producerFinished' true.
+ $producerFinished | Should -BeFalse
+ }
+ finally {
+ $powerShell.Dispose()
+ }
+ }
+}
diff --git a/test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1 b/test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1
index 2093eaa7ce5..ffdd897d4d5 100644
--- a/test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1
+++ b/test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1
@@ -403,4 +403,23 @@ Describe "Remoting loopback tests" -Tags @('CI', 'RequireAdminOnWindows') {
$session | Remove-PSSession -ErrorAction Ignore
}
}
+
+ It 'Remote session has up-to-date TPA list' {
+ $session = New-RemoteSession -ConfigurationName $endPoint
+ try {
+ $tpa_remote = Invoke-Command -Session $session -ScriptBlock { [AppContext]::GetData('TRUSTED_PLATFORM_ASSEMBLIES') -split ';' | Sort-Object -Unique }
+ $tpa_local = [AppContext]::GetData('TRUSTED_PLATFORM_ASSEMBLIES') -split ';' | Sort-Object -Unique
+
+ # 2 DLLs are intentionally excluded from the WinRM session side.
+ $diff = Compare-Object -ReferenceObject $tpa_local -DifferenceObject $tpa_remote
+ $diff | Should -HaveCount 2
+ $diff | ForEach-Object SideIndicator | Sort-Object -Unique | Should -Be '<='
+
+ $actualDlls = $diff.InputObject | Split-Path -Leaf
+ $actualDlls | Should -Contain 'Microsoft.PowerShell.GraphicalHost.dll'
+ $actualDlls | Should -Contain 'pwsh.dll'
+ } finally {
+ $session | Remove-PSSession -ErrorAction Ignore
+ }
+ }
}
diff --git a/test/powershell/engine/ResourceValidation/LocProject.Tests.ps1 b/test/powershell/engine/ResourceValidation/LocProject.Tests.ps1
index f8e77c0fb02..4f348fa2d3f 100644
--- a/test/powershell/engine/ResourceValidation/LocProject.Tests.ps1
+++ b/test/powershell/engine/ResourceValidation/LocProject.Tests.ps1
@@ -29,8 +29,18 @@ Describe "LocProject.json file validation" -Tags "CI" {
$realSourceFile = Join-Path $repoRoot $sourceFile
Test-Path -Path $realSourceFile | Should -BeTrue
- $_.OutputPath | Should -BeExactly "$parentDir\"
- $_.CopyOption | Should -BeExactly 'LangIDOnPathAndName'
+
+ if ($sourceFile -like '*.resx') {
+ $_.OutputPath | Should -BeExactly "$parentDir\"
+ $_.CopyOption | Should -BeExactly 'LangIDOnPathAndName'
+ }
+ elseif ($sourceFile -like '*.xml') {
+ $_.OutputPath + "en-US" | Should -BeExactly $parentDir
+ $_.CopyOption | Should -BeExactly 'LangIDOnPath'
+ }
+ else {
+ throw "Unexpected source file type: $sourceFile"
+ }
}
}
@@ -38,6 +48,21 @@ Describe "LocProject.json file validation" -Tags "CI" {
$srcDir = Join-Path $repoRoot 'src'
$project = $locProject.Projects[0]
+ $resxLocItemCount = 0
+ $xmlLocItemCount = 0
+
+ foreach ($item in $project.LocItems) {
+ if ($item.SourceFile -like '*.resx') {
+ $resxLocItemCount++
+ }
+ elseif ($item.SourceFile -like '*.xml') {
+ $xmlLocItemCount++
+ }
+ else {
+ throw "Unexpected source file type: $($item.SourceFile)"
+ }
+ }
+
try {
Push-Location -Path $srcDir
$resDirs = Get-ChildItem 'resources' -Recurse -Directory | ForEach-Object FullName
@@ -48,7 +73,8 @@ Describe "LocProject.json file validation" -Tags "CI" {
$totalResourceCount += $count
}
- $project.LocItems.Count | Should -Be $totalResourceCount
+ $resxLocItemCount | Should -Be $totalResourceCount
+ $xmlLocItemCount | Should -Be 1
}
finally {
Pop-Location
diff --git a/test/xUnit/csharp/test_PSConfiguration.cs b/test/xUnit/csharp/test_PSConfiguration.cs
index 54e69da68f0..4b7de24005e 100644
--- a/test/xUnit/csharp/test_PSConfiguration.cs
+++ b/test/xUnit/csharp/test_PSConfiguration.cs
@@ -382,6 +382,28 @@ public void SetupConfigFile5()
CreateBrokenConfigFile(currentUserConfigFile);
}
+ public void SetupBrokenCurrentUserConfigOnly()
+ {
+ CleanupConfigFiles();
+
+ // Only the per-user config file is broken; the system-wide file is absent.
+ // Used to verify the #27370 fail-open path for ConfigScope.CurrentUser.
+ CreateBrokenConfigFile(currentUserConfigFile);
+ }
+
+ public void SetupTypeMismatchedCurrentUserConfig()
+ {
+ CleanupConfigFiles();
+
+ // Per-user config is syntactically valid JSON, but PowerShellPolicies has the
+ // wrong nested shape: ScriptExecution should be an object but is a string.
+ // This triggers JsonSerializationException inside jToken.ToObject() and
+ // exercises the per-key fail-open path for #27370.
+ File.WriteAllText(
+ currentUserConfigFile,
+ "{ \"PowerShellPolicies\": { \"ScriptExecution\": \"not-an-object\" } }");
+ }
+
private static void CreateBrokenConfigFile(string fileName)
{
File.WriteAllText(fileName, "[abbra");
@@ -978,14 +1000,105 @@ public void Utils_GetPolicySetting_BothConfigFilesNotExist()
fixture.CompareConsoleSessionConfiguration(consoleSessionConfiguration, null);
}
- [Fact, Priority(11)]
- public void PowerShellConfig_GetPowerShellPolicies_BrokenSystemConfig()
+ [Fact]
+ [Priority(11)]
+ public void PowerShellConfig_BrokenSystemConfig_Throws_BrokenCurrentUserConfig_FallsBack()
{
fixture.SetupConfigFile5();
fixture.ForceReadingFromFile();
+ // Broken system-wide config still hard-fails (admin-owned, security-relevant).
Assert.Throws(() => PowerShellConfig.Instance.GetPowerShellPolicies(ConfigScope.AllUsers));
- Assert.Throws(() => PowerShellConfig.Instance.GetPowerShellPolicies(ConfigScope.CurrentUser));
+
+ // Broken per-user config falls back to defaults (#27370).
+ PowerShellPolicies currentUserPolicies = PowerShellConfig.Instance.GetPowerShellPolicies(ConfigScope.CurrentUser);
+ Assert.Null(currentUserPolicies);
+ }
+
+ [Fact]
+ [Priority(12)]
+ public void PowerShellConfig_BrokenCurrentUserConfig_FallsBackToDefaults()
+ {
+ fixture.SetupBrokenCurrentUserConfigOnly();
+ fixture.ForceReadingFromFile();
+
+ // ExecutionPolicy returns null (caller falls back to GP / registry / Restricted).
+ string execPolicy = PowerShellConfig.Instance.GetExecutionPolicy(ConfigScope.CurrentUser, "Microsoft.PowerShell");
+ Assert.Null(execPolicy);
+
+ // Module path returns null (caller uses built-in defaults).
+ string modulePath = PowerShellConfig.Instance.GetModulePath(ConfigScope.CurrentUser);
+ Assert.Null(modulePath);
+
+ // Experimental features list is empty.
+ string[] features = PowerShellConfig.Instance.GetExperimentalFeatures();
+ Assert.Empty(features);
+ }
+
+ [Fact]
+ [Priority(13)]
+ public void PowerShellConfig_TypeMismatchInCurrentUserConfig_FallsBackToDefaults()
+ {
+ // Verifies the per-key fail-open path: the file parses as JSON, but a value
+ // can't be materialized as its target type. Without this fallback the
+ // JsonSerializationException would propagate out of GetPolicySetting and
+ // crash startup just like #27370.
+ fixture.SetupTypeMismatchedCurrentUserConfig();
+ fixture.ForceReadingFromFile();
+
+ PowerShellPolicies policies = PowerShellConfig.Instance.GetPowerShellPolicies(ConfigScope.CurrentUser);
+ Assert.Null(policies);
+ }
+
+ [Fact]
+ [Priority(14)]
+ public void PowerShellConfig_BrokenCurrentUserConfig_EmitsWarningToStderr()
+ {
+ // A regression in the warning path would still let startup succeed (this is the
+ // whole point of the fail-open) -- but the user would silently lose their config
+ // with no indication. This test pins the user-visible warning so that doesn't
+ // happen quietly.
+ fixture.SetupBrokenCurrentUserConfigOnly();
+ fixture.ForceReadingFromFile();
+
+ string stderr = CaptureStderr(() =>
+ PowerShellConfig.Instance.GetExecutionPolicy(ConfigScope.CurrentUser, "Microsoft.PowerShell"));
+
+ Assert.Contains("WARNING:", stderr);
+ Assert.Contains("Falling back to default settings", stderr);
+ }
+
+ [Fact]
+ [Priority(15)]
+ public void PowerShellConfig_TypeMismatchInCurrentUserConfig_EmitsWarningToStderr()
+ {
+ // Pin the user-visible warning for the per-key fail-open path as well.
+ fixture.SetupTypeMismatchedCurrentUserConfig();
+ fixture.ForceReadingFromFile();
+
+ string stderr = CaptureStderr(() =>
+ PowerShellConfig.Instance.GetPowerShellPolicies(ConfigScope.CurrentUser));
+
+ Assert.Contains("WARNING:", stderr);
+ Assert.Contains("PowerShellPolicies", stderr);
+ Assert.Contains("Falling back to default for this setting", stderr);
+ }
+
+ private static string CaptureStderr(Action action)
+ {
+ var captured = new StringWriter();
+ TextWriter originalError = Console.Error;
+ try
+ {
+ Console.SetError(captured);
+ action();
+ }
+ finally
+ {
+ Console.SetError(originalError);
+ }
+
+ return captured.ToString();
}
}
}
diff --git a/test/xUnit/csharp/test_RemoteHyperV.cs b/test/xUnit/csharp/test_RemoteHyperV.cs
index 27f7fb17375..92f77e42ea1 100644
--- a/test/xUnit/csharp/test_RemoteHyperV.cs
+++ b/test/xUnit/csharp/test_RemoteHyperV.cs
@@ -803,5 +803,17 @@ public async Task ValidateFailsWhenTokensMismatch(string token, string expectedT
await serverTask;
}
+
+ [SkippableTheory]
+ [InlineData(false, "a42e7cda-d03f-480c-9cc2-a4de20abb878")] // HV_GUID_PARENT (host partition)
+ [InlineData(true, "e0e16197-dd56-4a10-9195-5ee7a155a838")] // HV_GUID_LOOPBACK (same partition)
+ public void ServerListenerUsesExpectedPartitionVmId(bool loopbackMode, string expectedVmId)
+ {
+ // The session server must listen on a specific partition (host parent, or local
+ // loopback) depending on the requested mode.
+ Guid vmId = System.Management.Automation.Remoting.RemoteSessionHyperVSocketServer.GetListenerVmId(loopbackMode);
+
+ Assert.Equal(new Guid(expectedVmId), vmId);
+ }
}
}
diff --git a/tools/WindowsCI.psm1 b/tools/WindowsCI.psm1
index 685882546c2..7caeb62a715 100644
--- a/tools/WindowsCI.psm1
+++ b/tools/WindowsCI.psm1
@@ -45,7 +45,6 @@ function ConvertTo-NtAccount
<#
Add a user to a local security group
- Requires Windows PowerShell
#>
function Add-UserToGroup
{
diff --git a/tools/packages.microsoft.com/mapping.json b/tools/packages.microsoft.com/mapping.json
index 9214e83cc16..784959f41e7 100644
--- a/tools/packages.microsoft.com/mapping.json
+++ b/tools/packages.microsoft.com/mapping.json
@@ -60,6 +60,38 @@
"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": [
+ "azl"
+ ],
+ "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.azl4.x86_64.rpm",
+ "channel": "stable"
+ },
+ {
+ "url": "azurelinux-4-prod-microsoft-aarch64",
+ "distribution": [
+ "azl"
+ ],
+ "PackageFormat": "PACKAGE_NAME-POWERSHELL_RELEASE-1.azl4.aarch64.rpm",
+ "channel": "stable"
+ },
{
"url": "microsoft-debian-stretch-prod",
"distribution": [
diff --git a/tools/packaging/Update-MacOSCodeSignature.ps1 b/tools/packaging/Update-MacOSCodeSignature.ps1
new file mode 100644
index 00000000000..193c7a1cbb1
--- /dev/null
+++ b/tools/packaging/Update-MacOSCodeSignature.ps1
@@ -0,0 +1,55 @@
+# Copyright (c) Microsoft Corporation.
+# Licensed under the MIT License.
+
+[CmdletBinding()]
+param(
+ [Parameter(Mandatory)]
+ [ValidateScript({ Test-Path -LiteralPath $_ -PathType Container })]
+ [string] $Path,
+
+ [Parameter(Mandatory)]
+ [bool] $OfficialBuild,
+
+ [Parameter(Mandatory)]
+ [ValidateScript({ Test-Path -LiteralPath $_ -PathType Leaf })]
+ [string] $EntitlementsPath
+)
+
+$binaries = @(
+ Get-ChildItem -LiteralPath $Path -Recurse -File |
+ Where-Object { $_.Name -eq 'pwsh' -or $_.Extension -eq '.dylib' }
+)
+
+if ($binaries.Count -eq 0) {
+ throw "No Mach-O binaries were found in '$Path'."
+}
+
+foreach ($binary in $binaries) {
+ & codesign --verify --deep --strict --verbose=4 $binary.FullName
+ if ($LASTEXITCODE -eq 0) {
+ continue
+ }
+
+ if ($OfficialBuild) {
+ throw "codesign verification failed for '$($binary.FullName)'."
+ }
+
+ # Nonofficial signing can leave only one slice of a universal binary signed.
+ # Re-signing on macOS applies an ad-hoc signature across every architecture.
+ Write-Verbose -Message "Applying an ad-hoc signature to '$($binary.FullName)' for the nonofficial package." -Verbose
+ $signArguments = @('--sign', '-', '--force', '--options', 'runtime')
+ if ($binary.Name -eq 'pwsh') {
+ $signArguments += @('--entitlements', $EntitlementsPath)
+ }
+ $signArguments += $binary.FullName
+
+ & codesign @signArguments
+ if ($LASTEXITCODE -ne 0) {
+ throw "Ad-hoc codesign failed for '$($binary.FullName)'."
+ }
+
+ & codesign --verify --deep --strict --verbose=4 $binary.FullName
+ if ($LASTEXITCODE -ne 0) {
+ throw "codesign verification failed for '$($binary.FullName)' after applying an ad-hoc signature."
+ }
+}
diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1
index f1098759687..ac589cbbc6c 100644
--- a/tools/packaging/packaging.psm1
+++ b/tools/packaging/packaging.psm1
@@ -10,7 +10,7 @@ $packagingStrings = Import-PowerShellDataFile "$PSScriptRoot\packaging.strings.p
Import-Module "$PSScriptRoot\..\Xml" -ErrorAction Stop -Force
$DebianDistributions = @("deb")
$RedhatFullDistributions = @("rh")
-$RedhatFddDistributions = @("cm")
+$RedhatFddDistributions = @("cm", "azl4")
$RedhatDistributions = @()
$RedhatDistributions += $RedhatFullDistributions
$RedhatDistributions += $RedhatFddDistributions
@@ -1265,10 +1265,15 @@ function New-UnixPackage {
throw "rpmbuild failed with exit code $exitCode"
}
- # Find the generated RPM
- $rpmFile = Get-ChildItem -Path (Join-Path $rpmsDir $HostArchitecture) -Filter "*.rpm" -ErrorAction Stop |
- Sort-Object -Property LastWriteTime -Descending |
- Select-Object -First 1
+ # Find the exact RPM produced from the spec metadata.
+ $rpmFileName = Get-RpmPackageFileName `
+ -Name $Name `
+ -Version $packageVersion `
+ -Iteration $Iteration `
+ -Distribution $DebDistro `
+ -HostArchitecture $HostArchitecture
+ $rpmArchitecturePath = Join-Path $rpmsDir $HostArchitecture
+ $rpmFile = Get-Item -Path (Join-Path $rpmArchitecturePath $rpmFileName) -ErrorAction Stop
if ($rpmFile) {
# Copy RPM to current location
@@ -1544,6 +1549,34 @@ Class LinkInfo
[string] $Destination
}
+function Get-RpmPackageFileName
+{
+ <#
+ .SYNOPSIS
+ Gets the RPM file name produced by rpmbuild for the supplied package metadata.
+ #>
+ [CmdletBinding()]
+ param(
+ [Parameter(Mandatory)]
+ [string] $Name,
+
+ [Parameter(Mandatory)]
+ [string] $Version,
+
+ [Parameter(Mandatory)]
+ [string] $Iteration,
+
+ [Parameter(Mandatory)]
+ [string] $Distribution,
+
+ [Parameter(Mandatory)]
+ [string] $HostArchitecture
+ )
+
+ $rpmVersion = $Version -replace '-', '_'
+ return "$Name-$rpmVersion-$Iteration.$Distribution.$HostArchitecture.rpm"
+}
+
function New-RpmSpec
{
param(
@@ -1591,7 +1624,7 @@ function New-RpmSpec
# e.g., "7.6.0-preview.6" becomes Version: 7.6.0_preview.6
$rpmVersion = $Version -replace '-', '_'
- # Build Release field with distribution suffix (e.g., "1.cm" or "1.rh")
+ # Build Release field with distribution suffix (e.g., "1.cm", "1.azl4", or "1.rh")
# Don't use RPM macros - build the full release string in PowerShell
$rpmRelease = "$Iteration.$Distribution"
@@ -2133,17 +2166,17 @@ function Get-PackageDependencies
"openssl-libs",
"libicu"
)
- } elseif ($Distribution -eq 'cm') {
- # Taken from the list here:
- # https://github.com/dotnet/dotnet-docker/blob/d451d6e9427f58c8508f1297c862663a27eb609f/src/runtime-deps/6.0/cbl-mariner1.0/amd64/Dockerfile#L6
+ } elseif ($Distribution -in 'cm', 'azl4') {
+ # Azure Linux 3 and 4 use the same .NET 10 runtime dependencies:
+ # https://github.com/dotnet/dotnet-docker/blob/7962e8c9336303584720344bd644287a1fe77844/src/runtime-deps/10.0/azurelinux4.0/amd64/Dockerfile
$Dependencies = @(
+ "ca-certificates"
"glibc"
+ "icu"
"libgcc"
- "krb5"
"libstdc++"
- "zlib"
- "icu"
"openssl-libs"
+ "tzdata"
)
if($Script:Options.Runtime -like 'fx*') {
$Dependencies += @(