11.4.5.3 Lab – Other Useful Commands Instruction Answers – ITE v7.0

Lab – Other Useful Commands

Introduction

In this lab, you will work with other useful commands.

Required Resources

  • A Windows computer
  • A shared network resource and the credentials provided by the instructor

Instructions

Part 1: The Group Policy CLI

Step 1: The gpupdate command

The gpupdate command is used to update Group Policies settings.

a. Open a command prompt. At the prompt, enter gpupdate /? to review the syntax and available options.

C:\Users\ITEUser> gpupdate /?
Description: Updates multiple Group Policy settings.

Syntax: Gpupdate [/Target:{Computer | User}] [/Force] [/Wait:<value>]
     [/Logoff] [/Boot] [/Sync]

b. By default, the gpupdate command only updates if the group policy has changed. To force a background update of all Group Policy settings, regardless of if they have changed, use gpupdate /force.

C:\Users\ITEUser> gpupdate /force
Updating policy...

Computer Policy update has completed successfully.
User Policy update has completed successfully.

Step 2: The gpresult command

The gpresult command is used to review the Group Policy settings that are in effect.

a. Open a command prompt. At the prompt, enter gpresult /? to review the syntax and available options.

C:\Users\ITEUser> gpresult /?

b. To display the Resultant Set of Policy (RSoP) summary data, enter the gpresult /R at the prompt.

C:\Users\ITEUser> gpresult /R

Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0
© 2018 Microsoft Corporation. All rights reserved.

Created on 5/10/2019 at 5:04:22 PM

RSOP data for DESKTOP-PUU52R2\ITEUser on DESKTOP-PUU52R2 : Logging Mode
------------------------------------------------------------------------

OS Configuration:             Standalone Workstation
OS Version:                   10.0.17763
Site Name:                    N/A
Roaming Profile:              N/A
Local Profile:                C:\Users\ITEUser
Connected over a slow link?:  No
<output omitted>

c. If you want to save the report in an HTML format, enter the gpresult /H GPReport.html at the prompt. C:\Users\ITEUser\GPReport.html is used as an example. If the file already exists, add /F to the command to overwrite the existing version.

C:\Users\ITEUser> gpresult /H GPReport.html

d. To review the HTML version of the file, navigate to the file using Window Explorer or File Explorer. Double click the file to open it.

Part 2: The net command

The net command is used to manage the network and view its settings. In this part, you will only explore the net, net use, and net user commands.

When using the net command by itself, open a command prompt and enter net command to review the syntax of the command and to list the subset of commands for the net command.

C:\Users\ITEUser> net
The syntax of this command is:

NET
   [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
     HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
     STATISTICS | STOP | TIME | USE | USER | VIEW ]

Step 1: The net user command

The net user command is used to manage the users on a computer. With the options of the net user command, you can list the users, review user settings, and add or delete user accounts.

a. Open a command prompt, enter net user /? at the prompt to review the syntax of the command.

C:\Users\ITEUser> net user /?
The syntax of this command is:

NET USER
[username [password | *] [options]] [/DOMAIN]
         username {password | *} /ADD [options] [/DOMAIN]
         username [/DELETE] [/DOMAIN]
         username [/TIMES:{times | ALL}]
         username [/ACTIVE: {YES | NO}]

b. At the prompt, enter net user to list the user accounts on the computer.

C:\Users\ITEUser> net user

User accounts for \\DESKTOP-PUU52R2
-------------------------------------------------------------------------------
Administrator         DefaultAccount            Guest
ITEUser               WDAGUtilityAccount
The command completed successfully.

c. To view the settings for a specific user, enter net user username, where username is the desired username. The user account ITEUser is used in this example.

C:\Users\ITEUser> net user ITEUser
User name                    ITEUser
Full Name
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

d. With elevated privileges, you can add or remove a user account. For example, to add a new user, User1, open a prompt with elevated privileges, enter the command net user User1 ITEPassword /add, where ITEPassword is the password for the new user.

C:\Windows\system32> net user User1 ITEPassword /add
The command completed successfully.

e. Use the net user command to verify the user has been created.

Question:

When does the password expire?

f. The /delete option can be used to delete the user account.

C:\Windows\system32> net user User1 /delete
The command completed successfully.

Step 2: The net use command

The net use command is used to display information about shared resources on the network. This command lists the resources that you are currently connected to, and it can also connect to new resources and disconnect from connected ones.

a. In a command prompt, enter net use /? to review the syntax and options available.

C:\Users\ITEUser> net use /?
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
        [/USER:[domainname\]username]
        [/USER:[dotted domain name\]username]
<output omitted>

b. To view the current network connections, enter net use at the prompt. You will receive the following results if you are not connected to any network resources.

C:\Users\ITEUser> net use
New connections will not be remembered.
There are no entries in the list.

c. Record the network resource information provided by your instructor.

Network Resource:

Username:

Password:

d. At the prompt, enter the net user * “Network Resource” \user:username password. Replace Network Resource with the information record above. In this example, \\ITE-8\Users\ITE is the network resource. The asterisk * allows the computer to choose an available drive letter to assign to the resource. The username is ITE and the password is ITEPassword.

C:\Users\ITEUser> net use * "\\ITE-8\Users\ITE" /user:ITE ITEPassword
Drive Y: is now connected to \\ITE-8\Users\ITE.

The command completed successfully.

e. Use the net use command to verify the newly connected resource.

C:\Users\ITEUser> net use
New connections will not be remembered.

Status           Local           Remote                   Network
-------------------------------------------------------------------------------
OK               Y:              \\ITE-8\Users\ITE        Microsoft Windows Network
The command completed successfully.

Question:

What is the local drive letter assigned to the connected resource?

f. At the prompt, navigate to the assigned drive letter. In this example, Y: is the assigned drive letter.

C:\Users\ITEUser> Y:

g. Use the file system CLI command to navigate the directory tree. Navigate back to your original directory when done.

h. To disconnect from the connected resource, enter net use Y: /delete at the prompt. The drive letter Y: is used in this example.

C:\Users\ITEUser> net use Y: /delete
Y: was deleted successfully.

If you received the following message, you can reply N to the question, close the opened files and directories, and rerun the command. Or you can enter Y and force them to close and disconnect from the resource. By forcibly closing a network connection, you may lose any unsaved changes.

There are open files and/or incomplete directory searches pending on the connection to
Y:.
Is it OK to continue disconnecting and force them closed? (Y/N) [N]:

Download PDF file:


Related Articles

guest
0 Comments
Inline Feedbacks
View all comments