Add psremoting enable/disable cmdlet warning messages (#9203)
Adds warning messages to the Enable-PSRemoting and Disable-PSRemoting cmdlets that informs the user that the cmdlets only affect PSCore6 remoting endpoint configurations and not Windows PowerShell configurations. PR Context As documented, Enable-PSRemoting and Disable-PSRemoting affects all PowerShell remoting on a Windows system, and Windows users will likely expect the cmdlets to continue working this way in PSCore6. However, these cmdlets currently affect only PSCore6 remoting endpoints when run in PSCore6 and have no effect on Windows remoting endpoints.
This commit is contained in:
parent
cd7d7797e4
commit
9ea60587fc
|
@ -5223,6 +5223,8 @@ Enable-PSRemoting -force $args[0] -queryForRegisterDefault $args[1] -captionForR
|
|||
/// </summary>
|
||||
protected override void EndProcessing()
|
||||
{
|
||||
WriteWarning(RemotingErrorIdStrings.PSCoreRemotingEnableWarning);
|
||||
|
||||
// gather -WhatIf, -Confirm parameter data and pass it to the script block
|
||||
bool whatIf = false;
|
||||
// confirm is always true to start with
|
||||
|
@ -5426,6 +5428,7 @@ Disable-PSRemoting -force:$args[0] -queryForSet $args[1] -captionForSet $args[2]
|
|||
/// </summary>
|
||||
protected override void EndProcessing()
|
||||
{
|
||||
WriteWarning(RemotingErrorIdStrings.PSCoreRemotingDisableWarning);
|
||||
WriteWarning(StringUtil.Format(RemotingErrorIdStrings.DcsWarningMessage));
|
||||
WriteVerbose(StringUtil.Format(RemotingErrorIdStrings.EcsScriptMessageV, disablePSRemotingFormat));
|
||||
|
||||
|
|
|
@ -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.
|
||||
-->
|
||||
|
@ -655,7 +655,7 @@
|
|||
</data>
|
||||
<data name="CSCmdsShellNotPowerShellBased" xml:space="preserve">
|
||||
<value>Session configuration "{0}" is not a PowerShell-based shell.</value>
|
||||
</data>
|
||||
</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>
|
||||
</data>
|
||||
|
@ -1114,8 +1114,8 @@ All WinRM sessions connected to PowerShell session configurations, such as Micro
|
|||
<data name="AuthenticationMechanismRequiresCredential" xml:space="preserve">
|
||||
<value>{0} authentication requires an explicit user name and password. Specify the user name and password by using the -Credential parameter and try the command again.</value>
|
||||
</data>
|
||||
<data name="BasicAuthOverHttpNotSupported">
|
||||
<value>Basic authentication is not supported over HTTP on Unix.</value>
|
||||
<data name="BasicAuthOverHttpNotSupported" xml:space="preserve">
|
||||
<value>Basic authentication is not supported over HTTP on Unix.</value>
|
||||
</data>
|
||||
<data name="StartJobDefinitionNotFound1" xml:space="preserve">
|
||||
<value>Cannot find a scheduled job with name {0}.</value>
|
||||
|
@ -1662,10 +1662,10 @@ All WinRM sessions connected to PowerShell session configurations, such as Micro
|
|||
<value>PowerShell Core 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>
|
||||
<value>Unable to install plugin {0} to directory {1}.</value>
|
||||
</data>
|
||||
<data name="PluginDllMissing" xml:space="preserve">
|
||||
<value>The WinRM plugin DLL {0} is missing for PowerShell. Please run Enable-PSRemoting and then retry this command.</value>
|
||||
<value>The WinRM plugin DLL {0} is missing for PowerShell. Please run Enable-PSRemoting and then retry this command.</value>
|
||||
</data>
|
||||
<data name="WSManClientDllNotAvailable" xml:space="preserve">
|
||||
<value>This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.</value>
|
||||
|
@ -1686,4 +1686,11 @@ All WinRM sessions connected to PowerShell session configurations, such as Micro
|
|||
<data name="UnixOnlyHttpsWithoutSkipCACheckNotSupported" xml:space="preserve">
|
||||
<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>
|
||||
</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>
|
||||
</data>
|
||||
</root>
|
||||
|
|
Loading…
Reference in a new issue