Technical: Microsoft – Networking / Active Directory – Net Commands

Technical: Microsoft – Networking / Active Directory – Net Commands

Background

One of the things I like about OS/X and Unix is that one gets in the habit of doing many things through the command line.

Whereas in Windows, one will use a GUI to get quick information.

But, truthfully Microsoft has many facilities for accomplishing things through the command line, or shall we say terminal mode, as well.

Introduction

In the Valley, the saying goes “Got tired of patch Tuesday, and so went Goggling“.
But before you go, you can at least give Street Creds to Redmond, also.

List Active Directory User Profile

Syntax:

net user "<AD Account>"  /Domain 

Sample


net user "danieladeniji"  /Domain

Sample Output:

netuser

List Active Directory Domain groups that a user belongs to

Syntax:

net user "<AD Account>"  /Domain | find "Group"

Sample


net user "danieladeniji"  /Domain | find "Group"

Sample Output:


Local Group Memberships
Global Group memberships *Marketing *GAMERS

Explanation:

  • The user does not belong to any local group; which is not true, but since we are targeting via “/Domain” we will overlook for now
  • And, he belongs to a couple of Domain Groups (Marketing and Gamers)

List all Active Directory Domain groups

Syntax:


net group /Domain

Sample:

net group  /Domain

List Members of Active Directory Domain group

Syntax:


net group "<AD Group Name>" /Domain

Sample:

net group "Domain Admins"  /Domain

 

List Shared folders on a remote machine

The net view commands lists the shared resources on a remote machine.

Syntax:

net view \\<machine-name>

Sample:


net view \\DWP

netview

List Local Services

List Local Services.

Syntax:

net view

Sample:


net view

 

References

References – Net Commands – NetUser

References – Net Commands – NetGroup

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s