• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 758
  • Last Modified:

Return my workgroup/domain -- VB.NET

Is there a line of code to return my current workgroup/domain in VB.NET?
0
b_o_b
Asked:
b_o_b
1 Solution
 
Mikal613Commented:

Domain/User

Imports System
Imports System.Security

Private Function GetUserName() As String
        Return Principal.WindowsIdentity.GetCurrent.Name()
        ' This will return 'domain\username' so just parse the Info
    End Function
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now