{"id":1610,"date":"2014-04-14T00:01:00","date_gmt":"2014-04-14T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2014\/04\/14\/windows-8-1-and-the-land-of-forgotten-modules-part-1\/"},"modified":"2014-04-14T00:01:00","modified_gmt":"2014-04-14T00:01:00","slug":"windows-8-1-and-the-land-of-forgotten-modules-part-1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/windows-8-1-and-the-land-of-forgotten-modules-part-1\/","title":{"rendered":"Windows 8.1 and the Land of Forgotten Modules: Part 1"},"content":{"rendered":"<p><b>Summary<\/b>: Explore and discover the additional Windows PowerShell modules in Windows&nbsp;8.1.<\/p>\n<p>Honorary Scripting Guy, Sean Kearney, is here this week to have a little interesting fun. We&rsquo;re going to dive undercover and take a look at some of the additional modules that are built-in to Windows&nbsp;8.1 that you may not be aware of. Or possibly you were, but you&rsquo;re like me&mdash;you looked at that big pile of modules and had one word to say: &ldquo;Whoa!&rdquo;<\/p>\n<p>Or if you were Ed, it would be, &ldquo;Whoa! Dude!&rdquo;<\/p>\n<p>But today I had some time to play about, and I decided to see what each module could do&mdash;or what it might do.<\/p>\n<p>Last week we played with some of the Network modules. I envy my former coworkers at McKesson Canada who probably get to use these every day now! To review the series, start with <a href=\"https:\/\/devblogs.microsoft.com\/scripting\/windows-server-2012-r2-network-cmdlets-part-1\/\" target=\"_blank\">Windows Server 2012 R2 Network Cmdlets: Part&nbsp;1<\/a>.<\/p>\n<p>Today I opened the hood and found a few modules that I was curious about. There are some that you might not have realized there are now cmdlets for. For example, I did not know I could easily adjust the settings in the built-in Windows Search with Windows PowerShell. The module is called <b>WindowsSearch<\/b>, and it has two simple cmdlets:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2477.1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2477.1.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>Running the <b>Get-WindowsSearchSetting<\/b> will show me how my Windows Search is presently configured.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1754.2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1754.2.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>So if you needed to quickly tweak a computer to not get web results in the search, you can do this in Windows PowerShell:<\/p>\n<p style=\"margin-left:30px\">Set-WindowsSearchSetting &ndash;EnableWebResultsSetting $FALSE<\/p>\n<p>Or if you&rsquo;d like to ensure that there are web results, but the Safe Search settings are cranked up for kids or employees who tend to play Angry Birds too much:<\/p>\n<p style=\"margin-left:30px\">Set-WindowsSearchSetting &ndash;EnableWebResultsSetting $TRUE &ndash;SafeSearchSetting Strict<\/p>\n<p>These settings are per user, so they don&rsquo;t require elevation to run them. So it&rsquo;s a pretty simple module, but it meets the task nicely.<\/p>\n<p>Digging down further&hellip;<\/p>\n<p>I didn&rsquo;t realize we have a module for Windows Defender! There are actually quite a few cmdlets supplied with this one:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4213.3.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4213.3.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>Right off the bat, here are some pretty cool ones that you could leverage on a home computer. Let&rsquo;s imagine you have Windows Defender configured just the way you like it on a computer. If only there was an easy way to carry those settings and put them on a new machine. Hmmmm&hellip;<\/p>\n<p>With Windows&nbsp;8.1, we can execute the <b>Get-MPPreference<\/b> cmdlet to see those settings:<\/p>\n<p style=\"margin-left:30px\">Get-MPPreference | Export-CLIXML C:\\DefenderSettings.XML<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8311.4.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8311.4.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>On a new Windows&nbsp;8.1 workstation at a client&rsquo;s home, you could preconfigure Windows Defender by using your DefenderSettings.xml file to get your original settings:<\/p>\n<p style=\"margin-left:30px\">$Settings = Import-CLIXML C:\\DefenderSettings.XML<\/p>\n<p style=\"margin-left:30px\">Set-MPPreference &ndash;UILockdown $Settings.UILockdown<\/p>\n<p style=\"margin-left:30px\">Set-MPPreference &ndash;ExclusionPath $Settings.ExclusionPath<\/p>\n<p>Did you know you can list all of the viruses and malware that Windows Defender is aware of?<\/p>\n<p style=\"margin-left:30px\">Get-MPThreatCatalog | Format-Table<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1563.5.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1563.5.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>You could export that list to a CSV file like this:<\/p>\n<p style=\"margin-left:30px\">Get-MPThreatCatalog | Export-CSV C:\\BadGuys.csv<\/p>\n<p>You could even force an immediate update of antivirus and force a scan on the workstation from Windows PowerShell with this module:<\/p>\n<p style=\"margin-left:30px\">Update-MPSignature<\/p>\n<p style=\"margin-left:30px\">Start-MPScan<\/p>\n<p>If I was managing small business machines, I can immediately see where this free module would be handy! I could have a script to do all the work, and then run this cmdlet at the end to give me a report:<\/p>\n<p style=\"margin-left:30px\">Get-MPComputerStatus<\/p>\n<p>Pop back in tomorrow. We&rsquo;ll spend a little more time under the hood to see what other modules Windows PowerShell and Windows&nbsp;8.1 have hidden for us!<\/p>\n<p>I invite you to follow The Scripting Guys on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send an email to The Scripting Guys at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then remember eat your cmdlets each and every day with a taste dash of creativity.<\/p>\n<p><b>Sean Kearney, <\/b>Windows PowerShell MVP and Honorary Scripting Guy&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Explore and discover the additional Windows PowerShell modules in Windows&nbsp;8.1. Honorary Scripting Guy, Sean Kearney, is here this week to have a little interesting fun. We&rsquo;re going to dive undercover and take a look at some of the additional modules that are built-in to Windows&nbsp;8.1 that you may not be aware of. Or possibly [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[56,154,45],"class_list":["post-1610","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-guest-blogger","tag-sean-kearney","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Explore and discover the additional Windows PowerShell modules in Windows&nbsp;8.1. Honorary Scripting Guy, Sean Kearney, is here this week to have a little interesting fun. We&rsquo;re going to dive undercover and take a look at some of the additional modules that are built-in to Windows&nbsp;8.1 that you may not be aware of. Or possibly [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/1610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=1610"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/1610\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=1610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=1610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=1610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}