{"id":12058,"date":"2016-05-09T15:54:06","date_gmt":"2016-05-09T23:54:06","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/?p=12058"},"modified":"2019-02-18T12:38:15","modified_gmt":"2019-02-18T19:38:15","slug":"new-security-cmdlets-in-nano-server","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/new-security-cmdlets-in-nano-server\/","title":{"rendered":"New Security Cmdlets in Nano Server"},"content":{"rendered":"<p>In Windows Server 2016 TP5, we included two new cmdlets to help manage security policy settings. While they are present on every install option of Windows Server, these are mostly useful on Nano Server because <a href=\"https:\/\/blogs.technet.microsoft.com\/grouppolicy\/2016\/05\/09\/configuration-management-on-servers\">Nano Server does not support Group Policy<\/a>.<\/p>\n<p>Security-related settings include two different kinds of artifacts.<\/p>\n<p>\u2022         .INF files containing security policy template settings. These are handled by the &#8220;securityCmdlets&#8221;(*) module that ships in Technical Preview 5<\/p>\n<p>\u2022         .CSV files containing advanced audit settings. these are handled by the &#8220;securityCmdlets&#8221;(*) module that ships in Technical Preview 5<\/p>\n<\/p>\n<p>(*) &#8211;  &#8220;securityCmdlets&#8221; is a temporary name for TP5. These modules will be renamed in a later release of Windows Server, which will be a breaking change. Please be aware any scripts that use this module will have to change for future releases of Windows Server 2016.<\/p>\n<\/p>\n<p>.INF files can be generated by <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/hh875548.aspx\">SecEdit.exe<\/a> on a Server with Desktop Experience or Server Core installation, or they can be generated with Backup-SecurityPolicy.<\/p>\n<\/p>\n<p>.CSV files can be generated by <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/cc731451.aspx\">AuditPol.exe<\/a> on a Server with Desktop Experience or Server Core installation, or they can be generated with Backup-AuditPolicy.<\/p>\n<p>You can remotely invoke the following to import both advanced audit and security template settings to your Nano Server installation:<\/p>\n<div class=\"highlight highlight-source-powershell\">\n<pre>    <span class=\"pl-c1\">Import-Module<\/span> SecurityCmdlets\n\n    <span class=\"pl-c\">#replace this string with the path to the .INF file<\/span>\n\n    <span class=\"pl-k\">$<\/span><span class=\"pl-smi\">SecInf<\/span> <span class=\"pl-k\">=<\/span> <span class=\"pl-s\">\"c:\\GPO\\DomainSysvol\\GPO\\Machine\\microsoft\\windows nt\\SecEdit\\GptTmpl.inf\"<\/span>\n\n    <span class=\"pl-k\">$<\/span><span class=\"pl-smi\">AuditCsv<\/span> <span class=\"pl-k\">=<\/span> <span class=\"pl-s\">\"c:\\GPO\\DomainSysvol\\GPO\\Machine\\microsoft\\windows nt\\Audit\\audit.csv\"<\/span>\n\n     \n\n    <span class=\"pl-c1\">Restore-SecurityPolicy<\/span> <span class=\"pl-k\">-<\/span>Path <span class=\"pl-k\">$<\/span><span class=\"pl-smi\">secInf<\/span>\n\n    <span class=\"pl-c1\">Restore-AuditPolicy<\/span> <span class=\"pl-k\">-<\/span>Path <span class=\"pl-k\">$<\/span><span class=\"pl-smi\">auditCsv<\/span><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In Windows Server 2016 TP5, we included two new cmdlets to help manage security policy settings. While they are present on every install option of Windows Server, these are mostly useful on Nano Server because Nano Server does not support Group Policy. Security-related settings include two different kinds of artifacts. \u2022 .INF files containing security [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[223],"class_list":["post-12058","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-news"],"acf":[],"blog_post_summary":"<p>In Windows Server 2016 TP5, we included two new cmdlets to help manage security policy settings. While they are present on every install option of Windows Server, these are mostly useful on Nano Server because Nano Server does not support Group Policy. Security-related settings include two different kinds of artifacts. \u2022 .INF files containing security [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/12058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=12058"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/12058\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=12058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=12058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=12058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}