public override void SetSessionOptions(PSSessionOption options) { if (options == null) { throw new ArgumentNullException("options"); } if ((options.ProxyAccessType == System.Management.Automation.Remoting.ProxyAccessType.None) && (options.ProxyCredential != null)) { throw new ArgumentException(PSRemotingErrorInvariants.FormatResourceString(RemotingErrorIdStrings.ProxyCredentialWithoutAccess, new object[] { System.Management.Automation.Remoting.ProxyAccessType.None })); } base.SetSessionOptions(options); this.MaximumConnectionRedirectionCount = (options.MaximumConnectionRedirectionCount >= 0) ? options.MaximumConnectionRedirectionCount : 0x7fffffff; this.MaximumReceivedDataSizePerCommand = options.MaximumReceivedDataSizePerCommand; this.MaximumReceivedObjectSize = options.MaximumReceivedObjectSize; this.UseCompression = !options.NoCompression; this.NoMachineProfile = options.NoMachineProfile; this._proxyAcessType = options.ProxyAccessType; this._proxyAuthentication = options.ProxyAuthentication; this._proxyCredential = options.ProxyCredential; this._skipCaCheck = options.SkipCACheck; this._skipCnCheck = options.SkipCNCheck; this._skipRevocationCheck = options.SkipRevocationCheck; this._noEncryption = options.NoEncryption; this._useUtf16 = options.UseUTF16; this._includePortInSPN = options.IncludePortInSPN; this._outputBufferingMode = options.OutputBufferingMode; }
internal NewProcessConnectionInfo(PSCredential credential) { this.credential = credential; this.authMechanism = System.Management.Automation.Runspaces.AuthenticationMechanism.Default; }