{"id":418,"date":"2017-10-11T06:59:58","date_gmt":"2017-10-11T06:59:58","guid":{"rendered":"http:\/\/michaelstoica.com\/?p=418"},"modified":"2019-05-17T17:07:46","modified_gmt":"2019-05-17T17:07:46","slug":"configure-windows-server-2016-core-with-powershell","status":"publish","type":"post","link":"https:\/\/michaelstoica.com\/site\/configure-windows-server-2016-core-with-powershell\/","title":{"rendered":"Configure Windows Server 2016 Core with Powershell"},"content":{"rendered":"<p>In the past few weeks I\u2019ve worked a lot with Windows Server 2016 Core, which as you might know, doesn\u2019t have any GUI. You can do all the configurations (network configuration, domain join, rename computer, firewall settings, remote desktop settings) using sconfig or Powershell.<\/p>\n<p>In this article, I\u2019m going to walk you through the Powershell commands that you can use to configure your Windows Server Core.<\/p>\n<p>Before starting any configuration, you might want to enable remote desktop on the server, instead of working on it via iDRAC (if it\u2019s physical machine) or from the virtualization console.<\/p>\n<p>To enable remote desktop use the command: <em>Cscript %windir%\\system32\\SCRegEdit.wsf \/ar 0.<\/em><\/p>\n<p>Next, run the <em>Get-NetAdapter<\/em> command to identify the network card name so that you can configure it with the correct IP settings.<\/p>\n<p>After that you can configure the IP settings using the following commands:<\/p>\n<p><em>New-NetIpAddress -InterfaceAlias &#8220;NIC1&#8221; -IPAddress 10.0.10.10 \u00a0-PrefixLength 24 -DefaultGateway 10.0.10.1<\/em><\/p>\n<p><em>Set-DNSClientServerAddress -InterfaceAlias &#8220;NIC1&#8221; -ServerAddress 10.0.10.2<\/em><\/p>\n<p>If your installation is on a physical computer you might also need to configure NIC Teaming, which can be done using the following command:<\/p>\n<p><em>New-NetLbfoTeam -Name TeamTest NIC1,NIC2 -TeamingMode SwitchIndependent -LoadBalancingAlthorithm Dynamic <\/em><\/p>\n<p>The following command will set the VLAN on the NIC Team:<\/p>\n<p><em>Set-NetLbfoTeamNic -Team \u201cTeamTest\u201d -VLANID 100<\/em><\/p>\n<p>Next you can check the Windows Firewall status using <em>Get-NetFirewallProfile <\/em>and you can disable it running <em>Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False<\/em>.<\/p>\n<p>Now you can add your computer to domain and also rename it using the following commands:<\/p>\n<p><em>Add-Computer -DomainName test.internal -Credential test\\administrator<\/em><\/p>\n<p><em>Rename-Computer -NewName Server01<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the past few weeks I\u2019ve worked a lot with Windows Server 2016 Core, which as you might know, doesn\u2019t have any GUI. You can&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/michaelstoica.com\/site\/configure-windows-server-2016-core-with-powershell\/\">Continue reading<span class=\"screen-reader-text\">Configure Windows Server 2016 Core with Powershell<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[10,9,19],"class_list":["post-418","post","type-post","status-publish","format-standard","hentry","category-general","tag-powershell","tag-windows-server","tag-windows-server-2016","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p63Lge-6K","_links":{"self":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/comments?post=418"}],"version-history":[{"count":2,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":602,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/posts\/418\/revisions\/602"}],"wp:attachment":[{"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelstoica.com\/site\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}