mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-26 19:34:22 +08:00
Change docs.microsoft.com
to learn.microsoft.com
(#19994)
This commit is contained in:
parent
92833aee64
commit
5595072568
@ -1,6 +1,6 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
# .NET coding convention settings for EditorConfig
|
||||
# https://docs.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference
|
||||
# https://learn.microsoft.com/visualstudio/ide/editorconfig-code-style-settings-reference
|
||||
#
|
||||
# This file comes from dotnet repositories:
|
||||
# https://github.com/dotnet/runtime/blob/master/.editorconfig
|
||||
|
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -402,7 +402,7 @@ Repeat offenses may result in a permanent ban from the PowerShell org.
|
||||
[up-for-grabs]: https://github.com/powershell/powershell/issues?q=is%3Aopen+is%3Aissue+label%3AUp-for-Grabs
|
||||
[semantic linefeeds]: https://rhodesmill.org/brandon/2012/one-sentence-per-line/
|
||||
[PowerShell-Docs]: https://github.com/powershell/powershell-docs/
|
||||
[use-vscode-editor]: https://docs.microsoft.com/dotnet/core/tutorials/with-visual-studio-code
|
||||
[use-vscode-editor]: https://learn.microsoft.com/dotnet/core/tutorials/with-visual-studio-code
|
||||
[repository-maintainer]: ../docs/community/governance.md#repository-maintainers
|
||||
[area-expert]: ../docs/community/governance.md#area-experts
|
||||
[first-time-issue]: https://github.com/powershell/powershell/issues?q=is%3Aopen+is%3Aissue+label%3AFirst-Time-Issue
|
||||
|
2
.github/ISSUE_TEMPLATE/Bug_Report.yaml
vendored
2
.github/ISSUE_TEMPLATE/Bug_Report.yaml
vendored
@ -21,7 +21,7 @@ body:
|
||||
required: true
|
||||
- label: Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).
|
||||
required: true
|
||||
- label: Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).
|
||||
- label: Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
@ -23,7 +23,7 @@ body:
|
||||
required: true
|
||||
- label: Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).
|
||||
required: true
|
||||
- label: Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).
|
||||
- label: Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
|
4
.github/SUPPORT.md
vendored
4
.github/SUPPORT.md
vendored
@ -5,9 +5,9 @@ If you do not see your problem captured, please file a [new issue][] and follow
|
||||
Also make sure to see the [Official Support Policy][].
|
||||
If you know how to fix the issue, feel free to send a pull request our way. (The [Contribution Guides][] apply to that pull request, you may want to give it a read!)
|
||||
|
||||
[Official Support Policy]: https://docs.microsoft.com/powershell/scripting/powershell-support-lifecycle
|
||||
[Official Support Policy]: https://learn.microsoft.com/powershell/scripting/powershell-support-lifecycle
|
||||
[FAQ]: https://github.com/PowerShell/PowerShell/tree/master/docs/FAQ.md
|
||||
[Contribution Guides]: https://github.com/PowerShell/PowerShell/tree/master/.github/CONTRIBUTING.md
|
||||
[known issues]: https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
|
||||
[known issues]: https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
|
||||
[GitHub issues]: https://github.com/PowerShell/PowerShell/issues
|
||||
[new issue]: https://github.com/PowerShell/PowerShell/issues/new/choose
|
||||
|
710
.globalconfig
710
.globalconfig
File diff suppressed because it is too large
Load Diff
@ -261,7 +261,7 @@ dlwyatt
|
||||
dockerbasedbuild
|
||||
dockerfile
|
||||
dockerfiles
|
||||
docs.microsoft.com
|
||||
learn.microsoft.com
|
||||
doctordns
|
||||
don'ts
|
||||
dongbo
|
||||
|
12
ADOPTERS.md
12
ADOPTERS.md
@ -14,10 +14,10 @@ This is a list of adopters of using PowerShell in production or in their product
|
||||
|
||||
* [Azure Cloud Shell](https://shell.azure.com/) provides a batteries-included browser-based PowerShell environment used by Azure administrators to manage their environment.
|
||||
It includes up-to-date PowerShell modules for `Azure`, `AzureAD`, `Exchange`, `Teams`, and many more.
|
||||
More information about Azure Cloud Shell is available at [Azure Cloud Shell Overview.](https://docs.microsoft.com/azure/cloud-shell/overview)
|
||||
More information about Azure Cloud Shell is available at [Azure Cloud Shell Overview.](https://learn.microsoft.com/azure/cloud-shell/overview)
|
||||
* [Azure Functions - PowerShell](https://github.com/Azure/azure-functions-powershell-worker) is a serverless compute service to execute PowerShell scripts in the cloud without worrying about managing resources.
|
||||
In addition, Azure Functions provides client tools such as [`Az.Functions`](https://www.powershellgallery.com/packages/Az.Functions), a cross-platform PowerShell module to manage function apps and service plans in the cloud.
|
||||
For more information about Functions, please visit [functions overview](https://docs.microsoft.com/azure/azure-functions/functions-overview).
|
||||
For more information about Functions, please visit [functions overview](https://learn.microsoft.com/azure/azure-functions/functions-overview).
|
||||
* [PowerShell Universal](https://ironmansoftware.com/powershell-universal) is a cross-platform web framework for PowerShell.
|
||||
It provides the ability to create robust, interactive websites, REST APIs, and Electron-based desktop apps with PowerShell script.
|
||||
More information about PowerShell Universal Dashboard is available at the [PowerShell Universal Dashboard Docs](https://docs.universaldashboard.io).
|
||||
@ -28,12 +28,12 @@ This is a list of adopters of using PowerShell in production or in their product
|
||||
* [Amazon AWS](https://aws.com) supports PowerShell in a wide variety of its products including [AWS tools for PowerShell](https://github.com/aws/aws-tools-for-powershell),
|
||||
[AWS Lambda Support For PowerShell](https://github.com/aws/aws-lambda-dotnet/tree/master/PowerShell) and [AWS PowerShell Tools for `CodeBuild`](https://docs.aws.amazon.com/powershell/latest/reference/items/CodeBuild_cmdlets.html)
|
||||
as well as supporting PowerShell Core in both Windows and Linux EC2 Images.
|
||||
* [Azure Resource Manager Deployment Scripts](https://docs.microsoft.com/azure/azure-resource-manager/templates/deployment-script-template) Complete the "last mile" of your Azure Resource Manager (ARM) template deployments with a Deployment Script, which enables you to run an arbitrary PowerShell script in the context of a deployment.
|
||||
* [Azure Resource Manager Deployment Scripts](https://learn.microsoft.com/azure/azure-resource-manager/templates/deployment-script-template) Complete the "last mile" of your Azure Resource Manager (ARM) template deployments with a Deployment Script, which enables you to run an arbitrary PowerShell script in the context of a deployment.
|
||||
Designed to let you complete tasks that should be part of a deployment, but are not possible in an ARM template today — for example, creating a Key Vault certificate or querying an external API for a new CIDR block.
|
||||
* [Azure Pipelines Hosted Agents](https://docs.microsoft.com/azure/devops/pipelines/agents/hosted?view=azure-devops) Windows, Ubuntu, and MacOS Agents used by Azure Pipelines customers have PowerShell pre-installed so that customers can make use of it for all their CI/CD needs.
|
||||
* [Azure Pipelines Hosted Agents](https://learn.microsoft.com/azure/devops/pipelines/agents/hosted?view=azure-devops) Windows, Ubuntu, and MacOS Agents used by Azure Pipelines customers have PowerShell pre-installed so that customers can make use of it for all their CI/CD needs.
|
||||
* [GitHub Actions Virtual Environments for Hosted Runners](https://help.github.com/actions/reference/virtual-environments-for-github-hosted-runners) Windows, Ubuntu, and macOS virtual environments used by customers of GitHub Actions include PowerShell out of the box.
|
||||
* [GitHub Actions Python builds](https://github.com/actions/python-versions) GitHub Actions uses PowerShell to automate building Python from source for its runners.
|
||||
* [Microsoft HoloLens](https://www.microsoft.com/hololens) makes extensive use of PowerShell 7+ throughout the development cycle to automate tasks such as firmware assembly and automated testing.
|
||||
* [Power BI](https://powerbi.microsoft.com/) provides PowerShell users a set of cmdlets in [MicrosoftPowerBIMgmt](https://docs.microsoft.com/powershell/power-bi) module to manage and automate the Power BI service.
|
||||
* [Power BI](https://powerbi.microsoft.com/) provides PowerShell users a set of cmdlets in [MicrosoftPowerBIMgmt](https://learn.microsoft.com/powershell/power-bi) module to manage and automate the Power BI service.
|
||||
This is in addition to Power BI leveraging PowerShell internally for various engineering systems and infrastructure for its service.
|
||||
* [Windows 10 IoT Core](https://docs.microsoft.com/windows/iot-core/windows-iot-core) is a small form factor Windows edition for IoT devices and now you can easily include the [PowerShell package](https://github.com/ms-iot/iot-adk-addonkit/blob/master/Tools/IoTCoreImaging/Docs/Import-PSCoreRelease.md#Import-PSCoreRelease) in your imaging process.
|
||||
* [Windows 10 IoT Core](https://learn.microsoft.com/windows/iot-core/windows-iot-core) is a small form factor Windows edition for IoT devices and now you can easily include the [PowerShell package](https://github.com/ms-iot/iot-adk-addonkit/blob/master/Tools/IoTCoreImaging/Docs/Import-PSCoreRelease.md#Import-PSCoreRelease) in your imaging process.
|
||||
|
36
README.md
36
README.md
@ -109,25 +109,25 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu
|
||||
[pv-arm64]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.0-preview.4/powershell-7.4.0-preview.4-linux-arm64.tar.gz
|
||||
[pv-snap]: https://snapcraft.io/powershell-preview
|
||||
|
||||
[in-windows]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows
|
||||
[in-ubuntu16]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#ubuntu-1604
|
||||
[in-ubuntu18]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#ubuntu-1804
|
||||
[in-ubuntu20]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#ubuntu-2004
|
||||
[in-windows]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows
|
||||
[in-ubuntu16]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#ubuntu-1604
|
||||
[in-ubuntu18]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#ubuntu-1804
|
||||
[in-ubuntu20]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#ubuntu-2004
|
||||
[in-ubuntu22]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.3#ubuntu
|
||||
[in-deb10]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#debian-10
|
||||
[in-centos]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#centos-7
|
||||
[in-rhel7]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#red-hat-enterprise-linux-rhel-7
|
||||
[in-opensuse]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#opensuse
|
||||
[in-fedora]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#fedora
|
||||
[in-archlinux]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#arch-linux
|
||||
[in-macos]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-macos
|
||||
[in-deb10]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#debian-10
|
||||
[in-centos]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#centos-7
|
||||
[in-rhel7]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#red-hat-enterprise-linux-rhel-7
|
||||
[in-opensuse]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#opensuse
|
||||
[in-fedora]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#fedora
|
||||
[in-archlinux]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#arch-linux
|
||||
[in-macos]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-macos
|
||||
[in-docker]: https://github.com/PowerShell/PowerShell-Docker
|
||||
[in-kali]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#kali
|
||||
[in-windows-zip]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows#zip
|
||||
[in-tar-linux]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#binary-archives
|
||||
[in-tar-macos]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-macos#binary-archives
|
||||
[in-raspbian]: https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#raspbian
|
||||
[in-arm]: https://docs.microsoft.com/powershell/scripting/install/powershell-core-on-arm
|
||||
[in-kali]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#kali
|
||||
[in-windows-zip]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-windows#zip
|
||||
[in-tar-linux]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#binary-archives
|
||||
[in-tar-macos]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-macos#binary-archives
|
||||
[in-raspbian]: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#raspbian
|
||||
[in-arm]: https://learn.microsoft.com/powershell/scripting/install/powershell-core-on-arm
|
||||
[corefx-win]:https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#windows
|
||||
[corefx-linux]:https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#linux
|
||||
[corefx-macos]:https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#macos
|
||||
@ -237,7 +237,7 @@ License: By requesting and using the Container OS Image for Windows containers,
|
||||
|
||||
### Telemetry
|
||||
|
||||
Please visit our [about_Telemetry](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_telemetry)
|
||||
Please visit our [about_Telemetry](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_telemetry)
|
||||
topic to read details about telemetry gathered by PowerShell.
|
||||
|
||||
## Governance
|
||||
|
@ -18,7 +18,7 @@ switch ($TestHook) {
|
||||
default {
|
||||
$jobScript = {
|
||||
# This registers Microsoft Update via a predifened GUID with the Windows Update Agent.
|
||||
# https://docs.microsoft.com/en-us/windows/win32/wua_sdk/opt-in-to-microsoft-update
|
||||
# https://learn.microsoft.com/windows/win32/wua_sdk/opt-in-to-microsoft-update
|
||||
|
||||
$serviceManager = (New-Object -ComObject Microsoft.Update.ServiceManager)
|
||||
$isRegistered = $serviceManager.QueryServiceRegistration('7971f918-a847-4430-9279-4a52d1efe18d').Service.IsRegisteredWithAu
|
||||
|
@ -1622,7 +1622,7 @@ function Publish-TestResults
|
||||
# NUnit allowed values are: Passed, Failed, Inconclusive or Ignored (the spec says Skipped but it doesn' work with Azure DevOps)
|
||||
# https://github.com/nunit/docs/wiki/Test-Result-XML-Format
|
||||
# Azure DevOps Reporting is so messed up for NUnit V2 and doesn't follow their own spec
|
||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml
|
||||
# https://learn.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml
|
||||
# So, we will map skipped to the actual value in the NUnit spec and they will ignore all results for tests which were not executed
|
||||
Get-Content $Path | ForEach-Object {
|
||||
$_ -replace 'result="Ignored"', 'result="Skipped"'
|
||||
|
@ -1,6 +1,6 @@
|
||||
# DSC MOF Compilation Demo
|
||||
|
||||
[PowerShell Desired State Configuration](https://docs.microsoft.com/powershell/scripting/dsc/overview) is a declarative configuration platform for Windows and Linux.
|
||||
[PowerShell Desired State Configuration](https://learn.microsoft.com/powershell/dsc/overview) is a declarative configuration platform for Windows and Linux.
|
||||
DSC configurations can be authored in PowerShell and compiled into the resultant MOF document.
|
||||
|
||||
This demo shows use of PowerShell to author a DSC configuration to set the configuration of an Apache web server. PowerShell scripting is used to assess distribution and version-specific properties,
|
||||
|
@ -23,7 +23,7 @@ We use the [.NET Command-Line Interface][dotnet-cli] (`dotnet`) to build the man
|
||||
Installing the toolchain is as easy as running `Start-PSBootstrap` in PowerShell.
|
||||
Of course, this requires a self-hosted copy of PowerShell on Linux.
|
||||
|
||||
Fortunately, this is as easy as [downloading and installing the package](https://docs.microsoft.com/powershell/scripting/install/installing-powershell-core-on-linux#binary-archives).
|
||||
Fortunately, this is as easy as [downloading and installing the package](https://learn.microsoft.com/en-us/powershell/scripting/install/install-other-linux#binary-archives).
|
||||
The `./tools/install-powershell.sh` script will also install the PowerShell package.
|
||||
|
||||
In Bash:
|
||||
@ -53,7 +53,7 @@ The `Start-PSBootstrap` function does the following:
|
||||
|
||||
If you want to use `dotnet` outside of `Start-PSBuild`, add `~/.dotnet` to your `PATH` environment variable.
|
||||
|
||||
[dotnet-cli]: https://docs.microsoft.com/dotnet/core/tools/
|
||||
[dotnet-cli]: https://learn.microsoft.com/dotnet/core/tools/
|
||||
|
||||
## Build using our module
|
||||
|
||||
|
@ -47,7 +47,7 @@ Install-Dotnet
|
||||
It removes the previously installed version of .NET CLI and installs the version that PowerShell Core depends on.
|
||||
If you have any problems installing `dotnet`, please see their [documentation][cli-docs].
|
||||
|
||||
[dotnet-cli]: https://docs.microsoft.com/dotnet/core/tools/
|
||||
[dotnet-cli]: https://learn.microsoft.com/dotnet/core/tools/
|
||||
[cli-docs]: https://www.microsoft.com/net/core#windowscmd
|
||||
|
||||
## Build using our module
|
||||
|
@ -220,9 +220,9 @@ and macOS as well as Windows using the .NET Core 2.x SDK command-line tools.
|
||||
For more information on .NET Standard, check out the [documentation][net-std-docs]
|
||||
and the [.NET Standard YouTube channel][net-std-chan].
|
||||
|
||||
[dotnet-cli]: https://docs.microsoft.com/dotnet/core/tools/
|
||||
[dotnet-cli]: https://learn.microsoft.com/dotnet/core/tools/
|
||||
[net-core-sdk]: https://www.microsoft.com/net/download/core
|
||||
[net-std-docs]: https://docs.microsoft.com/dotnet/standard/net-standard
|
||||
[net-std-docs]: https://learn.microsoft.com/dotnet/standard/net-standard
|
||||
[net-std-chan]: https://www.youtube.com/playlist?list=PLRAdsfhKI4OWx321A_pr-7HhRNk7wOLLY
|
||||
[pscore-os]: https://github.com/powershell/powershell#get-powershell
|
||||
[readme]: ../../README.md
|
||||
|
@ -41,7 +41,7 @@ process named `powershell`, and will attach to it. If you need more fine-grained
|
||||
control, replace `processName` with `processId` and provide a PID. (Please be
|
||||
careful not to commit such a change.)
|
||||
|
||||
[core-debug]: https://docs.microsoft.com/dotnet/core/tutorials/with-visual-studio-code#debug
|
||||
[core-debug]: https://learn.microsoft.com/dotnet/core/tutorials/with-visual-studio-code#debug
|
||||
[vscode]: https://code.visualstudio.com/
|
||||
[OmniSharp]: https://github.com/OmniSharp/omnisharp-vscode
|
||||
|
||||
|
@ -88,7 +88,7 @@ We also run the [.NET code formatter tool](https://github.com/dotnet/codeformatt
|
||||
|
||||
### Documentation comments
|
||||
|
||||
* Create documentation using [XML documentation comments](https://docs.microsoft.com/dotnet/csharp/language-reference/xmldoc/) so that Visual Studio and other IDEs can use IntelliSense to show quick information about types or members.
|
||||
* Create documentation using [XML documentation comments](https://learn.microsoft.com/dotnet/csharp/language-reference/xmldoc/) so that Visual Studio and other IDEs can use IntelliSense to show quick information about types or members.
|
||||
|
||||
* Publicly visible types and their members must be documented.
|
||||
Internal and private members may use doc comments but it is not required.
|
||||
@ -189,16 +189,16 @@ See [CODEOWNERS](../../.github/CODEOWNERS) for more information about the area e
|
||||
* Consider using the `Interlocked` class instead of the `lock` statement to atomically change simple states. The `Interlocked` class provides better performance for updates that must be atomic.
|
||||
|
||||
* Here are some useful links for your reference:
|
||||
* [Framework Design Guidelines](https://docs.microsoft.com/dotnet/standard/design-guidelines/index) - Naming, Design and Usage guidelines including:
|
||||
* [Arrays](https://docs.microsoft.com/dotnet/standard/design-guidelines/arrays)
|
||||
* [Collections](https://docs.microsoft.com/dotnet/standard/design-guidelines/guidelines-for-collections)
|
||||
* [Exceptions](https://docs.microsoft.com/dotnet/standard/design-guidelines/exceptions)
|
||||
* [Best Practices for Developing World-Ready Applications](https://docs.microsoft.com/dotnet/core/extensions/best-practices-for-developing-world-ready-apps) - Unicode, Culture, Encoding and Localization.
|
||||
* [Best Practices for Exceptions](https://docs.microsoft.com/dotnet/standard/exceptions/best-practices-for-exceptions)
|
||||
* [Best Practices for Using Strings in .NET](https://docs.microsoft.com/dotnet/standard/base-types/best-practices-strings)
|
||||
* [Best Practices for Regular Expressions in .NET](https://docs.microsoft.com/dotnet/standard/base-types/best-practices)
|
||||
* [Serialization Guidelines](https://docs.microsoft.com/dotnet/standard/serialization/serialization-guidelines)
|
||||
* [Managed Threading Best Practices](https://docs.microsoft.com/dotnet/standard/threading/managed-threading-best-practices)
|
||||
* [Framework Design Guidelines](https://learn.microsoft.com/dotnet/standard/design-guidelines/index) - Naming, Design and Usage guidelines including:
|
||||
* [Arrays](https://learn.microsoft.com/dotnet/standard/design-guidelines/arrays)
|
||||
* [Collections](https://learn.microsoft.com/dotnet/standard/design-guidelines/guidelines-for-collections)
|
||||
* [Exceptions](https://learn.microsoft.com/dotnet/standard/design-guidelines/exceptions)
|
||||
* [Best Practices for Developing World-Ready Applications](https://learn.microsoft.com/dotnet/core/extensions/best-practices-for-developing-world-ready-apps) - Unicode, Culture, Encoding and Localization.
|
||||
* [Best Practices for Exceptions](https://learn.microsoft.com/dotnet/standard/exceptions/best-practices-for-exceptions)
|
||||
* [Best Practices for Using Strings in .NET](https://learn.microsoft.com/dotnet/standard/base-types/best-practices-strings)
|
||||
* [Best Practices for Regular Expressions in .NET](https://learn.microsoft.com/dotnet/standard/base-types/best-practices)
|
||||
* [Serialization Guidelines](https://learn.microsoft.com/dotnet/standard/serialization/serialization-guidelines)
|
||||
* [Managed Threading Best Practices](https://learn.microsoft.com/dotnet/standard/threading/managed-threading-best-practices)
|
||||
|
||||
## Portable Code
|
||||
|
||||
|
@ -41,7 +41,7 @@ There is a special hosting scenario for native hosts,
|
||||
where Trusted Platform Assemblies (TPA) do not include PowerShell assemblies,
|
||||
such as the in-box `powershell.exe` in Nano Server and the Azure DSC host.
|
||||
|
||||
For such hosting scenarios, the native host needs to bootstrap by calling [`PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContext`](https://docs.microsoft.com/dotnet/api/system.management.automation.powershellassemblyloadcontextinitializer.setpowershellassemblyloadcontext).
|
||||
For such hosting scenarios, the native host needs to bootstrap by calling [`PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContext`](https://learn.microsoft.com/dotnet/api/system.management.automation.powershellassemblyloadcontextinitializer.setpowershellassemblyloadcontext).
|
||||
When using this API, the native host can pass in the path to the directory that contains PowerShell assemblies.
|
||||
A handler will then be registered to the [`Resolving`](https://github.com/dotnet/corefx/blob/d6678e9653defe3cdfff26b2ff62135b6b22c77f/src/System.Runtime.Loader/ref/System.Runtime.Loader.cs#L38)
|
||||
event of the default load context to deal with the loading of assemblies from that directory.
|
||||
|
@ -180,7 +180,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
}
|
||||
catch (Exception e) when (
|
||||
// Handle exceptions related to file access to provide more specific error message
|
||||
// https://docs.microsoft.com/en-us/dotnet/standard/io/handling-io-errors
|
||||
// https://learn.microsoft.com/dotnet/standard/io/handling-io-errors
|
||||
e is IOException ||
|
||||
e is UnauthorizedAccessException ||
|
||||
e is NotSupportedException ||
|
||||
|
@ -1634,7 +1634,7 @@ namespace Microsoft.PowerShell
|
||||
if (Platform.IsWindowsDesktop)
|
||||
{
|
||||
// Note: this API can detect if a third-party screen reader is active, such as NVDA, but not the in-box Windows Narrator.
|
||||
// Quoted from https://docs.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfoa about the
|
||||
// Quoted from https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfoa about the
|
||||
// accessibility parameter 'SPI_GETSCREENREADER':
|
||||
// "Narrator, the screen reader that is included with Windows, does not set the SPI_SETSCREENREADER or SPI_GETSCREENREADER flags."
|
||||
bool enabled = false;
|
||||
|
@ -31,7 +31,7 @@ Licensed under the MIT License.
|
||||
- '_' (ASCII 95) is the only character in \p{Pc} class out of the first 0..255 characters
|
||||
- No characters in the first 0..255 characters belong to \p{Cf}, \p{Mn}, \p{Mc}
|
||||
|
||||
clrTypeRegex and clrTypeSpecialCharacterRegex are based on https://docs.microsoft.com/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names
|
||||
clrTypeRegex and clrTypeSpecialCharacterRegex are based on https://learn.microsoft.com/dotnet/framework/reflection-and-codedom/specifying-fully-qualified-type-names
|
||||
|
||||
clrTypeSpecialCharacterRegex includes the following characters;
|
||||
|
||||
|
@ -7388,7 +7388,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
set
|
||||
{
|
||||
// Check for UTF-7 by checking for code page 65000
|
||||
// See: https://docs.microsoft.com/en-us/dotnet/core/compatibility/corefx#utf-7-code-paths-are-obsolete
|
||||
// See: https://learn.microsoft.com/dotnet/core/compatibility/corefx#utf-7-code-paths-are-obsolete
|
||||
if (value != null && value.CodePage == 65000)
|
||||
{
|
||||
_provider.WriteWarning(PathUtilsStrings.Utf7EncodingObsolete);
|
||||
@ -7880,7 +7880,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
return false;
|
||||
}
|
||||
|
||||
// The name surrogate bit 0x20000000 is defined in https://docs.microsoft.com/windows/win32/fileio/reparse-point-tags
|
||||
// The name surrogate bit 0x20000000 is defined in https://learn.microsoft.com/windows/win32/fileio/reparse-point-tags
|
||||
// Name surrogates (0x20000000) are reparse points that point to other named entities local to the filesystem
|
||||
// (like symlinks and mount points).
|
||||
// In the case of OneDrive, they are not name surrogates and would be safe to recurse into.
|
||||
|
@ -98,7 +98,7 @@ namespace System.Management.Automation
|
||||
internal static void WarnIfObsolete(Cmdlet cmdlet, Encoding encoding)
|
||||
{
|
||||
// Check for UTF-7 by checking for code page 65000
|
||||
// See: https://docs.microsoft.com/en-us/dotnet/core/compatibility/corefx#utf-7-code-paths-are-obsolete
|
||||
// See: https://learn.microsoft.com/dotnet/core/compatibility/corefx#utf-7-code-paths-are-obsolete
|
||||
if (encoding != null && encoding.CodePage == 65000)
|
||||
{
|
||||
cmdlet.WriteWarning(PathUtilsStrings.Utf7EncodingObsolete);
|
||||
|
@ -19,7 +19,7 @@ namespace System.Management.Automation.Internal
|
||||
/// <summary>
|
||||
/// Performing EventSource initialization in the Static Constructor since this is thread safe.
|
||||
/// Static constructors are guaranteed to be run only once per application domain, before any instances of a class are created or any static members are accessed.
|
||||
/// https://docs.microsoft.com/dotnet/csharp/programming-guide/classes-and-structs/static-constructors.
|
||||
/// https://learn.microsoft.com/dotnet/csharp/programming-guide/classes-and-structs/static-constructors.
|
||||
/// </summary>
|
||||
static TelemetryWrapper()
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ function GetMultipartBody {
|
||||
<#
|
||||
Defines the list of redirect codes to test as well as the
|
||||
expected Method when the redirection is handled.
|
||||
See https://docs.microsoft.com/previous-versions/windows/apps/f92ssyy1(v=vs.105)
|
||||
See https://learn.microsoft.com/dotnet/api/system.net.httpstatuscode
|
||||
for additonal details.
|
||||
#>
|
||||
$redirectTests = @(
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Sample code from https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_script_internationalization
|
||||
# Sample code from https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_script_internationalization
|
||||
|
||||
$Day = DATA {
|
||||
# culture="en-US"
|
||||
|
@ -351,7 +351,7 @@ function New-ComplexPassword
|
||||
$password = [string]::Empty
|
||||
# Windows password complexity rule requires minimum 8 characters and using at least 3 of the
|
||||
# buckets above, so we just pick one from each bucket twice.
|
||||
# https://docs.microsoft.com/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements
|
||||
# https://learn.microsoft.com/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements
|
||||
1..2 | ForEach-Object {
|
||||
$Password += $numbers[(Get-Random $numbers.Length)] + $lowercase[(Get-Random $lowercase.Length)] +
|
||||
$uppercase[(Get-Random $uppercase.Length)] + $symbols[(Get-Random $symbols.Length)]
|
||||
|
@ -173,7 +173,7 @@ Function Start-HTTPListener {
|
||||
|
||||
Example: test=redirectex&type=Moved&multiredirect=true
|
||||
|
||||
See also https://docs.microsoft.com/dotnet/api/system.net.httpstatuscode
|
||||
See also https://learn.microsoft.com/dotnet/api/system.net.httpstatuscode
|
||||
#>
|
||||
"redirect"
|
||||
{
|
||||
|
@ -26,4 +26,4 @@ namespace PSTests.YourNameSpace
|
||||
}
|
||||
```
|
||||
|
||||
[xunit-filter]: https://docs.microsoft.com/dotnet/core/testing/selective-unit-tests
|
||||
[xunit-filter]: https://learn.microsoft.com/dotnet/core/testing/selective-unit-tests
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
|
||||
<!-- See definitions in C:\Windows\Microsoft.NET\Framework\v4.0.30319\CLR-ETW.man for .NET events -->
|
||||
<!-- See MSDN docs about 'region of interest': https://docs.microsoft.com/windows-hardware/test/wpt/regions-of-interest -->
|
||||
<!-- See MSDN docs about 'region of interest': https://learn.microsoft.com/windows-hardware/test/wpt/regions-of-interest -->
|
||||
<!--
|
||||
Unlike JIT, GC is largely single threaded and the times correlate very well with PerfView where we can drill down into each GC
|
||||
generation in the region graph in WPA.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
|
||||
<?Copyright (c) Microsoft Corporation.?>
|
||||
<!-- See MSDN docs about 'region of interest': https://docs.microsoft.com/windows-hardware/test/wpt/regions-of-interest -->
|
||||
<!-- See MSDN docs about 'region of interest': https://learn.microsoft.com/windows-hardware/test/wpt/regions-of-interest -->
|
||||
<InstrumentationManifest>
|
||||
<Instrumentation>
|
||||
<Regions>
|
||||
@ -316,4 +316,3 @@
|
||||
</Regions>
|
||||
</Instrumentation>
|
||||
</InstrumentationManifest>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- To work with ngen'd images and non-ngen'd images, entries are duplicated,
|
||||
once with .dll, and again with .ni.dll -->
|
||||
<!-- See MSDN docs about 'region of interest': https://docs.microsoft.com/windows-hardware/test/wpt/stack-tags -->
|
||||
<!-- See MSDN docs about 'region of interest': https://learn.microsoft.com/windows-hardware/test/wpt/stack-tags -->
|
||||
<Tag Name="PowerShell">
|
||||
<Tag Name="Pipeline Execution">
|
||||
<Tag Name="Interpreter">
|
||||
@ -38,4 +38,3 @@
|
||||
<Entrypoint Module="System.Management.Automation.ni.dll" Method="System.Management.Automation.PipelineOps.*"/>
|
||||
</Tag>
|
||||
</Tag>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user