{"id":2337,"date":"2013-07-15T16:34:20","date_gmt":"2013-07-15T08:34:20","guid":{"rendered":"http:\/\/rmohan.com\/?p=2337"},"modified":"2013-07-16T11:17:44","modified_gmt":"2013-07-16T03:17:44","slug":"manage-with-remote-desktop-services","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2337","title":{"rendered":"Manage with Remote Desktop Services"},"content":{"rendered":"<p>This topic includes sample Windows PowerShell cmdlets that you can use to automate some of the procedures described. For more information, see Using Cmdlets.<\/p>\n<p>1.1. Manage updates automatically with Windows Update<\/p>\n<p>To verify the current Windows Update setting, at a command prompt, run the following command:<\/p>\n<p>Cscript scregedit.wsf \/AU \/v<\/p>\n<p>To enable automatic updates, run the following commands:<\/p>\n<p>Net stop wsuaserv<\/p>\n<p>cscript scregedit.wst \/AU 4<\/p>\n<p>net start wsuaserv<\/p>\n<p>To disable automatic updates, run the following commands:<\/p>\n<p>Net stop wsuaserv<\/p>\n<p>cscript scregedit.wsf \/AU 1<\/p>\n<p>net start wsuaserv<\/p>\n<p>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 (\u201cAuto download and schedule the install\u201d) 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.<\/p>\n<p>To force Windows Update to immediately detect and install any available updates, run the following command:<\/p>\n<p>wuauclt \/detectnow<\/p>\n<p>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 \u201cViewing installed updates\u201d section to check the list of installed updates.<br \/>\n1.2. Manage updates with WSUS<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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.<br \/>\n1.3. Manage updates manually<\/p>\n<p>To install an update manually, download the update and make it available to the Server Core computer, and then run the following command:<\/p>\n<p>Wusa <update>.msu \/quiet<br \/>\nnoteNote<br \/>\nDepending on the updates that are installed, you may need to restart the computer, although the system will not notify you of this.<\/p>\n<p>To uninstall an update manually, download the update and make it available to the Server Core computer, and then run the following command:<\/p>\n<p>Wusa \/uninstall <update>.msu \/quiet<br \/>\nnoteNote<br \/>\nDepending on the updates that are installed, you may need to restart the computer, although the system will not notify you of this.<\/p>\n<p>To view installed updates, run either of these commands:<\/p>\n<p>systeminfo<\/p>\n<p>wmic qfe list<\/p>\n<p>You can use Remote Desktop to manage a server in Server Core mode from remote computers by using Remote Desktop Services.<br \/>\nTo manage a Server Core server using Remote Desktop<\/p>\n<p>    On the Server Core server, run:<\/p>\n<p>    cscript C:\\Windows\\System32\\Scregedit.wsf \/ar 0<\/p>\n<p>    This enables the Remote Desktop for Administration mode to accept connections.<\/p>\n<p>    On another computer, click Start, click Run, type mstsc, and then click OK.<\/p>\n<p>    In Computer, enter the name of the server that is in Server Core mode, and click Connect.<\/p>\n<p>    Log on using an administrator account.<\/p>\n<p>    When the command prompt appears, you can manage the computer using the Windows command-line tools.<\/p>\n<p>    When you have finished remotely managing the Server Core computer, type logoff in the command prompt to end your Remote Desktop session<\/p>\n<p>1.4 Manage with Remote Desktop Services<\/p>\n<p>You can use Remote Desktop to manage a server in Server Core mode from remote computers by using Remote Desktop Services.<br \/>\nTo manage a Server Core server using Remote Desktop<\/p>\n<p>    On the Server Core server, run:<\/p>\n<p>    cscript C:\\Windows\\System32\\Scregedit.wsf \/ar 0<\/p>\n<p>    This enables the Remote Desktop for Administration mode to accept connections.<\/p>\n<p>    On another computer, click Start, click Run, type mstsc, and then click OK.<\/p>\n<p>    In Computer, enter the name of the server that is in Server Core mode, and click Connect.<\/p>\n<p>    Log on using an administrator account.<\/p>\n<p>    When the command prompt appears, you can manage the computer using the Windows command-line tools.<\/p>\n<p>    When you have finished remotely managing the Server Core computer, type logoff in the command prompt to end your Remote Desktop session<\/p>\n<p>noteNote<br \/>\nIf 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<\/p>\n<p>1.5 Switch to Server with a GUI mode<\/p>\n<p>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.<br \/>\nTo convert from Server Core mode to Server with a GUI mode when the server was initially installed in Server with a GUI mode<\/p>\n<p>    Run Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell \u2013Restart<\/p>\n<p>To convert from Server Core mode to Server with a GUI mode when the server was initially installed in Server Core mode<\/p>\n<p>    Determine the index number for a Server with a GUI image (for example, SERVERDATACENTER, not SERVERDATACENTERCORE) using this cmdlet: Get-WindowsImage -ImagePath <path to wim>\\install.wim<\/p>\n<p>    Run Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell \u2013Restart \u2013Source wim:<path to wim>\\install.wim:<Index # from step 1><\/p>\n<p>    Alternatively, if you want to use Windows Update as the source instead of a WIM file, use this Windows PowerShell cmdlet:<\/p>\n<p>    Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell \u2013Restart<\/p>\n<p>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<br \/>\n1.6 Add hardware and manage drivers locally<br \/>\nTo add hardware to a server in Server Core mode<\/p>\n<p>    Follow the instructions provided by the hardware vendor for installing new hardware:<br \/>\n        If the driver for the hardware is included in Windows Server 2012, Plug and Play will start and install the driver.<\/p>\n<p>        If the driver for the hardware is not included, proceed with the steps 2 and 3.<\/p>\n<p>    Copy the driver files to a temporary folder on the server running a Server Core installation.<\/p>\n<p>    At a command prompt, open the folder where the driver files are located, and then run the following command:<\/p>\n<p>    pnputil \u2013i \u2013a <driverinf><\/p>\n<p>    Where:<\/p>\n<p>    driverinf is the file name of the .inf file for the driver.<\/p>\n<p>    If prompted, restart the computer.<\/p>\n<p>To obtain a list of drivers that are installed<\/p>\n<p>    At a command prompt, run<\/p>\n<p>    sc query type= driver<\/p>\n<p>noteNote<br \/>\nYou must include the space after the equal sign for the command to complete successfully.<\/p>\n<p>To disable a device driver<\/p>\n<p>    At a command prompt, run<\/p>\n<p>    sc delete <service_name><\/p>\n<p>    Where:<\/p>\n<p>    service_name is the name of the service that you obtain by running sc query type= driver<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This topic includes sample Windows PowerShell cmdlets that you can use to automate some of the procedures described. For more information, see Using Cmdlets.<\/p>\n<p>1.1. Manage updates automatically with Windows Update<\/p>\n<p>To verify the current Windows Update setting, at a command prompt, run the following command:<\/p>\n<p>Cscript scregedit.wsf \/AU \/v<\/p>\n<p>To enable automatic updates, run [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2337"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2337"}],"version-history":[{"count":10,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2337\/revisions"}],"predecessor-version":[{"id":2355,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2337\/revisions\/2355"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}