Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ internal static ErrorRecord InitializeErrorRecordCore(
originInfo);

DebugHelper.WriteLogEx("Created RemotingErrorRecord.", 0);
// errorRecord.SetInvocationInfo(jobContext.CmdletInvocationInfo);
// errorRecord.PreserveInvocationInfoOnce = true;
return errorRecord;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,6 @@ public String ResultClassName
}
private String resultClassName;

/// <summary>
/// The following is the definition of the input parameter "AssociatorRole".
/// Specifies the name of the association role of the instances to be retrieved.
/// </summary>
//[Parameter(ValueFromPipelineByPropertyName = true)]
//public String AssociatorRole
//{
// get { return associatorRole; }
// set { associatorRole = value; }
//}
//private String associatorRole;

/// <summary>
/// The following is the definition of the input parameter "SourceRole".
/// Specifies the name of the association role of the source instance where the
/// association traversal should begin.
/// </summary>
//[Parameter(ValueFromPipelineByPropertyName = true)]
//public String SourceRole
//{
// get { return sourcerole; }
// set { sourcerole = value; }
//}
//private String sourcerole;

/// <summary>
/// <para>
/// The following is the definition of the input parameter "InputObject".
Expand Down Expand Up @@ -315,14 +290,10 @@ CimGetAssociatedInstance CreateOperationAgent()
#region private members

#region const string of parameter names
// internal const string nameAssociation = "Association";
internal const string nameCimInstance = "InputObject";
// internal const string nameNamespace = "Namespace";
// internal const string nameOperationTimeoutSec = "OperationTimeoutSec";
internal const string nameComputerName = "ComputerName";
internal const string nameCimSession = "CimSession";
internal const string nameResourceUri = "ResourceUri";
// internal const string nameKeyOnly = "KeyOnly";
#endregion

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public static uint FormatMessageFromModule(uint lastError, string moduleName, ou
if (nChars == 0)
{
formatError = (uint)Marshal.GetLastWin32Error();
//Console.WriteLine("Win32FormatMessage", String.Format(null, "Error formatting message: {0}", formatError));
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,57 +267,57 @@ private static ErrorCategory ConvertCimNativeErrorCodeToErrorCategory(NativeErro
case NativeErrorCode.Ok:
return ErrorCategory.NotSpecified;
case NativeErrorCode.Failed:
return ErrorCategory.NotSpecified; ;
return ErrorCategory.NotSpecified;
case NativeErrorCode.AccessDenied:
return ErrorCategory.PermissionDenied; ;
return ErrorCategory.PermissionDenied;
case NativeErrorCode.InvalidNamespace:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.InvalidParameter:
return ErrorCategory.InvalidArgument; ;
return ErrorCategory.InvalidArgument;
case NativeErrorCode.InvalidClass:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.NotFound:
return ErrorCategory.ObjectNotFound; ;
return ErrorCategory.ObjectNotFound;
case NativeErrorCode.NotSupported:
return ErrorCategory.NotImplemented; ;
return ErrorCategory.NotImplemented;
case NativeErrorCode.ClassHasChildren:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.ClassHasInstances:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.InvalidSuperClass:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.AlreadyExists:
return ErrorCategory.ResourceExists; ;
return ErrorCategory.ResourceExists;
case NativeErrorCode.NoSuchProperty:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.TypeMismatch:
return ErrorCategory.InvalidType; ;
return ErrorCategory.InvalidType;
case NativeErrorCode.QueryLanguageNotSupported:
return ErrorCategory.NotImplemented; ;
return ErrorCategory.NotImplemented;
case NativeErrorCode.InvalidQuery:
return ErrorCategory.InvalidArgument; ;
return ErrorCategory.InvalidArgument;
case NativeErrorCode.MethodNotAvailable:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.MethodNotFound:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.NamespaceNotEmpty:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.InvalidEnumerationContext:
return ErrorCategory.MetadataError; ;
return ErrorCategory.MetadataError;
case NativeErrorCode.InvalidOperationTimeout:
return ErrorCategory.InvalidArgument; ;
return ErrorCategory.InvalidArgument;
case NativeErrorCode.PullHasBeenAbandoned:
return ErrorCategory.OperationStopped; ;
return ErrorCategory.OperationStopped;
case NativeErrorCode.PullCannotBeAbandoned:
return ErrorCategory.CloseError; ;
return ErrorCategory.CloseError;
case NativeErrorCode.FilteredEnumerationNotSupported:
return ErrorCategory.NotImplemented; ;
return ErrorCategory.NotImplemented;
case NativeErrorCode.ContinuationOnErrorNotSupported:
return ErrorCategory.NotImplemented; ;
return ErrorCategory.NotImplemented;
case NativeErrorCode.ServerLimitsExceeded:
return ErrorCategory.ResourceBusy; ;
return ErrorCategory.ResourceBusy;
case NativeErrorCode.ServerIsShuttingDown:
return ErrorCategory.ResourceUnavailable; ;
return ErrorCategory.ResourceUnavailable;
default:
return ErrorCategory.NotSpecified;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5167,14 +5167,6 @@ private static class PInvokeDllNames
/// <returns>An hresult indicating success or failure.</returns>
[DllImport("slc.dll", CharSet = CharSet.Unicode)]
internal static extern int SLGetWindowsInformationDWORD(string licenseProperty, out int propertyValue);
/*
* SLGetWindowsInformationDWORD function returns
* S_OK (0x00000000): If the method succeeds
* SL_E_RIGHT_NOT_GRANTED (0xC004F013): The caller does not have the permissions necessary to call this function.
* SL_E_DATATYPE_MISMATCHED (0xC004F013): The value portion of the name-value pair is not a DWORD.
[DllImport("Slc.dll", EntryPoint = "SLGetWindowsInformationDWORD", CharSet = CharSet.Unicode)]
public static extern UInt32 SLGetWindowsInformationDWORD(string pwszValueName, ref int pdwValue);
*/
}
#endregion Native
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ public class TestConnectionCommand : PSCmdlet
private const string ParameterSetPingCount = "PingCount";
private const string ParameterSetPingContinues = "PingContinues";
private const string ParameterSetTraceRoute = "TraceRoute";
//private const string ParameterSetPathPing = "PathPing";
private const string ParameterSetConnectionByTCPPort = "ConnectionByTCPPort";
//private const string ParameterSetDetectionOfBlackHole = "DetectionOfBlackHole";
private const string ParameterSetDetectionOfMTUSize = "DetectionOfMTUSize";

#region Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public sealed class FormatHex : PSCmdlet
public string[] LiteralPath { get; set; }

/// <summary>
/// Ojbect to process.
/// Object to process.
/// </summary>
[Parameter(Mandatory = true, ParameterSetName = "ByInputObject", ValueFromPipeline = true)]
public PSObject InputObject { get; set; }
Expand Down
49 changes: 0 additions & 49 deletions src/Microsoft.WSMan.Management/CredSSP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,6 @@ protected override void BeginProcessing()
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "SSP")]
public class EnableWSManCredSSPCommand : WSManCredSSPCommandBase, IDisposable/*, IDynamicParameters*/
{
#region Private Data

//private const string DelegateComputerParam = "DelegateComputer";
//private String[] delegatecomputer;
//private RuntimeDefinedParameterDictionary dynamicParameters = new RuntimeDefinedParameterDictionary();

#endregion

/// <summary>
/// delegate parameter
/// </summary>
Expand Down Expand Up @@ -494,42 +486,6 @@ protected override void BeginProcessing()
}
}//End BeginProcessing()

