spelling: comments in src/System.Management.Automation/engine/remoting/commands

This commit is contained in:
Josh Soref
2016-08-28 05:27:36 +00:00
parent 836101c1de
commit 64bd97801a
18 changed files with 62 additions and 62 deletions
@@ -973,7 +973,7 @@ namespace Microsoft.PowerShell.Commands
if (ParameterSetName != ConnectPSSessionCommand.ConnectionUriParameterSet &&
ParameterSetName != ConnectPSSessionCommand.ConnectionUriGuidParameterSet)
{
// uri redirection is supported only with URI parmeter set
// uri redirection is supported only with URI parameter set
connectionInfo.MaximumConnectionRedirectionCount = 0;
}
@@ -38,7 +38,7 @@ namespace Microsoft.PowerShell.Commands
{
#region Register-PSSessionConfiguration cmdlet
/// <summary>
/// Class implemeting Register-PSSessionConfiguration
/// Class implementing Register-PSSessionConfiguration
/// </summary>
[Cmdlet(VerbsLifecycle.Register, RemotingConstants.PSSessionConfigurationNoun,
DefaultParameterSetName = PSSessionConfigurationCommandBase.NameParameterSetName,
@@ -1364,7 +1364,7 @@ else
/// Checks if the current thread is running elevated. If not, throws an error.
/// </summary>
/// <exception cref="InvalidOperationException">
/// 1. Acess is denied. You need to run this cmdlet from an elevated process.
/// 1. Access is denied. You need to run this cmdlet from an elevated process.
/// </exception>
internal static void ThrowIfNotAdministrator()
{
@@ -1641,7 +1641,7 @@ else
sb.Append(prologue);
//
// Convert to condtional ACE
// Convert to conditional ACE
// Beginning (Regular) ACE has exactly 6 required fields and one (optional) field.
// We only manipulate ACEs that we create and we currently do not use the optional resource field,
// so we always expect a beginning ACE with exactly 6 fields.
@@ -1764,13 +1764,13 @@ else
private const string MemberOfFormat = "Member_of {{SID({0})}}";
/// <summary>
/// Parse RequiredGroups configruation and build conditional ACE string.
/// Parse RequiredGroups configuration and build conditional ACE string.
/// </summary>
/// <param name="configTable"></param>
/// <returns></returns>
// RequiredGroups: @{ And = @{ Or = '2FA_GROUP_1', '2FA_GROUP_2' }, @{ Or = 'TRUSTEDHOSTS_1', 'TRUSTEDHOSTS_2' } }
// User ACE: (XA;;GA;;;S-1-5-21-2127438184-1604012920-1882527527;CondionalPart)
// CondionalPart: ((Member_of {SID(2FA_GROUP_1)} || Member_of {SID(2FA_GROUP_2)}) && (Member_of {SID(TRUSTEDHOSTS_1)} || Member_of {TRUSTEDHOSTS_2}))
// User ACE: (XA;;GA;;;S-1-5-21-2127438184-1604012920-1882527527;ConditionalPart)
// ConditionalPart: ((Member_of {SID(2FA_GROUP_1)} || Member_of {SID(2FA_GROUP_2)}) && (Member_of {SID(TRUSTEDHOSTS_1)} || Member_of {TRUSTEDHOSTS_2}))
// where: 2FA_GROUP_1, 2FA_GROUP_2, TRUSTEDHOSTS_1, TRUSTEDHOSTS_2 are resolved SIDs of the group names.
// (https://msdn.microsoft.com/en-us/library/windows/desktop/dd981030(v=vs.85).aspx)
internal static string CreateConditionalACEFromConfig(
@@ -2040,7 +2040,7 @@ else
/// <summary>
/// This parameter should be specified with AssemblyName. This supplies
/// the type to load to get the InitialSessionState. The type should
/// be derivided from <see cref="PSSessionConfiguration"/>.
/// be derived from <see cref="PSSessionConfiguration"/>.
/// </summary>
[Parameter(Position = 2, Mandatory = true, ParameterSetName = PSSessionConfigurationCommandBase.AssemblyNameParameterSetName)]
public string ConfigurationTypeName
@@ -2446,7 +2446,7 @@ else
#region Unregister-PSSessionConfiguration cmdlet
/// <summary>
/// Class implemeting Unregister-PSSessionConfiguration
/// Class implementing Unregister-PSSessionConfiguration
/// </summary>
[Cmdlet(VerbsLifecycle.Unregister, RemotingConstants.PSSessionConfigurationNoun,
SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Low, HelpUri = "http://go.microsoft.com/fwlink/?LinkID=144308")]
@@ -2668,7 +2668,7 @@ else
#region Get-PSSessionConfiguration cmdlet
/// <summary>
/// Class implemeting Get-PSSessionConfiguration
/// Class implementing Get-PSSessionConfiguration
/// </summary>
[Cmdlet(VerbsCommon.Get, RemotingConstants.PSSessionConfigurationNoun, HelpUri = "http://go.microsoft.com/fwlink/?LinkID=144304")]
[OutputType("Microsoft.PowerShell.Commands.PSSessionConfigurationCommands#PSSessionConfiguration")]
@@ -2904,7 +2904,7 @@ $args[0] | foreach {{
#region Set-PSSessionConfiguration cmdlet
/// <summary>
/// Class implemeting Set-PSSessionConfiguration
/// Class implementing Set-PSSessionConfiguration
/// </summary>
[Cmdlet(VerbsCommon.Set, RemotingConstants.PSSessionConfigurationNoun,
DefaultParameterSetName = PSSessionConfigurationCommandBase.NameParameterSetName,
@@ -3958,7 +3958,7 @@ Set-PSSessionConfiguration $args[0] $args[1] $args[2] $args[3] $args[4] $args[5]
}
}
// if ModulesToImport doesn't exist in the pssessionConfigurationData, we don't need to do anything.
// in this case, if the current config is of type workfolw, it's not a valid config.
// in this case, if the current config is of type workflow, it's not a valid config.
}
else
{
@@ -4786,7 +4786,7 @@ param(
if ($pa -eq ""x86"")
{{
# on 64-bit platforms, wow64 bit process has the correct architecture
# available in processor_architew6432 varialbe
# available in processor_architew6432 variable
$pa = $env:PROCESSOR_ARCHITEW6432
}}
if ((($pa -eq ""amd64"")) -and (test-path $env:windir\syswow64\pwrshplugin.dll))
@@ -5191,7 +5191,7 @@ Disable-PSRemoting -force:$args[0] -queryForSet $args[1] -captionForSet $args[2]
#region Cmdlet Override
/// <summary>
/// Check for prerequisites and eleveation mode
/// Check for prerequisites and elevation mode
/// </summary>
protected override void BeginProcessing()
{
@@ -104,7 +104,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Extract resutl objects corresponding to the specified
/// Extract result objects corresponding to the specified
/// names or expressions
/// </summary>
protected override void ProcessRecord()
@@ -573,7 +573,7 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// The AllowRediraction parameter enables the implicit redirection functionality
/// The AllowRedirection parameter enables the implicit redirection functionality
/// </summary>
[Parameter(ParameterSetName = InvokeCommandCommand.UriParameterSet)]
[Parameter(ParameterSetName = InvokeCommandCommand.FilePathUriParameterSet)]
@@ -882,7 +882,7 @@ namespace Microsoft.PowerShell.Commands
// be using protocol version 2.2. Otherwise, we skip this and assume the old behavior.
if (version >= RemotingConstants.ProtocolVersionWin8RTM)
{
// Supress collection behavior
// Suppress collection behavior
_needToCollect = false;
_needToStartSteppablePipelineOnServer = true;
break;
@@ -1948,7 +1948,7 @@ namespace Microsoft.PowerShell.Commands
}
}
}
} // Dipose
} // Dispose
#endregion IDisposable Overrides
}
@@ -285,7 +285,7 @@ namespace Microsoft.PowerShell.Commands
private IDictionary _requiredGroups;
/// <summary>
/// Languange mode
/// Language mode
/// </summary>
[Parameter()]
public PSLanguageMode LanguageMode
@@ -446,7 +446,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _visibleProviders = Utils.EmptyArray<string>();
/// <summary>
/// A list of alises
/// A list of aliases
/// </summary>
[Parameter()]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
@@ -1309,7 +1309,7 @@ namespace Microsoft.PowerShell.Commands
private string[] _scriptsToProcess = Utils.EmptyArray<string>();
/// <summary>
/// A list of alises
/// A list of aliases
/// </summary>
[Parameter()]
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
@@ -164,7 +164,7 @@ namespace System.Management.Automation.Remoting
/// <summary>
/// Specifies that no encryption will be used when doing remote operations over
/// http. Unencrypted traffix is not allowed by default and must be enabled in
/// http. Unencrypted traffic is not allowed by default and must be enabled in
/// the local configuration
/// </summary>
public bool NoEncryption { get; set; }
@@ -525,7 +525,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// The following is the definition of the input parameter "UnEncrypted".
/// Specifies that no encryption will be used when doing remote operations over
/// http. Unencrypted traffix is not allowed by default and must be enabled in
/// http. Unencrypted traffic is not allowed by default and must be enabled in
/// the local configuration
/// </summary>
[Parameter]
@@ -110,7 +110,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
/// <param name="resourceString">resource String which holds the message
/// </param>
/// <returns>Error message loaded from appropriate resouce cache</returns>
/// <returns>Error message loaded from appropriate resource cache</returns>
internal String GetMessage(string resourceString)
{
String message = GetMessage(resourceString, null);
@@ -603,7 +603,7 @@ namespace Microsoft.PowerShell.Commands
public virtual Uri[] ConnectionUri { get; set; }
/// <summary>
/// The AllowRediraction parameter enables the implicit redirection functionality
/// The AllowRedirection parameter enables the implicit redirection functionality
/// </summary>
[Parameter(ParameterSetName = PSRemotingBaseCmdlet.UriParameterSet)]
public virtual SwitchParameter AllowRedirection
@@ -723,7 +723,7 @@ namespace Microsoft.PowerShell.Commands
/// Used to resolve authentication from the parameters chosen by the user.
/// User has the following options:
/// 1. AuthMechanism + Credential
/// 2. CertiticateThumbPrint
/// 2. CertificateThumbPrint
///
/// All the above are mutually exclusive.
/// </summary>
@@ -814,7 +814,7 @@ namespace Microsoft.PowerShell.Commands
if (!ParameterSetName.Equals(PSRemotingBaseCmdlet.UriParameterSet, StringComparison.OrdinalIgnoreCase))
{
// uri redirection is supported only with URI parmeter set
// uri redirection is supported only with URI parameter set
connectionInfo.MaximumConnectionRedirectionCount = 0;
}
@@ -2834,11 +2834,11 @@ namespace Microsoft.PowerShell.Commands
}
/// <summary>
/// Write the maching runspace objects down the pipeline, or add to the list.
/// Write the matching runspace objects down the pipeline, or add to the list.
/// </summary>
/// <param name="matchingRunspaceInfos">The maching runspaces</param>
/// <param name="matchingRunspaceInfos">The matching runspaces</param>
/// <param name="writeobject">if true write the object down the pipeline. Otherwise, add to the list</param>
/// <param name="matches">The list we add the maching runspaces to</param>
/// <param name="matches">The list we add the matching runspaces to</param>
private void WriteOrAddMatches(List<PSSession> matchingRunspaceInfos,
bool writeobject,
ref Dictionary<Guid, PSSession> matches)
@@ -3015,7 +3015,7 @@ namespace Microsoft.PowerShell.Commands
}
else
{
// will have to raise OpertionComplete from here,
// will have to raise OperationComplete from here,
// else ThrottleManager will have
RaiseOperationCompleteEvent();
}
@@ -3237,7 +3237,7 @@ namespace Microsoft.PowerShell.Commands
break;
case RunspaceState.Closed:
{
// raise a OpertionComplete event with
// raise a OperationComplete event with
// StopComplete message
if (stateEventArgs.RunspaceStateInfo.Reason != null)
{
@@ -22,7 +22,7 @@ using System.Management.Automation.Internal;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// Cmdlet used for receiveing results from job object.
/// Cmdlet used for receiving results from job object.
/// This cmdlet is intended to have a slightly different behavior
/// in the following two cases:
/// 1. The job object to receive results from is a PSRemotingJob
@@ -23,7 +23,7 @@ namespace Microsoft.PowerShell.Commands
/// until the running command completes and all output data is received on
/// the client.
/// b) To a job object. This is the asynchronous mode of the cmdlet which will
/// return immmediately providing the job object that is collecting the
/// return immediately providing the job object that is collecting the
/// running command output data.
///
/// The running command becomes disconnected when the associated runspace is
@@ -408,7 +408,7 @@ namespace Microsoft.PowerShell.Commands
/// in a job object that is returned (OutTarget.Job).
/// </summary>
/// <param name="name">Name of session to find.</param>
/// <param name="instanceId">Instnace Id of session to find.</param>
/// <param name="instanceId">Instance Id of session to find.</param>
private void QueryForAndConnectCommands(string name, Guid instanceId)
{
WSManConnectionInfo connectionInfo = GetConnectionObject();
@@ -601,7 +601,7 @@ namespace Microsoft.PowerShell.Commands
if (ParameterSetName != ReceivePSSessionCommand.ConnectionUriInstanceIdParameterSet &&
ParameterSetName != ReceivePSSessionCommand.ConnectionUriSessionNameParameterSet)
{
// uri redirection is supported only with URI parmeter set
// uri redirection is supported only with URI parameter set
connectionInfo.MaximumConnectionRedirectionCount = 0;
}
@@ -1313,7 +1313,7 @@ namespace Microsoft.PowerShell.Commands
Host = 1,
/// <summary>
/// Asyncronous mode. Receive-PSSession ouput data goes to returned job object.
/// Asynchronous mode. Receive-PSSession ouput data goes to returned job object.
/// </summary>
Job = 2
}
@@ -48,7 +48,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
///
/// <param name="writeobject">if true, method writes the object instead of returning it
/// in list (an empty list is retuened). </param>
/// in list (an empty list is returned). </param>
/// <param name="writeErrorOnNoMatch">write error if no match is found</param>
/// <param name="checkIfJobCanBeRemoved">check if this job can be removed</param>
/// <param name="recurse">recurse and check in child jobs</param>
@@ -181,7 +181,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
///
/// <param name="writeobject">if true, method writes the object instead of returning it
/// in list (an empty list is retuened). </param>
/// in list (an empty list is returned). </param>
/// <param name="writeErrorOnNoMatch">write error if no match is found</param>
/// <param name="checkIfJobCanBeRemoved">check if this job can be removed</param>
/// <param name="recurse">look in all child jobs</param>
@@ -297,7 +297,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
///
/// <param name="writeobject">if true, method writes the object instead of returning it
/// in list (an empty list is retuened). </param>
/// in list (an empty list is returned). </param>
/// <param name="writeErrorOnNoMatch">write error if no match is found</param>
/// <param name="checkIfJobCanBeRemoved">check if this job can be removed</param>
/// <param name="recurse">look in child jobs as well</param>
@@ -401,7 +401,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
///
/// <param name="writeobject">if true, method writes the object instead of returning it
/// in list (an empty list is retuened). </param>
/// in list (an empty list is returned). </param>
/// <returns>list of matching jobs</returns>
internal List<Job> FindJobsMatchingByCommand(
bool writeobject)
@@ -431,7 +431,7 @@ namespace Microsoft.PowerShell.Commands
WildcardPattern commandPattern = WildcardPattern.Get(command, WildcardOptions.IgnoreCase);
string jobCommand = job.Command.Trim();
// Win8: 469830
// Win7 code does not have commandPattern.IsMatch. We added wildcard support for Command parmaeterset
// Win7 code does not have commandPattern.IsMatch. We added wildcard support for Command parameterset
// in Win8 which breaks scenarios where the actual command has wildcards.)
if (jobCommand.Equals(command.Trim(), StringComparison.OrdinalIgnoreCase) || commandPattern.IsMatch(jobCommand))
{
@@ -454,7 +454,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
///
/// <param name="writeobject">if true, method writes the object instead of returning it
/// in list (an empty list is retuened). </param>
/// in list (an empty list is returned). </param>
/// <returns>list of matching jobs</returns>
internal List<Job> FindJobsMatchingByState(
bool writeobject)
@@ -550,7 +550,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
/// <param name="jobs"></param>
/// <param name="writeobject">if true, method writes the object instead of returning it
/// in list (an empty list is retuened). </param>
/// in list (an empty list is returned). </param>
/// <param name="checkIfJobCanBeRemoved">if true, only jobs which can be removed will be checked</param>
/// <returns></returns>
internal List<Job> CopyJobsToList(Job[] jobs, bool writeobject, bool checkIfJobCanBeRemoved)
@@ -884,7 +884,7 @@ namespace Microsoft.PowerShell.Commands
if (!job.IsFinishedState(job.JobStateInfo.State))
{
// if it is a Job2, then async is supported
// stop the job asynchornously
// stop the job asynchronously
if (job2 != null)
{
_cleanUpActions.Add(job2, HandleStopJobCompleted);
@@ -120,7 +120,7 @@ namespace Microsoft.PowerShell.Commands
_allJobsToResume.AddRange(jobsToResume);
// Blue: 151804 When resuming a single suspended workfllow job, Resume-job cmdlet doesn't wait for the job to be in running state
// Blue: 151804 When resuming a single suspended workflow job, Resume-job cmdlet doesn't wait for the job to be in running state
// Setting Wait to true so that this cmdlet will wait for the running job state.
if (_allJobsToResume.Count == 1)
Wait = true;
@@ -31,7 +31,7 @@ namespace Microsoft.PowerShell.Commands
private const string DefinitionNameParameterSet = "DefinitionName";
/// <summary>
/// JobDefintion Name.
/// JobDefinition Name.
/// </summary>
[Parameter(Position = 0, Mandatory = true,
ParameterSetName = StartJobCommand.DefinitionNameParameterSet)]
@@ -671,7 +671,7 @@ namespace Microsoft.PowerShell.Commands
{
CloseAllInputStreams();
}
} // Dipose
} // Dispose
#endregion IDisposable Overrides
}
@@ -14,7 +14,7 @@ using System.Threading;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This cmdlet stops the asynchronously invoked remote operaitons.
/// This cmdlet stops the asynchronously invoked remote operations.
/// </summary>
[Cmdlet(VerbsLifecycle.Stop, "Job", SupportsShouldProcess = true, DefaultParameterSetName = JobCmdletBase.SessionIdParameterSet,
HelpUri = "http://go.microsoft.com/fwlink/?LinkID=113413")]
@@ -141,7 +141,7 @@ namespace Microsoft.PowerShell.Commands
{
Job2 job2 = job as Job2;
// if it is a Job2, then async is supported
// stop the job asynchornously
// stop the job asynchronously
if (job2 != null)
{
_cleanUpActions.Add(job2, HandleStopJobCompleted);
@@ -201,7 +201,7 @@ namespace Microsoft.PowerShell.Commands
}
}
// there could be possiblility that the job gets completed befor or after the
// there could be possibility that the job gets completed before or after the
// subscribing to nowait_job2_statechanged event so checking it again.
if (!_wait && (job2.IsFinishedState(job2.JobStateInfo.State) || job2.JobStateInfo.State == JobState.Suspending || job2.JobStateInfo.State == JobState.Suspended))
{
@@ -262,7 +262,7 @@ namespace Microsoft.PowerShell.Commands
}
else
{
// there could be a possiblity of race condiftion where this fucntion is getting called twice
// there could be a possibility of race condition where this function is getting called twice
// so if job doesn't present in the _pendingJobs then just return
return;
}
@@ -73,7 +73,7 @@ namespace Microsoft.PowerShell.Commands
public override string[] Command { get; set; }
#endregion Parameters
#region Coordinating how different events (timeout, stopprocesing, job finished, job blocked) affect what happens in EndProcessing
#region Coordinating how different events (timeout, stopprocessing, job finished, job blocked) affect what happens in EndProcessing
private readonly object _endProcessingActionLock = new object();
private Action _endProcessingAction;
@@ -103,7 +103,7 @@ namespace Microsoft.PowerShell.Commands
endProcessingAction = _endProcessingAction;
}
// Inovke action outside lock.
// Invoke action outside lock.
if (endProcessingAction != null)
{
endProcessingAction();
@@ -117,7 +117,7 @@ namespace Microsoft.PowerShell.Commands
#endregion
#region Support for triggering EndProcesing when jobs are finished or blocked
#region Support for triggering EndProcessing when jobs are finished or blocked
private readonly HashSet<Job> _finishedJobs = new HashSet<Job>();
private readonly HashSet<Job> _blockedJobs = new HashSet<Job>();
@@ -109,7 +109,7 @@ namespace Microsoft.PowerShell.Commands
/// this is not set as well, then Microsoft.PowerShell is used.
///
/// For VM/Container sessions:
/// If this parameter is not speficied then all sessions that match other filters are returned.
/// If this parameter is not specified then all sessions that match other filters are returned.
/// </summary>
[Parameter(ValueFromPipelineByPropertyName = true,
ParameterSetName = GetPSSessionCommand.ComputerNameParameterSet)]
@@ -134,7 +134,7 @@ namespace Microsoft.PowerShell.Commands
public String ConfigurationName { get; set; }
/// <summary>
/// The AllowRediraction parameter enables the implicit redirection functionality.
/// The AllowRedirection parameter enables the implicit redirection functionality.
/// </summary>
[Parameter(ParameterSetName = GetPSSessionCommand.ConnectionUriParameterSet)]
[Parameter(ParameterSetName = GetPSSessionCommand.ConnectionUriInstanceIdParameterSet)]
@@ -483,7 +483,7 @@ namespace Microsoft.PowerShell.Commands
if (ParameterSetName != GetPSSessionCommand.ConnectionUriParameterSet &&
ParameterSetName != GetPSSessionCommand.ConnectionUriInstanceIdParameterSet)
{
// uri redirection is supported only with URI parmeter set
// uri redirection is supported only with URI parameter set
connectionInfo.MaximumConnectionRedirectionCount = 0;
}
@@ -325,7 +325,7 @@ namespace Microsoft.PowerShell.Commands
/// </remarks>
protected override void StopProcessing()
{
// close the outputStream so that futher writes to the outputStream
// close the outputStream so that further writes to the outputStream
// are not possible
_stream.ObjectWriter.Close();
@@ -603,7 +603,7 @@ namespace Microsoft.PowerShell.Commands
{
List<RemoteRunspace> remoteRunspaces = new List<RemoteRunspace>();
// validate the runspaces specfied before processing them.
// validate the runspaces specified before processing them.
// The function will result in terminating errors, if any
// validation failure is encountered
ValidateRemoteRunspacesSpecified();
@@ -1300,7 +1300,7 @@ namespace Microsoft.PowerShell.Commands
/// Handler for handling runspace state changed events. This method will be
/// registered in the StartOperation and StopOperation methods. This handler
/// will in turn invoke the OperationComplete event for all events that are
/// necesary - Opened, Closed, Disconnected, Broken. It will ignore all other state
/// necessary - Opened, Closed, Disconnected, Broken. It will ignore all other state
/// changes.
/// </summary>
/// <remarks>
@@ -88,7 +88,7 @@ namespace Microsoft.PowerShell.Commands
#region Overrides
/// <summary>
/// Do the follwing actions:
/// Do the following actions:
/// 1. If runspace is in opened state,
/// a. stop any execution in process in the runspace
/// b. close the runspace