Update use of "PowerShell Core" to just "PowerShell" (#9513)

This commit is contained in:
Steve Lee authored and Dongbo Wang committed 2019-05-10 15:34:27 -07:00
1 parent ade85b4faa
commit a96b4c0404
60 files changed
+187 -187

No files matched your search

+1 -1
View File
@@ -89,7 +89,7 @@
</Target>
<PropertyGroup>
<Product>PowerShell Core</Product>
<Product>PowerShell</Product>
<Company>Microsoft Corporation</Company>
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
+6 -6
View File
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Package IgnorableNamespaces="uap mp rescap desktop6"
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
@@ -12,7 +12,7 @@
<Identity Name="Microsoft.PowerShell" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="$VERSION$" />
<Properties>
<DisplayName>PowerShell Core 6</DisplayName>
<DisplayName>PowerShell 7</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>assets\StoreLogo.png</Logo>
<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
@@ -36,7 +36,7 @@
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
<uap:VisualElements DisplayName="PowerShell Core 6" Description="PowerShell is an automation and configuration management platform. It consists of a cross-platform (Windows, Linux, and macOS) command-line shell and associated scripting language." BackgroundColor="transparent" Square150x150Logo="assets\Square150x150Logo.png" Square44x44Logo="assets\Square44x44Logo.png">
<uap:VisualElements DisplayName="PowerShell 7" Description="PowerShell is an automation and configuration management platform. It consists of a cross-platform (Windows, Linux, and macOS) command-line shell and associated scripting language." BackgroundColor="transparent" Square150x150Logo="assets\Square150x150Logo.png" Square44x44Logo="assets\Square44x44Logo.png">
</uap:VisualElements>
</Application>
</Applications>
+6 -6
View File
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<description> PowerShell Core 6 </description>
<description> PowerShell 7</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
@@ -21,6 +21,6 @@
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</application>
</compatibility>
</assembly>
+4 -4
View File
@@ -100,7 +100,7 @@ function Get-PSCommitId
function Get-EnvironmentInformation
{
$environment = @{}
# PowerShell Core will likely not be built on pre-1709 nanoserver
# PowerShell will likely not be built on pre-1709 nanoserver
if ($PSVersionTable.ContainsKey("PSEdition") -and "Core" -eq $PSVersionTable.PSEdition) {
$environment += @{'IsCoreCLR' = $true}
$environment += @{'IsLinux' = $IsLinux}
@@ -488,7 +488,7 @@ Fix steps:
# fxdependent package does not have an executable to set iconPath etc.
if ($Options.Runtime -ne 'fxdependent') {
Start-NativeExecution { & $rcedit $pwshPath --set-icon $iconPath `
--set-file-version $fileVersion --set-product-version $ReleaseVersion --set-version-string "ProductName" "PowerShell Core 6" `
--set-file-version $fileVersion --set-product-version $ReleaseVersion --set-version-string "ProductName" "PowerShell 7" `
--set-version-string "LegalCopyright" "(C) Microsoft Corporation. All Rights Reserved." `
--application-manifest "$PSScriptRoot\assets\pwsh.manifest" } | Write-Verbose
}
@@ -919,7 +919,7 @@ function Start-PSPester {
[switch]$IncludeCommonTests,
[string]$ExperimentalFeatureName,
[Parameter(HelpMessage='Title to publish the results as.')]
[string]$Title = 'PowerShell Core Tests',
[string]$Title = 'PowerShell 7 Tests',
[Parameter(ParameterSetName='Wait', Mandatory=$true,
HelpMessage='Wait for the debugger to attach to PowerShell before Pester starts. Debug builds only!')]
[switch]$Wait,
@@ -1737,7 +1737,7 @@ function Start-PSBootstrap {
## The VSCode build task requires 'pwsh.exe' to be found in Path
if (-not (Get-Command -Name pwsh.exe -CommandType Application -ErrorAction Ignore))
{
Write-Log "pwsh.exe not found. Install latest PowerShell Core release and add it to Path"
Write-Log "pwsh.exe not found. Install latest PowerShell release and add it to Path"
$psInstallFile = [System.IO.Path]::Combine($PSScriptRoot, "tools", "install-powershell.ps1")
& $psInstallFile -AddToPath
}
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.Management.Infrastructure.CimCmdlets project</Description>
<Description>PowerShell's Microsoft.Management.Infrastructure.CimCmdlets project</Description>
<NoWarn>$(NoWarn);CS1570;CS1572;CS1573;CS1574;CS1584;CS1587;CS1591</NoWarn>
<AssemblyName>Microsoft.Management.Infrastructure.CimCmdlets</AssemblyName>
</PropertyGroup>
@@ -162,7 +162,7 @@ namespace Microsoft.PowerShell.Commands
throw new PlatformNotSupportedException();
}
// PowerShell Core requires at least Windows 7,
// PowerShell 7 requires at least Windows 7,
// so no version test is needed
_pdhHelper = new PdhHelper(false);
#else
@@ -218,7 +218,7 @@ namespace Microsoft.PowerShell.Commands
throw new PlatformNotSupportedException();
}
// PowerShell Core requires at least Windows 7,
// PowerShell 7 requires at least Windows 7,
// so no version test is needed
_pdhHelper = new PdhHelper(false);
#else
@@ -201,7 +201,7 @@ namespace Microsoft.PowerShell.Commands
throw new PlatformNotSupportedException();
}
// PowerShell Core requires at least Windows 7,
// PowerShell 7 requires at least Windows 7,
// so no version test is needed
_pdhHelper = new PdhHelper(false);
#else
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.PowerShell.Commands.Diagnostics project</Description>
<Description>PowerShell's Microsoft.PowerShell.Commands.Diagnostics project</Description>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AssemblyName>Microsoft.PowerShell.Commands.Diagnostics</AssemblyName>
</PropertyGroup>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.PowerShell.Commands.Management project</Description>
<Description>PowerShell's Microsoft.PowerShell.Commands.Management project</Description>
<NoWarn>$(NoWarn);CS1570</NoWarn>
<AssemblyName>Microsoft.PowerShell.Commands.Management</AssemblyName>
</PropertyGroup>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.PowerShell.Commands.Utility project</Description>
<Description>PowerShell's Microsoft.PowerShell.Commands.Utility project</Description>
<NoWarn>$(NoWarn);CS1570</NoWarn>
<AssemblyName>Microsoft.PowerShell.Commands.Utility</AssemblyName>
</PropertyGroup>
@@ -605,7 +605,7 @@ namespace Microsoft.PowerShell.Commands
#region LoadAssembly
// We now ship .Net Core's reference assemblies with PowerShell Core, so that Add-Type can work
// We now ship .Net Core's reference assemblies with PowerShell, so that Add-Type can work
// in a predictable way and won't be broken when we move to newer version of .NET Core.
// The reference assemblies are located at '$PSHOME\ref'.
private static readonly string s_netcoreAppRefFolder = PathType.Combine(PathType.GetDirectoryName(typeof(PSObject).Assembly.Location), "ref");
@@ -756,7 +756,7 @@ namespace Microsoft.PowerShell.Commands
// We look up in reference/framework only when it's for resolving reference assemblies.
// In case of 'Add-Type -AssemblyName' scenario, we don't attempt to resolve against framework assemblies because
// 1. Explicitly loading a framework assembly usually is not necessary in PowerShell Core.
// 1. Explicitly loading a framework assembly usually is not necessary in PowerShell 6+.
// 2. A user should use assembly name instead of path if they want to explicitly load a framework assembly.
if (isForReferenceAssembly)
{
@@ -145,6 +145,6 @@
<value>Cannot create type. Only core types are supported in this language mode.</value>
</data>
<data name="ApartmentNotSupported" xml:space="preserve">
<value>{0} Please note that Single-Threaded Apartment is not supported in PowerShell Core.</value>
<value>{0} Please note that Single-Threaded Apartment is not supported in PowerShell.</value>
</data>
</root>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.PowerShell.CoreCLR.Eventing project</Description>
<Description>PowerShell's Microsoft.PowerShell.CoreCLR.Eventing project</Description>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AssemblyName>Microsoft.PowerShell.CoreCLR.Eventing</AssemblyName>
</PropertyGroup>
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
namespace Microsoft.PowerShell.GlobalTool.Shim
{
/// <summary>
/// Shim layer to chose the appropriate runtime for PowerShell Core DotNet Global tool.
/// Shim layer to chose the appropriate runtime for PowerShell DotNet Global tool.
/// </summary>
public class EntryPoint
{
@@ -3,7 +3,7 @@
<Import Project="..\..\PowerShell.Common.props"/>
<PropertyGroup>
<Description>PowerShell Core's Microsoft.PowerShell.LocalAccounts project</Description>
<Description>PowerShell's Microsoft.PowerShell.LocalAccounts project</Description>
<AssemblyName>Microsoft.PowerShell.LocalAccounts</AssemblyName>
</PropertyGroup>
@@ -2,7 +2,7 @@
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Markdown Rendering project</Description>
<Description>PowerShell's Markdown Rendering project</Description>
<AssemblyName>Microsoft.PowerShell.MarkdownRender</AssemblyName>
</PropertyGroup>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.PowerShell.Security project</Description>
<Description>PowerShell's Microsoft.PowerShell.Security project</Description>
<NoWarn>$(NoWarn);CS1570</NoWarn>
<AssemblyName>Microsoft.PowerShell.Security</AssemblyName>
</PropertyGroup>
@@ -16,5 +16,5 @@
<EmbeddedResource Remove="resources\SecurityMshSnapinResources.resx" />
</ItemGroup>
</Project>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.WSMan.Management project</Description>
<Description>PowerShell's Microsoft.WSMan.Management project</Description>
<AssemblyName>Microsoft.WSMan.Management</AssemblyName>
</PropertyGroup>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's Microsoft.WSMan.Runtime project</Description>
<Description>PowerShell's Microsoft.WSMan.Runtime project</Description>
<AssemblyName>Microsoft.WSMan.Runtime</AssemblyName>
</PropertyGroup>
@@ -25,7 +25,7 @@
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<events xmlns="http://schemas.microsoft.com/win/2004/08/events">
<!--Defines an event provider for PowerShell Core
<!--Defines an event provider for PowerShell
The Guid for this provider should not be changed. If it's
changed for any reason, then the old manifest needs to be
first uninstalled and then the changed manifest installed
@@ -150,7 +150,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Get the namespace-qualified type names of all available .NET Core types shipped with PowerShell Core.
/// Get the namespace-qualified type names of all available .NET Core types shipped with PowerShell.
/// This is used for type name auto-completion in PS engine.
/// </summary>
internal IEnumerable<string> AvailableDotNetTypeNames
@@ -159,7 +159,7 @@ namespace System.Management.Automation
}
/// <summary>
/// Get the assembly names of all available .NET Core assemblies shipped with PowerShell Core.
/// Get the assembly names of all available .NET Core assemblies shipped with PowerShell.
/// This is used for type name auto-completion in PS engine.
/// </summary>
internal HashSet<string> AvailableDotNetAssemblyNames
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core's System.Management.Automation project</Description>
<Description>PowerShell's System.Management.Automation project</Description>
<NoWarn>$(NoWarn);CS1570;CS1734</NoWarn>
<AssemblyName>System.Management.Automation</AssemblyName>
</PropertyGroup>
@@ -4610,7 +4610,7 @@ namespace Microsoft.PowerShell.Commands
// - moduleBase = 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.WSMan.Management'
// - name = '..\..\WSMan.format.ps1xml'
// Check for combinedPath in this case will get us the normalized rooted path 'C:\Windows\System32\WindowsPowerShell\v1.0\WSMan.format.ps1xml'.
// The 'Microsoft.WSMan.Management' module in PowerShell Core was updated to not use the relative path for 'FormatsToProcess' entry,
// The 'Microsoft.WSMan.Management' module in PowerShell was updated to not use the relative path for 'FormatsToProcess' entry,
// but it's safer to keep the original behavior to avoid unexpected breaking changes.
string combinedPath = Path.Combine(moduleBase, name);
string resolvedPath = IsRooted(name)
@@ -1234,7 +1234,7 @@ namespace System.Management.Automation
string psDepsPath = Path.Combine(parentDir, powershellDepsName);
if ((File.Exists(psExePath) && File.Exists(psDepsPath)))
{
// Path is a PSHome module path from a different powershell core instance. Ignore it.
// Path is a PSHome module path from a different PowerShell instance. Ignore it.
continue;
}
}
@@ -890,7 +890,7 @@ namespace System.Management.Automation
/// Describes whether the module was considered compatible at load time.
/// Any module not on the System32 module path should have this as true.
/// Modules loaded from the System32 module path will have this as true if they
/// have declared edition compatibility with PowerShell Core. Currently, this field
/// have declared edition compatibility with PowerShell 6+. Currently, this field
/// is true for all non-psd1 module files, when it should not be. Being able to
/// load psm1/dll modules from the System32 module path without needing to skip
/// the edition check is considered a bug and should be fixed.
@@ -168,7 +168,7 @@ namespace System.Management.Automation.Internal
/// <summary>
/// The declaration of parameters for the Transactions mechanisms. -UseTransaction, and -BypassTransaction.
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes", Justification = "These are only exposed by way of the PowerShell core cmdlets that surface them.")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes", Justification = "These are only exposed by way of the PowerShell cmdlets that surface them.")]
public sealed class TransactionParameters
{
#region ctor
@@ -193,7 +193,7 @@ namespace System.Management.Automation.Runspaces.Internal
return;
}
// powershell CoreStop would have handled cases
// PowerShell CoreStop would have handled cases
// for NotStarted, Stopping and already Stopped
// so at this point, there is no need to make any
// check. The message simply needs to be sent
@@ -1026,7 +1026,7 @@ else
// Copy File.
string destConfigFileDirectory = System.IO.Path.GetDirectoryName(destConfigFilePath);
// The directory is not auto-created for PowerShell Core.
// The directory is not auto-created for PowerShell.
// The call will create it or return its path if it already exists
System.IO.Directory.CreateDirectory(destConfigFileDirectory);
@@ -1527,7 +1527,7 @@ else
/// <returns></returns>
internal static string GetWinrmPluginShellName()
{
// PowerShell Core uses a versioned directory to hold the plugin
// PowerShell uses a versioned directory to hold the plugin
return string.Concat("PowerShell.", PSVersionInfo.GitCommitId);
}
@@ -1537,7 +1537,7 @@ else
/// <returns></returns>
internal static string GetWinrmPluginDllPath()
{
// PowerShell Core uses its versioned directory instead of system32
// PowerShell 6+ uses its versioned directory instead of system32
string pluginDllDirectory = System.IO.Path.Combine("%windir%\\system32\\PowerShell", PSVersionInfo.GitCommitId);
return System.IO.Path.Combine(pluginDllDirectory, RemotingConstants.PSPluginDLLName);
}
@@ -2539,7 +2539,7 @@ function Unregister-PSSessionConfiguration
if (($pluginFileName.Value -match 'system32\\{0}') -OR
($pluginFileName.Value -match 'syswow64\\{0}'))
{{
# Filter out WindowsPowerShell endpoints when running as PowerShell Core
# Filter out WindowsPowerShell endpoints when running as PowerShell 6+
return
}}
}}
@@ -2773,7 +2773,7 @@ function ExtractPluginProperties([string]$pluginDir, $objectToWriteTo)
Get-Details $pluginDir $h
# Workflow is not supported in PowerShell Core. Attempting to load the
# Workflow is not supported in PowerShell 6+. Attempting to load the
# assembly results in a FileNotFoundException.
if (![System.Management.Automation.Platform]::IsCoreCLR -AND
$h[""AssemblyName""] -eq ""Microsoft.PowerShell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"") {{
@@ -2852,11 +2852,11 @@ $args[0] | ForEach-Object {{
{{
# Filter the endpoints based on the typeof PowerShell that is
# executing the cmdlet. {1} in another location indicates that it
# is a PowerShell Core endpoint
# is a PowerShell 6+ endpoint
if (!($customPluginObject.FileName -match 'system32\\{1}') -AND # WindowsPowerShell
!($customPluginObject.FileName -match 'syswow64\\{1}')) # WOW64 WindowsPowerShell
{{
# Add the PowerShell Core endpoint when running as PowerShell Core
# Add the PowerShell 6+ endpoint when running PowerShell 6+
$shellsFound++
$customPluginObject
}}
@@ -3117,7 +3117,7 @@ function Set-PSSessionConfiguration([PSObject]$customShellObject,
}}
else
{{
# Filter out WindowsPowerShell endpoints when running as PowerShell Core
# Filter out WindowsPowerShell endpoints when running as PowerShell 6+
if (($pluginFileName.Value -match 'system32\\{0}') -OR
($pluginFileName.Value -match 'syswow64\\{0}'))
{{
@@ -4905,7 +4905,7 @@ param(
# Microsoft.PowerShell
# Microsoft.PowerShell32 (wow64)
#
# PowerShell Core:
# PowerShell:
# PowerShell.<version ID>
#
$errorCount = $error.Count
@@ -4972,7 +4972,7 @@ param(
Register-EndpointIfNotPresent -Name (""PowerShell."" + $powershellVersionMajor) $Force $queryForRegisterDefault $captionForRegisterDefault
# PowerShell Workflow and WOW are not supported for PowerShell Core
# PowerShell Workflow and WOW are not supported for PowerShell 6+
if (![System.Management.Automation.Platform]::IsCoreCLR)
{{
# Check Microsoft.PowerShell.Workflow endpoint
@@ -3326,7 +3326,7 @@ namespace System.Management.Automation.Runspaces
// Hyper-V container (i.e., RuntimeId is not empty) uses Hyper-V socket transport.
// Windows Server container (i.e., RuntimeId is empty) uses named pipe transport for now.
// This code executes `pwsh.exe` as it exists in the container which currently is
// expected to be PowerShell Core as it's inbox in the container.
// expected to be PowerShell 6+ as it's inbox in the container.
// If `pwsh.exe` does not exist, fall back to `powershell.exe` which is Windows PowerShell.
//
foreach (string executableToTry in Executables)
@@ -598,7 +598,7 @@
<value>The specified module '{0}' was not found. Update the Name parameter to point to a valid path, and then try again. </value>
</data>
<data name="WorkflowModuleNotSupported" xml:space="preserve">
<value>Cannot load the workflow module '{0}'. Workflow is not supported in PowerShell Core.</value>
<value>Cannot load the workflow module '{0}'. Workflow is not supported in PowerShell 6+.</value>
</data>
<data name="PopulatingRepositorySourceLocation" xml:space="preserve">
<value>Populating RepositorySourceLocation property for module {0}.</value>
@@ -1203,7 +1203,7 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent
<value>Exception occurred when post-parsing dynamic keyword '{0}' with details '{1}'.</value>
</data>
<data name="WorkflowNotSupportedInPowerShellCore" xml:space="preserve">
<value>Workflow is not supported in PowerShell Core.</value>
<value>Workflow is not supported in PowerShell 6+.</value>
</data>
<data name="MetaConfigurationUsedInRegularConfig" xml:space="preserve">
<value>Meta Configuration resource {0} is not allowed in the regular configuration. Use meta configuration resources in a configuration with [DscLocalConfigurationManager()] attribute.</value>
@@ -1272,7 +1272,7 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent
<value>Variant.GetAccessor cannot handle {0}.</value>
</data>
<data name="ConfigurationNotSupportedInPowerShellCore" xml:space="preserve">
<value>Configuration keyword is not supported in PowerShell Core.</value>
<value>Configuration keyword is not supported in PowerShell 6+.</value>
</data>
<data name="MethodHasCodePathNotReturn" xml:space="preserve">
<value>Not all code path returns value within method.</value>
@@ -1369,7 +1369,7 @@ ModuleVersion : Version of module to import. If used, ModuleName must represent
'{1}'.</value>
</data>
<data name="CantActivateDocumentInPowerShellCore" xml:space="preserve">
<value>Cannot run a document in PowerShell Core: {0}.</value>
<value>Cannot run a document in PowerShell: {0}.</value>
</data>
<data name="MultipleTypeConstraintsOnMethodParam" xml:space="preserve">
<value>Multiple type constraints are not allowed on a method parameter.</value>
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
@@ -657,7 +657,7 @@
<value>Session configuration "{0}" is not a PowerShell-based shell.</value>
</data>
<data name="CSCmdsPowerShellCoreShellNotModifiable" xml:space="preserve">
<value>Session configuration "{0}" is a PowerShell Core-based shell. Please use PowerShell Core to modify it.</value>
<value>Session configuration "{0}" is a PowerShell-based shell. Please use PowerShell 6+ to modify it.</value>
</data>
<data name="CSCmdsWindowsPowerShellCoreNotModifiable" xml:space="preserve">
<value>Session configuration "{0}" is a Windows PowerShell-based shell. Please use Windows PowerShell to modify it.</value>
@@ -1659,7 +1659,7 @@ All WinRM sessions connected to PowerShell session configurations, such as Micro
<value>The SSH transport process has abruptly terminated causing this remote session to break.</value>
</data>
<data name="InvalidProcessorArchitecture" xml:space="preserve">
<value>PowerShell Core does not support WOW64. The binary must match the architecture of the processor.</value>
<value>PowerShell 6+ does not support WOW64. The binary must match the architecture of the processor.</value>
</data>
<data name="UnableToInstallPlugin" xml:space="preserve">
<value>Unable to install plugin {0} to directory {1}.</value>
@@ -1687,10 +1687,10 @@ All WinRM sessions connected to PowerShell session configurations, such as Micro
<value>HTTPS on Unix does not currently support CA or CN checks. Use the PSSessionOption -SkipCACheck and -SkipCNCheck if you are certain you trust the server you are connecting to and the network in between.</value>
</data>
<data name="PSCoreRemotingDisableWarning" xml:space="preserve">
<value>PowerShell remoting has been disabled only for PowerShell Core configurations and does not affect Windows PowerShell remoting configurations. Run this cmdlet in Windows PowerShell to affect all PowerShell remoting configurations.
<value>PowerShell remoting has been disabled only for PowerShell 6+ configurations and does not affect Windows PowerShell remoting configurations. Run this cmdlet in Windows PowerShell to affect all PowerShell remoting configurations.
</value>
</data>
<data name="PSCoreRemotingEnableWarning" xml:space="preserve">
<value>PowerShell remoting has been enabled only for PowerShell Core configurations and does not affect Windows PowerShell remoting configurations. Run this cmdlet in Windows PowerShell to affect all PowerShell remoting configurations.</value>
<value>PowerShell remoting has been enabled only for PowerShell 6+ configurations and does not affect Windows PowerShell remoting configurations. Run this cmdlet in Windows PowerShell to affect all PowerShell remoting configurations.</value>
</data>
</root>
@@ -64,13 +64,13 @@ namespace System.Management.Automation
}
/// <summary>
/// Get the namespace-qualified type names of all available .NET Core types shipped with PowerShell Core.
/// Get the namespace-qualified type names of all available .NET Core types shipped with PowerShell.
/// This is used for type name auto-completion in PS engine.
/// </summary>
internal static IEnumerable<string> AvailableDotNetTypeNames => PSAssemblyLoadContext.AvailableDotNetTypeNames;
/// <summary>
/// Get the assembly names of all available .NET Core assemblies shipped with PowerShell Core.
/// Get the assembly names of all available .NET Core assemblies shipped with PowerShell.
/// This is used for type name auto-completion in PS engine.
/// </summary>
internal static HashSet<string> AvailableDotNetAssemblyNames => PSAssemblyLoadContext.AvailableDotNetAssemblyNames;
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<PropertyGroup>
<Description>PowerShell Core on Windows top-level project</Description>
<Description>PowerShell on Windows top-level project</Description>
<AssemblyName>pwsh</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
+2 -2
View File
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Product>PowerShell Core Test</Product>
<Product>PowerShell Test</Product>
<Company>Microsoft Corporation</Company>
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
@@ -12,7 +12,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsWindows Condition="'$(OS)' == 'Windows_NT'">true</IsWindows>
</PropertyGroup>
<PropertyGroup Condition=" '$(IsWindows)' != 'true' ">
<DefineConstants>$(DefineConstants);UNIX</DefineConstants>
</PropertyGroup>
@@ -21,12 +21,12 @@ Describe "Basic remoting test with docker" -tags @("Scenario","Slow"){
$client = docker run -d $imageName powershell -c Start-Sleep -Seconds $timeout
# get fullpath to installed core powershell
Write-Verbose -verbose "Getting path to PowerShell core"
Write-Verbose -verbose "Getting path to PowerShell"
$powershellcorepath = docker exec $server powershell -c "(get-childitem 'c:\program files\powershell\*\pwsh.exe').fullname"
if ( ! $powershellcorepath )
{
$pending = $true
write-warning "Cannot find powershell core executable, not running tests"
write-warning "Cannot find powershell executable, not running tests"
return
}
$powershellcoreversion = ($powershellcorepath -split "[\\/]")[-2]
@@ -49,12 +49,12 @@ Describe "Basic remoting test with docker" -tags @("Scenario","Slow"){
return
}
write-verbose -verbose "getting powershell core version"
write-verbose -verbose "getting powershell version"
$coreVersion = docker exec $client "$powershellcorepath" -c "`$psversiontable.psversion.tostring()"
if ( ! $coreVersion )
{
$pending = $true
write-warning "Cannot determine PowerShell core version, not running tests"
write-warning "Cannot determine PowerShell version, not running tests"
return
}
}
@@ -67,7 +67,7 @@ Describe "Basic remoting test with docker" -tags @("Scenario","Slow"){
}
}
It "Full powershell can get correct remote powershell core version" -pending:$pending {
It "Full powershell can get correct remote powershell version" -pending:$pending {
$result = docker exec $client powershell -c "`$ss = [security.securestring]::new(); '11aa!!AA'.ToCharArray() | ForEach-Object { `$ss.appendchar(`$_)}; `$c = [pscredential]::new('testuser',`$ss); `$ses=new-pssession $serverhostname -configurationname $powershellcoreConfiguration -auth basic -credential `$c; invoke-command -session `$ses { `$psversiontable.psversion.tostring() }"
$result | should be $coreVersion
}
@@ -77,7 +77,7 @@ Describe "Basic remoting test with docker" -tags @("Scenario","Slow"){
$result | should be $fullVersion
}
It "Core powershell can get correct remote powershell core version" -pending:$pending {
It "Core powershell can get correct remote powershell version" -pending:$pending {
$result = docker exec $client "$powershellcorepath" -c "`$ss = [security.securestring]::new(); '11aa!!AA'.ToCharArray() | ForEach-Object { `$ss.appendchar(`$_)}; `$c = [pscredential]::new('testuser',`$ss); `$ses=new-pssession $serverhostname -configurationname $powershellcoreConfiguration -auth basic -credential `$c; invoke-command -session `$ses { `$psversiontable.psversion.tostring() }"
$result | should be $coreVersion
}
+2 -2
View File
@@ -54,7 +54,7 @@ Describe -Name "Windows MSI" -Fixture {
BeforeAll {
$msiX64Path = $env:PsMsiX64Path
# Get any existing powershell core in the path
# Get any existing powershell in the path
$beforePath = @(([System.Environment]::GetEnvironmentVariable('PATH', 'MACHINE')) -split ';' |
Where-Object {$_ -like '*files\powershell*'})
@@ -76,7 +76,7 @@ Describe -Name "Windows MSI" -Fixture {
if ($Error.Count -ne 0 -and !$uploadedLog) {
Copy-Item -Path $msiLog -Destination $env:temp -Force
Write-Verbose "MSI log is at $env:temp\msilog.txt" -Verbose
$uploadedLog = $true
$uploadedLog = $true
}
}
+1 -1
View File
@@ -826,7 +826,7 @@ Describe "Pwsh exe resources tests" -Tag CI {
$pwsh = Get-Item -Path "$PSHOME\pwsh.exe"
$pwsh.VersionInfo.FileVersion | Should -BeExactly $PSVersionTable.PSVersion.ToString().Split("-")[0]
$pwsh.VersionInfo.ProductVersion.Replace("-dirty","") | Should -BeExactly $PSVersionTable.GitCommitId
$pwsh.VersionInfo.ProductName | Should -BeExactly "PowerShell Core 6"
$pwsh.VersionInfo.ProductName | Should -BeExactly "PowerShell 7"
}
It "Manifest contains compatibility section" -Skip:(!$IsWindows) {
@@ -348,7 +348,7 @@ Describe "PSModulePath changes interacting with other PowerShell processes" -Tag
$errors | Should -Be $null
}
It "Allows PowerShell Core 6 subprocesses to call core modules" {
It "Allows PowerShell subprocesses to call core modules" {
$errors = pwsh.exe -Command "Get-ChildItem" 2>&1 | Where-Object { $_ -is [System.Management.Automation.ErrorRecord] }
$errors | Should -Be $null
}
@@ -90,12 +90,12 @@ Describe "Start-Process" -Tag "Feature","RequireAdminOnWindows" {
$dirEntry.Length | Should -BeGreaterThan 0
}
## -Verb is supported in PowerShell core on Windows full desktop.
## -Verb is supported in PowerShell on Windows full desktop.
It "Should give an error when -Verb parameter is used" -Skip:$isFullWin {
{ Start-Process -Verb runas -FilePath $pingCommand } | Should -Throw -ErrorId "NotSupportedException,Microsoft.PowerShell.Commands.StartProcessCommand"
}
## -WindowStyle is supported in PowerShell core on Windows full desktop.
## -WindowStyle is supported in PowerShell on Windows full desktop.
It "Should give an error when -WindowStyle parameter is used" -Skip:$isFullWin {
{ Start-Process -FilePath $pingCommand -WindowStyle Normal } | Should -Throw -ErrorId "NotSupportedException,Microsoft.PowerShell.Commands.StartProcessCommand"
}
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# This is a Pester test suite to validate the New-FileCatalog & Test-FileCatalog cmdlets on PowerShell Core.
# This is a Pester test suite to validate the New-FileCatalog & Test-FileCatalog cmdlets on PowerShell.
try {
#skip all tests on non-windows platform
@@ -143,7 +143,7 @@ function Install-TestCertificates
if ($IsCoreCLR -and $IsWindows)
{
# PKI module is not available for PowerShell Core, so we need to use Windows PowerShell to import the cert
# PKI module is not available for PowerShell, so we need to use Windows PowerShell to import the cert
$fullPowerShell = Join-Path "$env:SystemRoot" "System32\WindowsPowerShell\v1.0\powershell.exe"
try {
@@ -1464,7 +1464,7 @@ try
Get-PSSessionConfiguration ImplicitRemotingRestrictedConfiguration* | Unregister-PSSessionConfiguration -Force
## The 'Register-PSSessionConfiguration' call below raises an AssemblyLoadException in powershell core:
## The 'Register-PSSessionConfiguration' call below raises an AssemblyLoadException in powershell:
## "Could not load file or assembly 'Microsoft.Powershell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified."
## Issue #2555 is created to track this issue and all tests here are skipped for CoreCLR for now.
@@ -13,7 +13,7 @@ try {
#skip all tests on non-windows platform
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone()
$IsNotSkipped = ($IsWindows -and !$IsInbox) # Only execute for PowerShell Core on Windows
$IsNotSkipped = ($IsWindows -and !$IsInbox) # Only execute for PowerShell on Windows
$PSDefaultParameterValues["it:skip"] = !$IsNotSkipped
Describe "User-Specific powershell.config.json Modifications" -Tags "CI" {
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
Describe 'Online help tests for PowerShell Core Cmdlets' -Tags "CI" {
Describe 'Online help tests for PowerShell Cmdlets' -Tags "CI" {
# The csv files (V2Cmdlets.csv and V3Cmdlets.csv) contain a list of cmdlets and expected HelpURIs.
# The HelpURI is part of the cmdlet metadata, and when the user runs 'get-help <cmdletName> -online'
@@ -4,7 +4,7 @@
Import-Module HelpersCommon
# Test Settings:
# This is the list of PowerShell Core modules for which we test update-help
# This is the list of PowerShell modules for which we test update-help
$powershellCoreModules = @(
"CimCmdlets"
<#
@@ -43,7 +43,7 @@ else
$userHelpRoot = Join-Path $userModulesRoot -ChildPath ".." -AdditionalChildPath "Help"
}
# This is the list of test cases -- each test case represents a PowerShell Core module.
# This is the list of test cases -- each test case represents a PowerShell module.
$testCases = @{
"CimCmdlets" = @{
@@ -338,7 +338,7 @@ function ValidateSaveHelp
$helpInfoFile | Should -Be $expectedHelpInfoFile -Because "Save-Help for $module should download '$expectedHelpInfoFile'"
}
Describe "Validate Update-Help from the Web for one PowerShell Core module." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help from the Web for one PowerShell module." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -350,7 +350,7 @@ Describe "Validate Update-Help from the Web for one PowerShell Core module." -Ta
RunUpdateHelpTests -tag "CI" -Scope 'AllUsers'
}
Describe "Validate Update-Help from the Web for one PowerShell Core module for user scope." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help from the Web for one PowerShell module for user scope." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -362,7 +362,7 @@ Describe "Validate Update-Help from the Web for one PowerShell Core module for u
RunUpdateHelpTests -tag "CI" -Scope 'CurrentUser'
}
Describe "Validate Update-Help from the Web for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help from the Web for all PowerShell modules." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -374,7 +374,7 @@ Describe "Validate Update-Help from the Web for all PowerShell Core modules." -T
RunUpdateHelpTests -tag "Feature" -Scope 'AllUsers'
}
Describe "Validate Update-Help from the Web for all PowerShell Core modules for user scope." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help from the Web for all PowerShell modules for user scope." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -386,7 +386,7 @@ Describe "Validate Update-Help from the Web for all PowerShell Core modules for
RunUpdateHelpTests -tag "Feature" -Scope 'CurrentUser'
}
Describe "Validate Update-Help -SourcePath for one PowerShell Core module." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help -SourcePath for one PowerShell module." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -398,7 +398,7 @@ Describe "Validate Update-Help -SourcePath for one PowerShell Core module." -Tag
RunUpdateHelpTests -tag "CI" -useSourcePath -Scope 'AllUsers'
}
Describe "Validate Update-Help -SourcePath for one PowerShell Core module for user scope." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help -SourcePath for one PowerShell module for user scope." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -410,7 +410,7 @@ Describe "Validate Update-Help -SourcePath for one PowerShell Core module for us
RunUpdateHelpTests -tag "CI" -useSourcePath -Scope 'CurrentUser'
}
Describe "Validate Update-Help -SourcePath for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help -SourcePath for all PowerShell modules." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -422,7 +422,7 @@ Describe "Validate Update-Help -SourcePath for all PowerShell Core modules." -Ta
RunUpdateHelpTests -tag "Feature" -useSourcePath -Scope 'AllUsers'
}
Describe "Validate Update-Help -SourcePath for all PowerShell Core modules for user scope." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
Describe "Validate Update-Help -SourcePath for all PowerShell modules for user scope." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -434,7 +434,7 @@ Describe "Validate Update-Help -SourcePath for all PowerShell Core modules for u
RunUpdateHelpTests -tag "Feature" -useSourcePath -Scope 'CurrentUser'
}
Describe "Validate 'Save-Help -DestinationPath for one PowerShell Core modules." -Tags @('CI', 'RequireAdminOnWindows') {
Describe "Validate 'Save-Help -DestinationPath for one PowerShell modules." -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -445,7 +445,7 @@ Describe "Validate 'Save-Help -DestinationPath for one PowerShell Core modules."
RunSaveHelpTests -tag "CI"
}
Describe "Validate 'Save-Help -DestinationPath for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows') {
Describe "Validate 'Save-Help -DestinationPath for all PowerShell modules." -Tags @('Feature', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
@@ -74,7 +74,7 @@ Describe "SxS Module Path Basic Tests" -tags "CI" {
}
}
It "ignore pshome module path derived from a different powershell core instance" -Skip:(!$IsCoreCLR -or $skipNoPwsh) {
It "ignore pshome module path derived from a different PowerShell instance" -Skip:(!$IsCoreCLR -or $skipNoPwsh) {
## Create 'powershell' and 'pwsh.deps.json' in the fake PSHome folder,
## so that the module path calculation logic would believe it's real.
@@ -83,7 +83,7 @@ Describe "SxS Module Path Basic Tests" -tags "CI" {
try {
## PSHome module path derived from another powershell core instance should be ignored
## PSHome module path derived from another PowerShell instance should be ignored
$env:PSModulePath = $fakePSHomeModuleDir
$newModulePath = & $powershell -nopro -c '$env:PSModulePath'
$paths = $newModulePath -split [System.IO.Path]::PathSeparator
@@ -113,9 +113,9 @@ Describe "SxS Module Path Basic Tests" -tags "CI" {
}
}
It "keep non-pshome module path derived from powershell core instance parent" -Skip:(!$IsCoreCLR -or $skipNoPwsh) {
It "keep non-pshome module path derived from PowerShell instance parent" -Skip:(!$IsCoreCLR -or $skipNoPwsh) {
## non-pshome module path derived from another powershell core instance should be preserved
## non-pshome module path derived from another PowerShell instance should be preserved
$customeModules = Join-Path -Path $TestDrive -ChildPath 'CustomModules'
$env:PSModulePath = $fakePSHomeModuleDir, $customeModules -join ([System.IO.Path]::PathSeparator)
$newModulePath = & $powershell -nopro -c '$env:PSModulePath'
@@ -82,7 +82,7 @@ Describe "Test-ModuleManifest tests" -tags "CI" {
It "module manifest containing valid processed empty rootmodule file type fails: <rootModuleValue>" -TestCases (
@{rootModuleValue = "foo.cdxml"; error = "System.Xml.XmlException"}, # fails when cmdlet tries to read it as XML
@{rootModuleValue = "foo.xaml"; error = "Modules_WorkflowModuleNotSupported"} # not supported on PowerShell Core
@{rootModuleValue = "foo.xaml"; error = "Modules_WorkflowModuleNotSupported"} # not supported on PowerShell 6+
) {
param($rootModuleValue, $error)
+7 -7
View File
@@ -2,14 +2,14 @@
# Licensed under the MIT License.
<#
.Synopsis
Install PowerShell Core on Windows, Linux or macOS.
Install PowerShell on Windows, Linux or macOS.
.DESCRIPTION
By default, the latest PowerShell Core release package will be installed.
If '-Daily' is specified, then the latest PowerShell Core daily package will be installed.
By default, the latest PowerShell release package will be installed.
If '-Daily' is specified, then the latest PowerShell daily package will be installed.
.Parameter Destination
The destination path to install PowerShell Core to.
The destination path to install PowerShell to.
.Parameter Daily
Install PowerShell Core from the daily build.
Install PowerShell from the daily build.
Note that the 'PackageManagement' module is required to install a daily package.
.Parameter DoNotOverwrite
Do not overwrite the destination folder if it already exists.
@@ -245,7 +245,7 @@ try {
if ($Daily) {
if (-not (Get-Module -Name PackageManagement -ListAvailable)) {
throw "PackageManagement module is required to install daily PowerShell Core."
throw "PackageManagement module is required to install daily PowerShell."
}
if ($architecture -ne "x64") {
@@ -423,7 +423,7 @@ try {
}
if (-not $UseMSI) {
Write-Host "PowerShell Core has been installed at $Destination" -ForegroundColor Green
Write-Host "PowerShell has been installed at $Destination" -ForegroundColor Green
if ($Destination -eq $PSHome) {
Write-Host "Please restart pwsh" -ForegroundColor Magenta
}
+5 -5
View File
@@ -21,7 +21,7 @@ install(){
# -includeide - installs VSCode and VSCode PowerShell extension (only relevant to machines with desktop environment)
# -interactivetesting - do a quick launch test of VSCode (only relevant when used with -includeide)
# -skip-sudo-check - use sudo without verifying its availability (hard to accurately do on some distros)
# -preview - installs the latest preview release of PowerShell core side-by-side with any existing production releases
# -preview - installs the latest preview release of PowerShell side-by-side with any existing production releases
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
@@ -30,8 +30,8 @@ install(){
local gitreposcriptroot="https://raw.githubusercontent.com/$gitreposubpath/tools"
local gitscriptname="install-powershell.psh"
echo "Get-PowerShell Core MASTER Installer Version $VERSION"
echo "Installs PowerShell Core and Optional The Development Environment"
echo "Get-PowerShell MASTER Installer Version $VERSION"
echo "Installs PowerShell and Optional The Development Environment"
echo " Original script is at: $gitreposcriptroot\\$gitscriptname"
echo "Arguments used: $*"
@@ -128,7 +128,7 @@ install(){
if [ "$DistroBasedOn" == "redhat" ] || [ "$DistroBasedOn" == "debian" ] || [ "$DistroBasedOn" == "osx" ] || [ "$DistroBasedOn" == "suse" ] || [ "$DistroBasedOn" == "amazonlinux" ]; then
echo "Configuring PowerShell Core Environment for: $DistroBasedOn $DIST $REV"
echo "Configuring PowerShell Environment for: $DistroBasedOn $DIST $REV"
if [ -f "$SCRIPTFOLDER/installpsh-$DistroBasedOn.sh" ]; then
#Script files were copied local - use them
# shellcheck source=/dev/null
@@ -148,7 +148,7 @@ install(){
fi
fi
else
echo "Sorry, your operating system is based on $DistroBasedOn and is not supported by PowerShell Core or this installer at this time."
echo "Sorry, your operating system is based on $DistroBasedOn and is not supported by PowerShell or this installer at this time."
fi
}
+7 -7
View File
@@ -7,7 +7,7 @@
#bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-amazonlinux.sh) ARGUMENTS
#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-amazonlinux.sh) <ARGUMENTS>
#Usage - if you do not have the ability to run scripts directly from the web,
#Usage - if you do not have the ability to run scripts directly from the web,
# pull all files in this repo folder and execute, this script
# automatically prefers local copies of sub-scripts
@@ -17,7 +17,7 @@
# -includeide - ignored, as Amazon Linux does not have a desktop environment
# -interactivetesting - ignored, as Amazon Linux does not have a desktop environment
# -skip-sudo-check - use sudo without verifying its availability (hard to accurately do on some distros)
# -preview - installs the latest preview release of PowerShell core side-by-side with any existing production releases
# -preview - installs the latest preview release of PowerShell side-by-side with any existing production releases
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
@@ -31,7 +31,7 @@ gitscriptname="installpsh-amazonlinux.psh"
pwshlink=/usr/bin/pwsh
echo
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** PowerShell Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
echo
echo "*** Arguments used: $*"
@@ -111,7 +111,7 @@ fi
#END Verify The Installer Choice
echo
echo "*** Installing prerequisites for PowerShell Core..."
echo "*** Installing prerequisites for PowerShell..."
$SUDO yum install -y \
curl \
libunwind \
@@ -126,7 +126,7 @@ $SUDO yum install -y \
##END Check requirements and prerequisites
echo
echo "*** Installing PowerShell Core for $DistroBasedOn..."
echo "*** Installing PowerShell for $DistroBasedOn..."
echo "ATTENTION: As of version 1.2.0 this script no longer uses pre-releases unless the '-preview' switch is used"
@@ -197,8 +197,8 @@ if [[ "'$*'" =~ -interactivetesting ]] ; then
fi
if [[ "$repobased" == true ]] ; then
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core"
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell"
else
echo "*** NOTE: Re-run this script to update PowerShell Core"
echo "*** NOTE: Re-run this script to update PowerShell"
fi
echo "*** Install Complete"
+6 -6
View File
@@ -15,7 +15,7 @@
# -includeide - installs VSCode and VSCode PowerShell extension (only relevant to machines with desktop environment)
# -interactivetesting - do a quick launch test of VSCode (only relevant when used with -includeide)
# -skip-sudo-check - use sudo without verifying its availability (hard to accurately do on some distros)
# -preview - installs the latest preview release of PowerShell core side-by-side with any existing production releases
# -preview - installs the latest preview release of PowerShell side-by-side with any existing production releases
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
@@ -28,7 +28,7 @@ gitscriptname="installpsh-debian.psh"
powershellpackageid=powershell
echo ;
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** PowerShell Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
echo
echo "*** Arguments used: $*"
@@ -115,7 +115,7 @@ DISTRIB_ID=$(lowercase "$DISTRIB_ID")
##END Check requirements and prerequisites
echo
echo "*** Installing PowerShell Core for $DistroBasedOn..."
echo "*** Installing PowerShell for $DistroBasedOn..."
if ! hash curl 2>/dev/null; then
echo "curl not found, installing..."
$SUDO apt-get install -y curl
@@ -130,7 +130,7 @@ fi
currentversion=$(curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v// | sed s/,//g | sed s/\ //g)
echo "*** Current version on git is: $currentversion, repo version may differ slightly..."
echo "*** Setting up PowerShell Core repo..."
echo "*** Setting up PowerShell repo..."
# Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | $SUDO apt-key add -
#Add the Repo
@@ -153,7 +153,7 @@ if [[ "${DISTRIB_ID}" = "linuxmint" ]]; then
echo "Supported versions: 19" >&2
echo "For additional versions open an issue or pull request at: https://github.com/powershell/powershell" >&2
exit 1
;;
;;
esac
echo "Remapping linuxmint version ${LINUXMINT_VERSION} to ubuntu version ${DISTRIB_RELEASE}" >&2
fi
@@ -230,6 +230,6 @@ fi
if [[ "$repobased" == true ]] ; then
echo
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core"
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell"
fi
echo "*** Install Complete"
+5 -5
View File
@@ -5,7 +5,7 @@
#bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-osx.sh) ARGUMENTS
#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-osx.sh) <ARGUMENTS>
#Usage - if you do not have the ability to run scripts directly from the web,
#Usage - if you do not have the ability to run scripts directly from the web,
# pull all files in this repo folder and execute, this script
# automatically prefers local copies of sub-scripts
@@ -14,7 +14,7 @@
#Switches
# -includeide - installs vscode and vscode PowerShell extension (only relevant to machines with desktop environment)
# -interactivetesting - do a quick launch test of vscode (only relevant when used with -includeide)
# -preview - installs the latest preview release of PowerShell core side-by-side with any existing production releases
# -preview - installs the latest preview release of PowerShell side-by-side with any existing production releases
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
@@ -27,7 +27,7 @@ repobased=true
gitscriptname="installpsh-osx.sh"
powershellpackageid=powershell
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** PowerShell Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
echo "*** Arguments used: $*"
@@ -83,7 +83,7 @@ fi
## Check requirements and prerequisites
echo "*** Installing PowerShell Core for $DistroBasedOn..."
echo "*** Installing PowerShell for $DistroBasedOn..."
if [[ "'$*'" =~ preview ]] ; then
echo
@@ -173,6 +173,6 @@ if [[ "$success" != 0 ]]; then
fi
if [[ "$repobased" == true ]] ; then
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core"
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell"
fi
echo "*** Install Complete"
+6 -6
View File
@@ -5,7 +5,7 @@
#bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-redhat.sh) ARGUMENTS
#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-redhat.sh) <ARGUMENTS>
#Usage - if you do not have the ability to run scripts directly from the web,
#Usage - if you do not have the ability to run scripts directly from the web,
# pull all files in this repo folder and execute, this script
# automatically prefers local copies of sub-scripts
@@ -15,7 +15,7 @@
# -includeide - installs VSCode and VSCode PowerShell extension (only relevant to machines with desktop environment)
# -interactivetesting - do a quick launch test of VSCode (only relevant when used with -includeide)
# -skip-sudo-check - use sudo without verifying its availability (this is required to run in the VSTS Hosted Linux Preview)
# -preview - installs the latest preview release of PowerShell core side-by-side with any existing production releases
# -preview - installs the latest preview release of PowerShell side-by-side with any existing production releases
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
@@ -29,7 +29,7 @@ gitscriptname="installpsh-redhat.psh"
powershellpackageid=powershell
echo
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** PowerShell Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
echo
echo "*** Arguments used: $* "
@@ -111,7 +111,7 @@ if [[ "'$*'" =~ preview ]] ; then
fi
release=$(curl https://api.github.com/repos/powershell/powershell/releases/latest | sed '/tag_name/!d' | sed s/\"tag_name\"://g | sed s/\"//g | sed s/v// | sed s/,//g | sed s/\ //g)
echo "*** Installing PowerShell Core for $DistroBasedOn..."
echo "*** Installing PowerShell for $DistroBasedOn..."
if ! hash curl 2>/dev/null; then
echo "curl not found, installing..."
$SUDO yum install -y curl
@@ -120,7 +120,7 @@ release=$(curl https://api.github.com/repos/powershell/powershell/releases/lates
echo "*** Current version on git is: $release, repo version may differ slightly..."
echo "*** Setting up PowerShell Core repo..."
echo "*** Setting up PowerShell repo..."
$SUDO curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo
$SUDO yum install -y ${powershellpackageid}
@@ -155,6 +155,6 @@ if [[ "'$*'" =~ includeide ]] ; then
fi
if [[ "$repobased" == true ]] ; then
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core"
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell"
fi
echo "*** Install Complete"
+9 -9
View File
@@ -5,7 +5,7 @@
#bash <(wget -O - https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-suse.sh) ARGUMENTS
#bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/installpsh-suse.sh) <ARGUMENTS>
#Usage - if you do not have the ability to run scripts directly from the web,
#Usage - if you do not have the ability to run scripts directly from the web,
# pull all files in this repo folder and execute, this script
# automatically prefers local copies of sub-scripts
@@ -15,7 +15,7 @@
# -includeide - installs VSCode and VSCode PowerShell extension (only relevant to machines with desktop environment)
# -interactivetesting - do a quick launch test of VSCode (only relevant when used with -includeide)
# -skip-sudo-check - use sudo without verifying its availability (this is required to run in the VSTS Hosted Linux Preview)
# -preview - installs the latest preview release of PowerShell core side-by-side with any existing production releasesS
# -preview - installs the latest preview release of PowerShell side-by-side with any existing production releasesS
#gitrepo paths are overrideable to run from your own fork or branch for testing or private distribution
@@ -29,7 +29,7 @@ gitscriptname="installpsh-suse.psh"
pwshlink=/usr/bin/pwsh
echo
echo "*** PowerShell Core Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** PowerShell Development Environment Installer $VERSION for $thisinstallerdistro"
echo "*** Original script is at: $gitreposcriptroot/$gitscriptname"
echo
echo "*** Arguments used: $*"
@@ -123,7 +123,7 @@ fi
#END Verify The Installer Choice
echo
echo "*** Installing prerequisites for PowerShell Core..."
echo "*** Installing prerequisites for PowerShell..."
$SUDO zypper --non-interactive install \
glibc-locale \
glibc-i18ndata \
@@ -137,7 +137,7 @@ $SUDO zypper --non-interactive install \
##END Check requirements and prerequisites
echo
echo "*** Installing PowerShell Core for $DistroBasedOn..."
echo "*** Installing PowerShell for $DistroBasedOn..."
echo "ATTENTION: As of version 1.2.0 this script no longer uses pre-releases unless the '-preview' switch is used"
@@ -156,12 +156,12 @@ downloadurl=https://github.com/PowerShell/PowerShell/releases/download/v$release
#REPO BASED (Not ready yet)
#echo "*** Setting up PowerShell Core repo..."
#echo "*** Setting up PowerShell repo..."
#echo "*** Current version on git is: $release, repo version may differ slightly..."
## Install the Microsoft public key so that zypper trusts the package
#sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
##Add the Repo
#$SUDO sh -c 'echo -e "[code]\nname=PowerShell Core\nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-sles12-prod\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/powershellcore.repo'
#$SUDO sh -c 'echo -e "[code]\nname=PowerShell\nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-sles12-prod\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/zypp/repos.d/powershellcore.repo'
## Update zypper
#$SUDO zypper refresh
## Install PowerShell
@@ -228,8 +228,8 @@ if [[ "'$*'" =~ includeide ]] ; then
fi
if [[ "$repobased" == true ]] ; then
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell Core"
echo "*** NOTE: Run your regular package manager update cycle to update PowerShell"
else
echo "*** NOTE: Re-run this script to update PowerShell Core"
echo "*** NOTE: Re-run this script to update PowerShell"
fi
echo "*** Install Complete"
+2 -2
View File
@@ -121,7 +121,7 @@ open {0}
<authors>Microsoft</authors>
<owners>Microsoft,PowerShell</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>PowerShell runtime for hosting PowerShell Core</description>
<description>Runtime for hosting PowerShell</description>
<projectUrl>https://github.com/PowerShell/PowerShell</projectUrl>
<iconUrl>https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_black_64.png?raw=true</iconUrl>
<licenseUrl>https://github.com/PowerShell/PowerShell/blob/master/LICENSE.txt</licenseUrl>
@@ -159,7 +159,7 @@ open {0}
<projectUrl>https://github.com/PowerShell/PowerShell</projectUrl>
<iconUrl>https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_black_64.png?raw=true</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>PowerShell Core global tool</description>
<description>PowerShell global tool</description>
<license type="expression">MIT</license>
<tags>PowerShell</tags>
<language>en-US</language>
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--
Due to https://github.com/dotnet/sdk/issues/1021
When packaging we must build something.
When packaging we must build something.
So, we are building an empty assembly called NotUsed, and discarding it.
-->
<PropertyGroup>
<AssemblyName>NotUsed</AssemblyName>
<Description>PowerShell Core nuget package with .NET CLI host including everything needed to run it.</Description>
<Description>PowerShell nuget package with .NET CLI host including everything needed to run it.</Description>
<NuspecFile>powershell.nuspec</NuspecFile>
<NuspecProperties>runtime=$(RID);version=$(SemVer);PackageName=$(PackageName)</NuspecProperties>
<NuspecBasePath>$(StagingPath)</NuspecBasePath>
@@ -3,14 +3,14 @@
<metadata>
<id>$PackageName$-$runtime$</id>
<version>$version$</version>
<title>PowerShell Core for $runtime$</title>
<title>PowerShell for $runtime$</title>
<authors>PowerShell</authors>
<owners>PowerShell</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<projectUrl>https://github.com/powershell/powershell</projectUrl>
<iconUrl>https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_64.png</iconUrl>
<description>This package contains the PowerShell Core for $runtime$.</description>
<description>This package contains PowerShell for $runtime$.</description>
<copyright>Copyright (c) Microsoft Corporation. All rights reserved.</copyright>
<tags>PowerShell</tags>
+7 -7
View File
@@ -3,7 +3,7 @@
<#
.SYNOPSIS
Idempotently removes extra PowerShell Core paths from the machine, user and/or process environment scope with no reordering.
Idempotently removes extra PowerShell paths from the machine, user and/or process environment scope with no reordering.
.DESCRIPTION
Defaults to machine scope and leaving the last sorted path alone.
@@ -17,21 +17,21 @@
Default: machine
.PARAMETER RemoveAllOccurences
By default the cleanup leaves the highest sorted PowerShell Core path alone.
By default the cleanup leaves the highest sorted PowerShell path alone.
This switch causes it to be cleaned up as well.
Default: false
.EXAMPLE
.\Reset-PWSHSystemPath.ps1
Removes all PowerShell core paths but the very last one when sorted in ascending order from the Machine level path.
Removes all PowerShell paths but the very last one when sorted in ascending order from the Machine level path.
Good for running on systems that already has at least one valid PowerShell install.
.EXAMPLE
.\Reset-PWSHSystemPath.ps1 -RemoveAllOccurences
Removes ALL PowerShell core paths from the Machine level path.
Good for running right before upgrading PowerShell core.
Removes ALL PowerShell paths from the Machine level path.
Good for running right before upgrading PowerShell.
.EXAMPLE
.\Reset-PWSHSystemPath.ps1 -PathScope Machine, User, Process
@@ -52,11 +52,11 @@ param (
ForEach ($PathScopeItem in $PathScope)
{
$AssembledNewPath = $NewPath = ''
#From the current path scope. retrieve the array of paths that match the pathspec of PowerShell Core (to use as a filter)
#From the current path scope. retrieve the array of paths that match the pathspec of PowerShell (to use as a filter)
$pathstoremove = @([Environment]::GetEnvironmentVariable("PATH","$PathScopeItem").split(';') | Where { $_ -ilike "*\Program Files\Powershell\6*"})
If (!$RemoveAllOccurences)
{
#If we are not removing all occurances of powershell core paths, then remove the highest sorted path from the filter
#If we are not removing all occurances of PowerShell paths, then remove the highest sorted path from the filter
$pathstoremove = @($pathstoremove | sort-object | Select-Object -skiplast 1)
}
Write-Verbose "Reset-PWSHSystemPath: Found $($pathstoremove.count) paths to remove from $PathScopeItem path scope: $($Pathstoremove -join ', ' | out-string)"