May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Manage with Remote Desktop Services

This topic includes sample Windows PowerShell cmdlets that you can use to automate some of the procedures described. For more information, see Using Cmdlets.

1.1. Manage updates automatically with Windows Update

To verify the current Windows Update setting, at a command prompt, run the following command:

Cscript scregedit.wsf /AU /v

To enable automatic updates, run the following commands:

Net stop wsuaserv

cscript scregedit.wst /AU 4

net start wsuaserv

To disable automatic updates, run the following commands:

Net stop wsuaserv

cscript scregedit.wsf /AU 1

net start wsuaserv

If the server is a member of a domain, you can also configure Windows Update using Group Policy. For more information, see http://go.microsoft.com/fwlink/?LinkId=192470. However, when you use this method, only option 4 (“Auto download and schedule the install”) is relevant to Server Core installations because of the lack of a graphical interface. For more control over which updates are installed and when, you can use a script which provides a command-line equivalent of most of the Windows Update graphical interface. For information about the script, see http://go.microsoft.com/fwlink/?LinkId=192471.

To force Windows Update to immediately detect and install any available updates, run the following command:

wuauclt /detectnow

Depending on the updates that are installed, you might need to restart the computer, although the system will not notify you of this. To determine if the installation process has completed, use Task Manager to verify that the Wuauclt or Trusted Installer processes are not actively running. You can also use the methods in the “Viewing installed updates” section to check the list of installed updates.
1.2. Manage updates with WSUS

If the Server Core server is a member of a domain, you can configure it to use a WSUS server with Group Policy. For more information, see http://go.microsoft.com/fwlink/?LinkId=192472.

If the server is not a member of a domain, edit the Registry to configure it to use a WSUS server. For more information, see http://go.microsoft.com/fwlink/?LinkId=192473.

Whenever you configure WSUS settings, be sure to select options that are valid for Server Core installations. For example, since there is no graphical interface, there is no way to receive WSUS notifications. For more control over which updates are installed and when, you can use a script which provides a command-line equivalent of most of the Windows Update graphical interface. For information about the script, see http://go.microsoft.com/fwlink/?LinkId=192471.
1.3. Manage updates manually

To install an update manually, download the update and make it available to the Server Core computer, and then run the following command:

Wusa .msu /quiet
noteNote
Depending on the updates that are installed, you may need to restart the computer, although the system will not notify you of this.

To uninstall an update manually, download the update and make it available to the Server Core computer, and then run the following command:

Wusa /uninstall .msu /quiet
noteNote
Depending on the updates that are installed, you may need to restart the computer, although the system will not notify you of this.

To view installed updates, run either of these commands:

systeminfo

wmic qfe list

You can use Remote Desktop to manage a server in Server Core mode from remote computers by using Remote Desktop Services.
To manage a Server Core server using Remote Desktop

On the Server Core server, run:

cscript C:\Windows\System32\Scregedit.wsf /ar 0

This enables the Remote Desktop for Administration mode to accept connections.

On another computer, click Start, click Run, type mstsc, and then click OK.

In Computer, enter the name of the server that is in Server Core mode, and click Connect.

Log on using an administrator account.

When the command prompt appears, you can manage the computer using the Windows command-line tools.

When you have finished remotely managing the Server Core computer, type logoff in the command prompt to end your Remote Desktop session

1.4 Manage with Remote Desktop Services

You can use Remote Desktop to manage a server in Server Core mode from remote computers by using Remote Desktop Services.
To manage a Server Core server using Remote Desktop

On the Server Core server, run:

cscript C:\Windows\System32\Scregedit.wsf /ar 0

This enables the Remote Desktop for Administration mode to accept connections.

On another computer, click Start, click Run, type mstsc, and then click OK.

In Computer, enter the name of the server that is in Server Core mode, and click Connect.

Log on using an administrator account.

When the command prompt appears, you can manage the computer using the Windows command-line tools.

When you have finished remotely managing the Server Core computer, type logoff in the command prompt to end your Remote Desktop session

noteNote
If you are running the Remote Desktop Services client on a previous version of Windows, you must turn off the higher security level that is set by default in Windows Server 2012. To do this, after step 1, type the following command at the command prompt:cscript C:\Windows\System32\Scregedit.wsf /cs 0

1.5 Switch to Server with a GUI mode

There may be situations in which you need to use the graphical user interfaces available in Server with a GUI mode. You can switch the system to Server with a GUI mode by following the steps below, although a restart is required. For more information about the differences between Server Core mode and Server with a GUI mode, as well as information about the Minimal Server Interface and Features on demand, see Windows Server Installation Options.
To convert from Server Core mode to Server with a GUI mode when the server was initially installed in Server with a GUI mode

Run Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Restart

To convert from Server Core mode to Server with a GUI mode when the server was initially installed in Server Core mode

Determine the index number for a Server with a GUI image (for example, SERVERDATACENTER, not SERVERDATACENTERCORE) using this cmdlet: Get-WindowsImage -ImagePath \install.wim

Run Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell –Restart –Source wim:\install.wim:

Alternatively, if you want to use Windows Update as the source instead of a WIM file, use this Windows PowerShell cmdlet:

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell –Restart

After you have accomplished the management tasks, you can switch the server back to Server Core mode whenever it is convenient (a restart is required) with the Windows PowerShell cmdlet Uninstall-WindowsFeature Server-Gui-Mgmt-Infra -restart
1.6 Add hardware and manage drivers locally
To add hardware to a server in Server Core mode

Follow the instructions provided by the hardware vendor for installing new hardware:
If the driver for the hardware is included in Windows Server 2012, Plug and Play will start and install the driver.

If the driver for the hardware is not included, proceed with the steps 2 and 3.

Copy the driver files to a temporary folder on the server running a Server Core installation.

At a command prompt, open the folder where the driver files are located, and then run the following command:

pnputil –i –a

Where:

driverinf is the file name of the .inf file for the driver.

If prompted, restart the computer.

To obtain a list of drivers that are installed

At a command prompt, run

sc query type= driver

noteNote
You must include the space after the equal sign for the command to complete successfully.

To disable a device driver

At a command prompt, run

sc delete

Where:

service_name is the name of the service that you obtain by running sc query type= driver

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>