-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
36 lines (31 loc) · 1005 Bytes
/
Copy pathProgram.cs
File metadata and controls
36 lines (31 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Runtime.InteropServices;
using System;
using System.Linq;
namespace ActiveDirectoryScanner
{
class Program
{
static void Main(string[] args)
{
// If this app isn't running on Windows, display an error message.
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Console.WriteLine("Error: This app is only compatible with Windows.");
return;
}
#if DEBUG
// If we're debugging, set up some test args.
args = new string[] { "Test" };
#endif
// Validate input.
if (args == null || args.Count() != 1)
{
Console.WriteLine("Error: Expected a single argument.");
return;
}
// Print the members of the specified group.
var adGroupMemberPrinter = new AdGroupMemberPrinter();
adGroupMemberPrinter.PrintGroupMembers(args[0]);
}
}
}