Command Prompt: WMIC , DSQUERY , NETUSER

8 minutes
Share the link to this page
Copied
  Completed

Transcript

In this section, we'll be covering, gathering user information via the windows command. We're going to cover a few topics from big around who's logging into the system, username and so on right beyond the main control system on our left will be our PC that we're going to be executing commands on. So let's jump into it. The first the first command that we're going to run is we want to see who particularly is logged in on the system on our right our domain controller. So I'm going to come over to our system on the left and type w m IC space, forward slash, node, semi colon the remote computer name As you can see on the right, it's just DC type DC space, computer system, space, get space username and hit in. Now based on results that we received back for this particular system, we know that it is the local administrator that's logged on to these PC.

Let's go on to our second example. I'm going to clear the screen now type CLS and Enter. Now let's see if this particular user Jim McFly if his account has been locked. I'm going to come over to our system on the left and type net user the username of the individual which is MC fly let's go in and Right click on Jim's account and hit properties go to account. And here we have his logo on the MC fly. Going to go back over to our system, hit space, forward slash, domain, hit space, pipe space, find space, forward slash eye space quotation and we're going to type account active and hit enter.

Now we see that Jim's account is indeed active, so we know that his account has not been disabled when he cancel and cancel our second window. Now let's move on to our third example. Let's just say we're in a situation in which needs to find out the username of the individual that works at the company we have their last name, but we don't exactly know their username in Active Directory is acting up for some reason. So once again, I'm going to come over to our system on our left and type CLS to just to clear the screen. And I'm going to type DNS query qu er y, space, user space, dash name, space star. And the last name of the individual in this case will be McFly.

Star again, pipe space, D get space user space dash s a mid space dash display and hit enter. Oops, sorry, I believe I missed one letter D sq. There you go and hidden. And here are the results that we got back. We see that McFly is the username for Jim McFly. Very, very handy just in case you're having problems with the interface of active directory, a lot of companies run across that.

And that's the purpose of us. Getting down to just getting to the bare metals of command prompt because a lot of people may use it for very simple things IP config IP address, but there's a lot of helpful information that you can use using the administrative windows command prompt. I'm going to hit CLS to clear the screen and we're going to go over our very last topic. Now let's see if we have a user That's constantly getting locked out. That's a very common situation in most companies, and it's kind of hard to pinpoint when the users being locked out or the time that they're being locked out. Or let's just say you're on the phone with a user, and he says he never reset his password.

Well, there's a very simple way that we can prove that to be true or false. So our very last example is going to be finding out when was the last time a user password was set. I'm going to come over to our administrator command prompt and type net space user space the username of the individual forward slash, domain, space, pipe, space, find space forward slash I, space, and in quotations, I'm going to type password last set And enter. And we see the last time that Jim's account was password was set was at October 11 2017 10:37pm. Now let's go over to Jim's account. Actually, let's do this.

Let's log out of Jim's account on the left. See that he's properly logged out. And now let's reset his password and see if the time changes. No, we don't want him to change our login. I'm sorry about that. did not meet the minimum complexity.

Let's try this one more time. Okay, now let's have Jim log back in. Keep There we go. Okay, so now we know that Jim is logged in. Now let's go and run our administrator command prompt again. And we're going to run the same command just to make sure that the time for Jim, when he reset his password actually changes so I'm going to type net user the username of the individual space, forward slash domain, space pipe space find space forward slash eye space and in quotation as I said before, we're going to type password last set and hit it.

Now we see that the new time that the last time Jim reset his password was that he Definitely pm. So we get some very useful information I'm using these commands and Windows command prompt is a very good tool that I think every admin should know whether no matter what your position may be, there's a command pretty much everything. Actually, you can go online and search, maybe this the top 60 commands that every admin should know. And a lot of these commands are in the list. And sometimes you need to sort of browse these commands to see what exactly options are available to you. Like for instance, in the net command we have, we can do net accounts, net computer net, config.

NET continued net file, there's a lot of different tools that every admin can use. I hope you guys enjoyed this course. I will see you again in the next one.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.