{"id":1450,"date":"2015-05-24T14:22:57","date_gmt":"2015-05-24T13:22:57","guid":{"rendered":"http:\/\/emtunc.org\/blog\/?p=1450"},"modified":"2017-02-24T15:22:42","modified_gmt":"2017-02-24T15:22:42","slug":"downloading-the-latest-malwarebytes-definitions-file-for-offline-use-with-powershell","status":"publish","type":"post","link":"https:\/\/emtunc.org\/blog\/05\/2015\/downloading-the-latest-malwarebytes-definitions-file-for-offline-use-with-powershell\/","title":{"rendered":"Downloading the Latest Malwarebytes Definitions File for Offline Use with PowerShell"},"content":{"rendered":"<p>Looking through my blog stats I saw that one of my old articles was still getting a lot of views &#8211; the one about <a href=\"http:\/\/emtunc.org\/blog\/03\/2011\/downloading-the-latest-malwarebytes-definitions-file-for-offline-use\/\" target=\"_blank\">downloading an offline copy of the Malwarebytes definitions file<\/a>.<\/p>\n<p>I decided to write a quick\u00a0<em>version 2<\/em> of the script so that it can now run natively in PowerShell without any third party tools (wget) &#8211; it&#8217;s also easier to understand and slightly more elegant only requiring four lines to do the job.<\/p>\n<p><!--more--><\/p>\n<pre class=\"lang:default decode:true \">$version = Invoke-WebRequest -URI http:\/\/data-cdn.mbamupdates.com\/v0\/database\/version.check\r\n$defrules = \"http:\/\/data-cdn.mbamupdates.com\/v0\/database\/data\/rules\" + \".\" +$version.Content + \".ref\"\r\n$destination = \"rules.ref\"\r\nInvoke-WebRequest $defrules -OutFile $destination<\/pre>\n<p>Without any modifications, this will save the rules.ref file in the same directory the script is run from.<\/p>\n<p>Download the script below or simply copy the code above and paste it in a new file with the .ps1 extension.<\/p>\n<p>Download: <a href=\"http:\/\/emtunc.org\/blog\/wp-content\/uploads\/2015\/05\/MBAM-Offline-Definitions-v1.zip\">MBAM-Offline-Definitions-v1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking through my blog stats I saw that one of my old articles was still getting a lot of views &#8211; the one about downloading an offline copy of the Malwarebytes definitions file. I decided to write a quick\u00a0version 2 of the script so that it can now run natively in PowerShell without any third [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[1],"tags":[6,42],"class_list":["post-1450","post","type-post","status-publish","format-standard","hentry","category-tech","tag-malwarebytes","tag-powershell"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1trTO-no","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/1450","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/comments?post=1450"}],"version-history":[{"count":5,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/1450\/revisions"}],"predecessor-version":[{"id":2484,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/posts\/1450\/revisions\/2484"}],"wp:attachment":[{"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/media?parent=1450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/categories?post=1450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emtunc.org\/blog\/wp-json\/wp\/v2\/tags?post=1450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}