/*
/// <summary>
/// This method returns DynamicParameters used for Enable-WSManCredSSP cmdlet. Enable-WSManCredSSP
/// supports -DelegateComputer parameter when -Role is client.
/// </summary>
/// <returns>
/// An object representing the dynamic parameters for the cmdlet or null if there
/// are none.
/// </returns>
object IDynamicParameters.GetDynamicParameters()
{
// return null if the role is not client.
if (!Role.Equals(ClientRole, StringComparison.OrdinalIgnoreCase))
{
return dynamicParameters;
}

// Construct attributes for the DelegateComputer parameter
Collection<Attribute> delegateComputerAttributeCollection = new Collection<Attribute>();
ParameterAttribute paramAttribute = new ParameterAttribute();
paramAttribute.Mandatory = true;
paramAttribute.Position = 1;
ValidateNotNullOrEmptyAttribute notNullAttribute = new ValidateNotNullOrEmptyAttribute();
delegateComputerAttributeCollection.Add(paramAttribute);
delegateComputerAttributeCollection.Add(notNullAttribute);

// Construct the parameter and return.
RuntimeDefinedParameter delegateComputer = new RuntimeDefinedParameter(
DelegateComputerParam,
typeof(string[]),
delegateComputerAttributeCollection);
dynamicParameters.Add(DelegateComputerParam, delegateComputer);

return dynamicParameters;

} // GetDynamicParameters*/

#endregion

Expand Down Expand Up @@ -565,9 +521,6 @@ private void EnableClientSideSettings()
WriteError(er);
return;
}
// Extract delegateComputer information from dynamic parameters collection
//RuntimeDefinedParameter delegateComputerParameter = dynamicParameters[DelegateComputerParam];
//delegatecomputer = (string[])delegateComputerParameter.Value;

string newxmlcontent = @"<cfg:Auth xmlns:cfg=""http://schemas.microsoft.com/wbem/wsman/1/config/client/auth""><cfg:CredSSP>true</cfg:CredSSP></cfg:Auth>";
try
Expand Down Expand Up @@ -776,7 +729,6 @@ private void UpdateGPORegistrySettings(string applicationname, string[] delegate
void
Dispose()
{
//CleanUp();
GC.SuppressFinalize(this);
}
/// <summary>
Expand Down Expand Up @@ -985,7 +937,6 @@ protected override void BeginProcessing()
void
Dispose()
{
//CleanUp();
GC.SuppressFinalize(this);
}
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,6 @@ private FlowControlException InvokeHelper()
finally
{
this.LocalRunspace.ExecutionContext.EngineHostInterface.SetShouldExit(exitCode);

// close the remote runspaces available
/*foreach (RemoteRunspaceInfo remoteRunspaceInfo in
this.LocalRunspace.RunspaceRepository.Runspaces)
{
remoteRunspaceInfo.RemoteRunspace.CloseAsync();
}*/
}
}
}
Expand Down