using System; using System.Collections.Generic; using System.Globalization; using System.Management; using System.IO; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Runtime.InteropServices; using System.…