{"id":2780,"date":"2014-02-09T18:13:03","date_gmt":"2014-02-09T10:13:03","guid":{"rendered":"http:\/\/rmohan.com\/?p=2780"},"modified":"2014-02-09T18:32:13","modified_gmt":"2014-02-09T10:32:13","slug":"sconfig","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2780","title":{"rendered":"SCONFIG CLI TOOL 2012"},"content":{"rendered":"<p><span style=\"line-height: 1.5em;\">Besides sconfig.cmd, you have the full arsenal of command line tools available on Server Core. You can quickly change the most rudimentary settings with sconfig.cmd, but if you want to configure your server using scripts, you can still perform most of these actions through the usual suspects netdom.exe (to change the hostname and join an Active Directory domain), netsh.exe (to change IP addressing), and net.exe (to add or remove user accounts).<\/span><\/p>\n<p>Of course, with the built-in command line tools, you can also configure settings beyond sconfig.cmd, like the Windows firewall (netsh), driver installation (pnputil and drvinst), RAID volumes (diskraid), and services (sc).<\/p>\n<p>For networking troubleshooting, arp, nbtstat, netstat, ping, pathping, route, and tracert are available. For file handling, you can put cacls, icacls, attrib, cipher, compact, expand, takeown, and robocopy to good use. Need to claim disk space on other drives? Slap on some diskpart, format, fsutil, and label. Defrag often, unless you\u2019re running on SSDs. Lost? No worries. Simply use hostname and whoami to get you sorted. And I\u2019m still leaving half of the tools out.<\/p>\n<p>Of course, between a Server with a GUI installation and a Server Core installation, some command line tools are missing. Most notably, ServerManagerCmd.exe is not available on Server Core, since the whole of Server Manager is not available.<\/p>\n<p>&nbsp;<\/p>\n<p>Pretty scary, if you&#8217;re not used to CLI tools.<\/p>\n<p>BTW, it&#8217;s not that Server Core cannot run GUI-based tools. In fact, there are a bunch of tools that still run fine on Core, such as Task Manager, Notepad, Regedit, and a couple of Control Panel Applets. In addition, you may be able to run many 3rd-party software such as Mozilla Firefox and others. In addition, the management tasks for Server Core can be performed remotely by using GUI-based MMC Snap-Ins, as long\u00a0as you initially configure the machine with a proper IP address, add it to a domain (if needed) and open the correct Firewall rules and ports.<\/p>\n<p>Luckily for us, most of this pain has been solved by usage of the either manually created scripts, 3rd-party graphical user interface tools, and lately in R2 &#8211; the\u00a0<strong>SCONFIG\u00a0<\/strong>tool.<\/p>\n<p>SCONFIG was initially developed for Microsoft Hyper-V Server 2008, a free virtualization platform that is based on Windows Server 2008 RTM Core and that has the Hyper-V role pre-installed. There have been clients who have gone ahead and copied the script onto their Core installations on other machines. Since then, SCONFIG was made a\u00a0 part of the R2 release of Windows Server 2008.<\/p>\n<p>With SCONFIG you can manage many aspects of the Server Core machine. SCONFIG dramatically eases server configuration for Windows Server 2008 R2 core deployments. With SCONFIG, you can easily set your system up, get it on the network so you can easily manage the server remotely.<\/p>\n<p>Note that SCONFIG is also localized in almost 20 languages.<\/p>\n<p>To run SCONFIG\u00a0<strong>simply enter\u00a0<em>sconfig.cmd<\/em>\u00a0<\/strong>in the command prompt window, and press Enter.<a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_2-590x349.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2781\" alt=\"sconfig_on_server_core_2-590x349\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_2-590x349.png\" width=\"590\" height=\"349\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_2-590x349.png 590w, https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_2-590x349-300x177.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_2-590x349-150x88.png 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_2-590x349-400x236.png 400w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>avigation through SCONFIG&#8217;s options is done by typing a number or letter representing the correct configuration or information option. These tasks include:<\/p>\n<p>1) Join a Domain\/Workgroup<br \/>\n2) Change Computer Name<br \/>\n3) Add Local Administrator<br \/>\n4) Configure\/disable Remote Management<br \/>\n5) Windows Update Settings<br \/>\n6) Download and Install Updates<br \/>\n7) Enable\/disable Remote Desktop<br \/>\n8) View\/change Network Settings<br \/>\n9) View\/change Date and Time<br \/>\n10) Log Off User<br \/>\n11) Restart Server<br \/>\n12) Shut Down Server<br \/>\n13) Exit to Command Line<\/p>\n<p>For example, to\u00a0<strong>enable remote management of the machine<\/strong>, one would:<\/p>\n<p><strong>Press 2<\/strong>\u00a0to configure a computer name.\u00a0<strong>Reboot<\/strong>.<a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_3-590x349.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2782\" alt=\"sconfig_on_server_core_3-590x349\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_3-590x349.png\" width=\"590\" height=\"349\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_3-590x349.png 590w, https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_3-590x349-300x177.png 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_3-590x349-150x88.png 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2014\/02\/sconfig_on_server_core_3-590x349-400x236.png 400w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Besides sconfig.cmd, you have the full arsenal of command line tools available on Server Core. You can quickly change the most rudimentary settings with sconfig.cmd, but if you want to configure your server using scripts, you can still perform most of these actions through the usual suspects netdom.exe (to change the hostname and join an [&#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\/2780"}],"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=2780"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2780\/revisions"}],"predecessor-version":[{"id":2785,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2780\/revisions\/2785"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}