Example Code

Getting Windows user information using gpresult

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Description

If you are interested in getting the Resultant Set of Policy (RSOP) for the currently logged user (domain name, domain type, group policy objects, security groups etc.), you can use the System Exec.vi and the gpresult tool.

The example I am posting will output an array containing names of all security groups that the current user is in.

 

get groups.png

 

The example is written in LabVIEW 2015 SP1.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.