{"id":2737,"date":"2013-10-13T00:01:00","date_gmt":"2013-10-13T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/10\/13\/the-admins-first-steps-discovering-shares\/"},"modified":"2013-10-13T00:01:00","modified_gmt":"2013-10-13T00:01:00","slug":"the-admins-first-steps-discovering-shares","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/the-admins-first-steps-discovering-shares\/","title":{"rendered":"The Admin&#8217;s First Steps: Discovering Shares"},"content":{"rendered":"<p><strong>Summary<\/strong>: Richard Siddaway talks about using Windows PowerShell to discover shares on remote systems.\n<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;Hey, Scripting Guy! I&rsquo;ve just starting using Windows PowerShell to administer my systems, and I&rsquo;ve been asked to discover the shares on some remote servers. How can I do that?\n&mdash;OL\n<img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;Hello OL,\nHonorary Scripting Guy, Richard Siddaway, here today&mdash;filling in for my good friend, The Scripting Guy. You&rsquo;re in luck because today I&rsquo;ve got a solution to that issue as part of my series of posts about how an administrator can start making productive use of Windows PowerShell.\nIf you ask an IT-related question, you&rsquo;ll often get the answer, &ldquo;It depends.&rdquo;\nIn the case of asking how you can discover the shares that are enabled on a remote machine, the full answer is, &ldquo;It depends on the version of Windows you are running. If you have Windows&nbsp;8 or Windows Server&nbsp;2012, you get a shiny new module to play with that does the hard work for you. If you are using, or targeting, earlier versions of Windows, you will have to use WMI.&rdquo;\nWindows&nbsp;8 and Windows Server&nbsp;2012 ship with PowerShell&nbsp;3.0 and a suite of extra modules. Many of these modules are created by using the &ldquo;cmdlets-over-objects&rdquo; technology, which means that you take a WMI class, wrap it in XML, and you get a PowerShell module. Details of how to create your own CDXML modules are provided in my book, <a href=\"http:\/\/www.manning.com\/search\/results?cx=008207406337866288189%3Avej9zumcdec&amp;cof=FORID%3A9&amp;ie=UTF-8&amp;q=PowerShell+and+WMI&amp;sa=Search\" target=\"_blank\">PowerShell and WMI<\/a>.\nYou can easily tell if your module has been constructed in this manner because it will have a .cdxml extension. In many instances, the WMI classes that are used for this process are new to Windows&nbsp;8 and Windows Server&nbsp;2012, and they are not available on earlier versions of Windows&mdash;even if you install Windows PowerShell&nbsp;3.0.\nThe cmdlets are in a module called <strong>SmbShare<\/strong>. If you use <strong>Get-SmbShare<\/strong>, you see this output on a Windows&nbsp;8-based computer:<\/p>\n<p style=\"padding-left: 30px\">&pound;&gt; Get-SmbShare | Format-Table -AutoSize<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp; ScopeName Path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp; &#8212;&#8212;&#8212; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211;<\/p>\n<p style=\"padding-left: 30px\">ADMIN$ *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:Windows Remote Admin<\/p>\n<p style=\"padding-left: 30px\">C$&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default share<\/p>\n<p style=\"padding-left: 30px\">D$&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; D:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default share<\/p>\n<p style=\"padding-left: 30px\">IPC$&nbsp; &nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remote IPC<\/p>\n<p style=\"padding-left: 30px\">Users&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:Users\nThis is for the local machine, but more importantly, you need to be able to administer your remote servers. Let&rsquo;s look at the parameters that are available with <strong>Get-SmbShare<\/strong>:<\/p>\n<p style=\"padding-left: 30px\">&pound;&gt; Get-Command&nbsp; Get-SmbShare&nbsp; -Syntax<\/p>\n<p style=\"padding-left: 30px\">Get-SmbShare [[-Name] &lt;string[]&gt;] [[-ScopeName] &lt;string[]&gt;] [-Scoped &lt;bool[]&gt;] [-Special &lt;bool[]&gt;]<\/p>\n<p style=\"padding-left: 30px\">[-ContinuouslyAvailable &lt;bool[]&gt;] [-ShareState &lt;ShareState[]&gt;] [-FolderEnumerationMode &lt;FolderEnumerationMode[]&gt;] [-CachingMode &lt;CachingMode[]&gt;] [-ConcurrentUserLimit &lt;uint32[]&gt;] [-AvailabilityType &lt;AvailabilityType[]&gt;] [-CaTimeout&lt;uint32[]&gt;] [-EncryptData &lt;bool[]&gt;] [-IncludeHidden] [-CimSession &lt;CimSession[]&gt;] [-ThrottleLimit &lt;int&gt;] [-AsJob][&lt;CommonParameters&gt;]\nYou will notice one glaring omission. There isn&rsquo;t a <strong>ComputerName<\/strong> parameter. One of the quirks of CDXML-based modules is that you need to use CIM sessions to access remote machines (or run the command over a Windows PowerShell remoting session).<\/p>\n<p style=\"padding-left: 30px\">$sess = New-CimSession -ComputerName Win12R2<\/p>\n<p style=\"padding-left: 30px\">Get-SmbShare -CimSession $sess<\/p>\n<p style=\"padding-left: 30px\">$sess | Remove-CimSession\nYou will automatically get <strong>PSComputerName<\/strong> output as an additional property. If you try to run this against an earlier version of Windows with Windows PowerShell&nbsp;2.0, it will fail because you need WSMAN&nbsp;3.0 on the remote system to use CIM sessions.\nThe older versions of Windows can&rsquo;t be left out of this, so you need to look at another way of retrieving the data. WMI supplies a <strong>Win32_Share<\/strong> class that you can use:<\/p>\n<p style=\"padding-left: 30px\">&pound;&gt; Get-WmiObject -Class Win32_Share | Format-Table -AutoSize<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp; Path&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp; &#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211;<\/p>\n<p style=\"padding-left: 30px\">ADMIN$ C:Windows Remote Admin<\/p>\n<p style=\"padding-left: 30px\">C$&nbsp;&nbsp;&nbsp;&nbsp; C:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default share<\/p>\n<p style=\"padding-left: 30px\">D$&nbsp;&nbsp;&nbsp;&nbsp; D:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default share<\/p>\n<p style=\"padding-left: 30px\">IPC$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Remote IPC<\/p>\n<p style=\"padding-left: 30px\">Users&nbsp; C:Users\nThe next step is to extend this to a remote machine. <strong>Get-WmiObject<\/strong> has had a <strong>&ndash;ComputerName<\/strong> parameter since PowerShell&nbsp;1.0. Back in those days, it was our only tool for working remotely!<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&pound;&gt; Get-WmiObject -Class Win32_Share -ComputerName Win12R2 | Format-Table &ndash;AutoSize\nSo, you get to the age-old question, &ldquo;Which do I use?&rdquo;\nThe drawback with CIM sessions is that you need WSMAN&nbsp;3.0 on the remote machine, which means that PowerShell 3.0 or above must be installed. On older machines with Windows PowerShell&nbsp;2.0, you need to have WMI allowed through any firewalls you have between you and the remote machine. As the percentage of machines with WSMAN&nbsp;3.0 increases, you need to be maximizing the use of CIM sessions. The answer is to test the version of WSMAN that you have installed and proceed accordingly:<\/p>\n<p style=\"padding-left: 30px\">&pound;&gt; Test-WSMan -Authentication default -ComputerName win12r2<\/p>\n<p style=\"padding-left: 30px\">wsmid&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: http:\/\/schemas.dmtf.org\/wbem\/wsman\/identity\/1\/wsmanidentity.xsd<\/p>\n<p style=\"padding-left: 30px\">ProtocolVersion : http:\/\/schemas.dmtf.org\/wbem\/wsman\/1\/wsman.xsd<\/p>\n<p style=\"padding-left: 30px\">ProductVendor&nbsp;&nbsp; : Microsoft Corporation<\/p>\n<p style=\"padding-left: 30px\">ProductVersion&nbsp; : OS: 6.3.9600 SP: 0.0 Stack: 3.0\nThe value you need to test is the <strong>Stack<\/strong> property on the <strong>ProductVersion<\/strong>. This leads you to a function like this:<\/p>\n<p style=\"padding-left: 30px\">function get-share {<\/p>\n<p style=\"padding-left: 30px\">[CmdletBinding()]<\/p>\n<p style=\"padding-left: 30px\">param(<\/p>\n<p style=\"padding-left: 30px\">[parameter(Mandatory=$true,<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValueFromPipeline=$true,<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValueFromPipelineByPropertyName=$true)]<\/p>\n<p style=\"padding-left: 30px\">[string[]]$computername<\/p>\n<p style=\"padding-left: 30px\">)<\/p>\n<p style=\"padding-left: 30px\">PROCESS{<\/p>\n<p style=\"padding-left: 30px\">foreach ($computer in $computername){<\/p>\n<p style=\"padding-left: 30px\">&nbsp;$stack = ((Test-WSMan -Authentication default -ComputerName $computer &nbsp;-ErrorAction SilentlyContinue ).ProductVersion -split &#8220;: &#8220;)[-1]<\/p>\n<p style=\"padding-left: 30px\">&nbsp; switch ($stack) {<\/p>\n<p style=\"padding-left: 30px\">&nbsp; &#8220;2.0&#8221; {<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-WmiObject -Class Win32_Share -ComputerName $computer |<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select PSComputername, Name, Path, Description<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp; &#8220;3.0&#8221; {<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sess = New-CimSession -ComputerName Win12R2<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-SmbShare -CimSession $sess |<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select PSComputername, Name, Path, Description<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sess | Remove-CimSession<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp; default {Write-Warning -Message &#8220;Couldn&#8217;t determine WSMAN Stack version for $computer&#8221; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp;} # end switch<\/p>\n<p style=\"padding-left: 30px\">} # end foreach<\/p>\n<p style=\"padding-left: 30px\">} # End process<\/p>\n<p style=\"padding-left: 30px\">}\nTake a pipeline input, and test the WSMAN version for a computer that is passed in. This line may look a bit intimidating:<\/p>\n<p style=\"padding-left: 30px\">((Test-WSMan -Authentication default -ComputerName $computer &nbsp;-ErrorAction SilentlyContinue ).ProductVersion -split &#8220;: &#8220;)[-1]\nIt&rsquo;s not that bad when you break it down&#8230;\nThis gets the information:<\/p>\n<p style=\"padding-left: 30px\">Test-WSMan -Authentication default -ComputerName $computer &nbsp;-ErrorAction SilentlyContinue\nThis simply takes the&nbsp;<strong>ProductVersion<\/strong>&nbsp;property:<\/p>\n<p style=\"padding-left: 30px\">(Test-WSMan -Authentication default -ComputerName $computer &nbsp;-ErrorAction SilentlyContinue ).ProductVersion\nThis splits that property on a&nbsp;<strong>&ldquo;: &ldquo;<\/strong>:<\/p>\n<p style=\"padding-left: 30px\">-split &#8220;: &#8221;\nThe result is an array of which you take the last element by using the <strong>-1<\/strong> index. Try building up the command like this at the Windows PowerShell prompt to see how it all works.\nA switch statement is used to determine actions based on the WSMAN stack version. Version&nbsp;2.0 uses WMI and version&nbsp;3.0 uses CIM. The appropriate cmdlet is run and then a select statement is used to determine the data returned.&nbsp; In this case, the <strong>PSComputerName<\/strong> property is used to identify the machine from which we generate the data.\nIf the stack version isn&rsquo;t 2.0 or 3.0, the switch statement drops into the default option, which prints a warning on screen.\nWhat about the situation where you have hundreds or thousands of machines? Do you want to wait for this to run?\nIf the answer is, &ldquo;No,&rdquo; you could try turning this into a workflow, but the switch statement doesn&rsquo;t work very well in workflows. We recommended against using it in <a href=\"http:\/\/www.manning.com\/search\/results?cx=008207406337866288189%3Avej9zumcdec&amp;cof=FORID%3A9&amp;ie=UTF-8&amp;q=PowerShell+in+Depth&amp;sa=Search\">PowerShell in Depth<\/a>. Your choices are to completely rewrite or to use Windows PowerShell jobs. <strong>Get-WmiObject<\/strong> and <strong>Get-SmbShare<\/strong> have an <strong>&ndash;AsJob<\/strong> parameter.\nA Windows PowerShell job will create a job object to perform your processing and then immediately continue with the next line in the script. This works for <strong>Get-WmiObject<\/strong>, but there is an issue using <strong>Get-SmbShare<\/strong> like this because the next line will immediately remove the CIM session the job is trying to use, and the job will fail.\nThe answer is to use <strong>Wait-Job<\/strong> to test the completion of the job, which will delay the whole script and negate the reason for using jobs, or to move the whole process into a script block and use <strong>Start-Job<\/strong>.<\/p>\n<p style=\"padding-left: 30px\">function get-share {<\/p>\n<p style=\"padding-left: 30px\">[CmdletBinding()]<\/p>\n<p style=\"padding-left: 30px\">param(<\/p>\n<p style=\"padding-left: 30px\">[parameter(Mandatory=$true,<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValueFromPipeline=$true,<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValueFromPipelineByPropertyName=$true)]<\/p>\n<p style=\"padding-left: 30px\">[string[]]$computername<\/p>\n<p style=\"padding-left: 30px\">)<\/p>\n<p style=\"padding-left: 30px\">PROCESS{<\/p>\n<p style=\"padding-left: 30px\">foreach ($computer in $computername){<\/p>\n<p style=\"padding-left: 30px\">&nbsp;$stack = ((Test-WSMan -Authentication default -ComputerName $computer -ErrorAction SilentlyContinue).ProductVersion -split &#8220;: &#8220;)[-1]<\/p>\n<p style=\"padding-left: 30px\">&nbsp; switch ($stack) {<\/p>\n<p style=\"padding-left: 30px\">&nbsp; &#8220;2.0&#8221; {<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-WmiObject -Class Win32_Share -ComputerName $computer -AsJob<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp; &#8220;3.0&#8221; {<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sb = {<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; param($comp)<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sess = New-CimSession -ComputerName $comp<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get-SmbShare -CimSession $sess<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sess | Remove-CimSession<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start-Job -ScriptBlock $sb -ArgumentList $computer<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp; default {Write-Warning -Message &#8220;Couldn&#8217;t determine WSMAN Stack version for $computer&#8221; }<\/p>\n<p style=\"padding-left: 30px\">&nbsp;} # end switch<\/p>\n<p style=\"padding-left: 30px\">} # end foreach<\/p>\n<p style=\"padding-left: 30px\">} # End process<\/p>\n<p style=\"padding-left: 30px\">}\nYou can then use the standard job cmdlets to retrieve the data.\nCreating your scripts in this way allows you to mix and match new technologies with older ways of doing things so that your automation will keep working as your server estate changes.\nIf you want to extend the use of this script you could:<\/p>\n<ul>\n<li>Incorporate it into the server documentation tool that you read about in the first article in this series: <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2013\/09\/25\/the-admin-s-first-steps-documenting-servers.aspx\" target=\"_blank\">The Admin&rsquo;s First Steps: Documenting Servers<\/a>.<\/li>\n<li>Add process to retrieve data from the jobs.<\/li>\n<li>Extend process to retrieve the permissions granted on the share.<\/li>\n<\/ul>\n<p>OL, there is how you use Windows PowerShell to discover the shares on your remote servers. Next time, I&rsquo;ll have another idea for you to try as you bring more automation into your environment.\nIf you would like to read more in this series, check out these posts:<\/p>\n<ul>\n<li><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2013\/09\/25\/the-admin-s-first-steps-documenting-servers.aspx\" target=\"_blank\">The Admin&rsquo;s First Steps: Documenting Servers<\/a><\/li>\n<li><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2013\/10\/02\/the-admin-s-first-steps-scan-multiple-event-logs.aspx\" target=\"_blank\">The Admin&rsquo;s First Steps: Scan Multiple Event Logs<\/a><\/li>\n<li><a href=\"http:\/\/blogs.technet.com\/controlpanel\/blogs\/posteditor.aspx?SelectedNavItem=Posts&amp;WeblogID=7618&amp;WeblogPostID=3600971\" target=\"_blank\">The Admin&rsquo;s First Steps: Testing Service Health<\/a><\/li>\n<\/ul>\n<p>Bye for now.\n~Richard<\/p>\n<p style=\"padding-left: 30px\">Richard Siddaway is based out of the UK, and he spends his time automating anything and everything for Kelway, Ltd. A six-year Windows PowerShell MVP, Richard is a prolific blogger, mainly about Windows PowerShell. He is a frequent speaker at user groups and Windows PowerShell conferences. He has written a number of books: PowerShell in Practice, PowerShell and WMI, PowerShell in Depth (co-author), PowerShell Dive (co-editor), and he is currently finishing Learn Active Directory Management in a Month of Lunches, which features a lot of Windows PowerShell. All of the books are available from&nbsp;<a href=\"http:\/\/www.manning.com\/search\/results?cx=008207406337866288189%3Avej9zumcdec&amp;cof=FORID%3A9&amp;ie=UTF-8&amp;q=richard+siddaway&amp;sa=Search\" target=\"_blank\">Manning Publications<\/a>.<\/p>\n<p style=\"padding-left: 30px\">Contact information:&nbsp;<a href=\"http:\/\/msmvps.com\/blogs\/RichardSiddaway\/Default.aspx\" target=\"_blank\">Richard Siddaway&#8217;s Blog<\/a>\nThanks, Richard.\nI invite you to follow me 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 email to me at <a href=\"http:\/\/blogs.technet.commailto: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, peace.\n<strong>Ed Wilson, Microsoft Scripting Guy<\/strong>\nScripting Guy!,&nbsp;Operating system, Services, Windows PowerShell, Richard Siddaway, servers<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Richard Siddaway talks about using Windows PowerShell to discover shares on remote systems. &nbsp;Hey, Scripting Guy! I&rsquo;ve just starting using Windows PowerShell to administer my systems, and I&rsquo;ve been asked to discover the shares on some remote servers. How can I do that? &mdash;OL &nbsp;Hello OL, Honorary Scripting Guy, Richard Siddaway, here today&mdash;filling in [&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":[453,51,56,31,189,4,39,45],"class_list":["post-2737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-admin-first-steps","tag-getting-started","tag-guest-blogger","tag-operating-system","tag-richard-siddaway","tag-scripting-techniques","tag-services","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Richard Siddaway talks about using Windows PowerShell to discover shares on remote systems. &nbsp;Hey, Scripting Guy! I&rsquo;ve just starting using Windows PowerShell to administer my systems, and I&rsquo;ve been asked to discover the shares on some remote servers. How can I do that? &mdash;OL &nbsp;Hello OL, Honorary Scripting Guy, Richard Siddaway, here today&mdash;filling in [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2737","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=2737"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/2737\/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=2737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=2737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=2737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}