Are you trying to create a console program that gets the PC name and domain name or do you want to get this from already created command line tools?
If you are trying to create a console, I believe you can use System.Environment.UserDomainName and System.Environment.UserName in C#/VB.NET.