public override void OnExecute(CommandLineApplication app) { var session = SmbSession.EnumerateInstances(Parent.ComputerName, Parent.GetNetworkCredential()) .Single(s => s.SessionId == SessionId); session.ForceClose(); throw new NotImplementedException(); }
public override void OnExecute(CommandLineApplication app) { var sessions = SmbSession.EnumerateInstances(ComputerName, GetNetworkCredential()); if (PrintAsList) { PrintCollection(sessions); } else { PrintTable(sessions); } }