{"id":1101,"date":"2021-06-08T05:40:30","date_gmt":"2021-06-08T05:40:30","guid":{"rendered":"https:\/\/www.velaninfo.com\/rs\/?post_type=techtips&#038;p=1101"},"modified":"2021-06-08T06:16:03","modified_gmt":"2021-06-08T06:16:03","slug":"how-to-use-wmi-and-powershell","status":"publish","type":"techtips","link":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/","title":{"rendered":"How to use WMI and PowerShell to check drive free space on Windows?"},"content":{"rendered":"<p><strong>Access-based Enumeration (ABE)\u00a0<\/strong>hide the objects (files and folders) from users who don\u2019t have NTFS permissions on a network shared folder.<\/p>\n<p>Access-based Enumeration (<strong>ABE<\/strong>) checks access permissions on file system objects before the user receives a list of the folder contents. All inaccessible resources are simply not displayed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1102\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-1.png\" alt=\"Access-based Enumeration \" width=\"451\" height=\"304\" \/><\/p>\n<p>And for a user from another department, e. g., IT department (which is included in another Windows security group), a different list of subfolders is shown. In addition to the Public and Warehouse directories, this user sees 5 more directories in the same network folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1103\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-2.png\" alt=\"Windows security group\" width=\"451\" height=\"325\" \/><\/p>\n<p><strong>Access-Based Enumeration Restrictions. Access-based Enumeration on Windows doesn\u2019t work in the following cases:<\/strong><\/p>\n<ol>\n<li>Windows XP or Windows Server 2003 without Service Pack 1 as a file server;<\/li>\n<li>Viewing from local server<\/li>\n<li>Administrators group with full access<\/li>\n<\/ol>\n<p><strong>Enabling ABE on Windows Server 2008\/ 2008 R2<\/strong><\/p>\n<p>Windows Server 2008\/R2 to enable the Access Based Enumeration option no additional components need to be installed, The ABE management feature is already built into the Windows GUI. To activate Access-based Enumeration for a specific folder in Windows Server 2008\/2008 R2, go to the MMC management console\u00a0<strong>Share and Storage Management<\/strong>\u00a0(Start \u2013&gt; Programs \u2013&gt; Administrative Tools -&gt; Share and Storage Management). Check to the properties of the necessary share. Please go to the\u00a0<strong>Advanced<\/strong>\u00a0settings and verify<strong>\u00a0Enable access-based enumeration<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1104\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-3-1.png\" alt=\"Enable access-based enumeration\" width=\"536\" height=\"493\" \/><\/p>\n<p><strong>Enable the option Activate Access-based Enumeration on Windows Server 2012 R2\/ 2016<\/strong><\/p>\n<p>ABE configuration in the Windows Server 2012 R2 \/ 2016 is also very easy. To activate ABE in Windows Server 2012, we have to install\u00a0<strong>File and Storage Services role<\/strong>, after installation go to the share properties in the Server Manager.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1105\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-4-1.png\" alt=\"File and Storage Services role\" width=\"542\" height=\"250\" \/><\/p>\n<p>In\u00a0<strong>Settings\u00a0section\u00a0<\/strong>check the option\u00a0<strong>enable access-based enumeration<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1106\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-5-1.png\" alt=\"enable access-based enumeration\" width=\"563\" height=\"208\" \/><\/p>\n<p><strong>HandlingAccess Based Enumeration Using PowerShell<\/strong><\/p>\n<p>We can use the <a href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/windows-process-with-powershell\/\"><strong>SMBShare PowerShell module in Windows<\/strong><\/a> 10\/ 8.1 and Windows Server 2016\/2012 R2 to handle the settings of Access Based Enumeration for required folders. Let us list the details of a specific shared folder:<\/p>\n<p>Get-SmbShareInstall|fl *<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1107\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-6-1.png\" alt=\"HandlingAccess Based Enumeration Using PowerShell\" width=\"673\" height=\"368\" \/><\/p>\n<p>The value of the\u00a0<strong>FolderEnumerationMode<\/strong>\u00a0attribute. In this case, its showing the value is\u00a0<strong>Unrestricted<\/strong>. Which means that ABE is disabled for this folder. Also we can check the status of ABE for all shared folders of the server:<\/p>\n<p>Get-SmbShare | Select-Object Name,FolderEnumerationMode<\/p>\n<p><strong>To activate ABE for a specific folder:<\/strong><\/p>\n<p>Get-SmbShare Install | Set-SmbShare -FolderEnumerationModeAccessBased<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1108\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-7-1.png\" alt=\"To activate ABE for a specific folder\" width=\"672\" height=\"104\" \/><\/p>\n<p>You can activate Access Based Enumeration for all published network folders.<\/p>\n<p><strong>To disable ABE use the command:<\/strong><\/p>\n<p>Get-SmbShare Install | Set-SmbShare -FolderEnumerationMode Unrestricted<\/p>\n<p>At<strong> Velan<\/strong>, our server support engineers can help you with core features on your server.\u00a0If you are interested in our service, please fill the Quick connect form to <a href=\"https:\/\/www.velaninfo.com\/contact\"><strong>get in touch with us<\/strong><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Access-based Enumeration (ABE)\u00a0hide the objects (files and folders) from users who don\u2019t have NTFS permissions on a network shared folder. Access-based Enumeration (ABE) checks access permissions on file system objects before the user receives a list of the folder contents. All inaccessible resources are simply not displayed. And for a user from another department, e&#8230;.<a class=\"continue-reading text-uppercase\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/\"> Continue Reading <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/themes\/velaninfo\/images\/reading_arw.png\" alt=\"Continue Reading\" width=\"16\" height=\"12\"\/><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[],"class_list":["post-1101","techtips","type-techtips","status-publish","hentry","Categories_tech_tip-core-server-windows","Categories_tech_tip-server-windows","Categories_tech_tip-windows","Categories_tech_tip-wmi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.5 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to use WMI and Windows Powershell Version | Velan<\/title>\n<meta name=\"description\" content=\"what is Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tool\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use WMI and PowerShell to check drive free space on Windows?\" \/>\n<meta property=\"og:description\" content=\"what is Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tool\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"Velan\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-08T06:16:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/\",\"name\":\"How to use WMI and Windows Powershell Version | Velan\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Untitled-1.png\",\"datePublished\":\"2021-06-08T05:40:30+00:00\",\"dateModified\":\"2021-06-08T06:16:03+00:00\",\"description\":\"what is Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tool\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Untitled-1.png\",\"contentUrl\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Untitled-1.png\",\"width\":451,\"height\":304,\"caption\":\"Access-based Enumeration\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/how-to-use-wmi-and-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tech Tips\",\"item\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/techtips\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to use WMI and PowerShell to check drive free space on Windows?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/#website\",\"url\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/\",\"name\":\"Velan\",\"description\":\"Velaninfo Services India Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.velaninfo.com\\\/rs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to use WMI and Windows Powershell Version | Velan","description":"what is Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tool","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/","og_locale":"en_US","og_type":"article","og_title":"How to use WMI and PowerShell to check drive free space on Windows?","og_description":"what is Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tool","og_url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/","og_site_name":"Velan","article_modified_time":"2021-06-08T06:16:03+00:00","og_image":[{"url":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-1.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/","url":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/","name":"How to use WMI and Windows Powershell Version | Velan","isPartOf":{"@id":"https:\/\/www.velaninfo.com\/rs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/#primaryimage"},"image":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-1.png","datePublished":"2021-06-08T05:40:30+00:00","dateModified":"2021-06-08T06:16:03+00:00","description":"what is Windows Management Instrumentation (WMI) is a subsystem of PowerShell that gives admins access to powerful system monitoring tool","breadcrumb":{"@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/#primaryimage","url":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-1.png","contentUrl":"https:\/\/www.velaninfo.com\/rs\/wp-content\/uploads\/2021\/06\/Untitled-1.png","width":451,"height":304,"caption":"Access-based Enumeration"},{"@type":"BreadcrumbList","@id":"https:\/\/www.velaninfo.com\/rs\/techtips\/how-to-use-wmi-and-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.velaninfo.com\/rs\/"},{"@type":"ListItem","position":2,"name":"Tech Tips","item":"https:\/\/www.velaninfo.com\/rs\/techtips\/"},{"@type":"ListItem","position":3,"name":"How to use WMI and PowerShell to check drive free space on Windows?"}]},{"@type":"WebSite","@id":"https:\/\/www.velaninfo.com\/rs\/#website","url":"https:\/\/www.velaninfo.com\/rs\/","name":"Velan","description":"Velaninfo Services India Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.velaninfo.com\/rs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips"}],"about":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/types\/techtips"}],"author":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/comments?post=1101"}],"version-history":[{"count":1,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1101\/revisions"}],"predecessor-version":[{"id":1109,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/techtips\/1101\/revisions\/1109"}],"wp:attachment":[{"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/media?parent=1101"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.velaninfo.com\/rs\/wp-json\/wp\/v2\/tags?post=1101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}