{"id":4380,"date":"2015-04-14T10:26:26","date_gmt":"2015-04-14T14:26:26","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4380"},"modified":"2015-04-14T10:33:33","modified_gmt":"2015-04-14T14:33:33","slug":"more-fun-getting-powershell-user-groups","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/","title":{"rendered":"More Fun Getting PowerShell User Groups"},"content":{"rendered":"<p>A few days ago I posted a PowerShell function to <a href=\"http:\/\/jdhitsolutions.com\/blog\/2015\/04\/friday-fun-get-powershell-user-groups\/\" title=\"Friday Fun: Get PowerShell User Groups\" target=\"_blank\">retrieve information about PowerShell user groups<\/a>. That function returned basic group information like this.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png\" alt=\"\" \/><\/p>\n<p>Each group on the site has its own page which is what that Link property is for. So it didn't take much work to use the same techniques as my original post to scrape information from that page. Again, I needed to analyze the source code to determine what classes and properties to use. But the final function, isn't that much different than the first one.<\/p>\n<pre class=\"lang:ps decode:true \" >Function Get-PSUserGroupDetail {\r\n&lt;#\r\n.Synopsis\r\nGet PowerShell user group detail\r\n.Description\r\nThis command will get detailed information about a PowerShell user group from Powershellgroup.org. You will need the link for the group which you can get with Get-PSUserGroup.\r\n.Example\r\nPS C:&gt; $g = Get-PSUserGroup\r\n\r\nThis gets basic user group information for all groups.\r\nPS C:\\&gt; $g | where {$_.name -match 'charlotte'} | Get-PSUserGroupDetail\r\n\r\n\r\nName     : Charlotte PowerShell Users Group\r\nEmail    : Charlotte@powershellgroup.org\r\nMeeting  : First Thursday of the month starting Jan 2012\r\nLocation : Charlotte\r\nRegion   : NC\r\nCountry  : United States\r\nMission  : The Charlotte PowerShell Users Group offers learning and support\r\n           opportunities for IT administrators and developers working with\r\n           PowerShell. While some meetings include guest speakers, most\r\n           meetings are designated as \"Script Club\" sessions, where group\r\n           members can bring in their own PowerShell scripts and receive\r\n           advice and assistance from fellow group members. In addition, the\r\n           group actively participates in the annual Scripting Games and holds\r\n           it own mini-competitions to foster PowerShell knowledge in the\r\n           Charlotte area.\r\nLink     : http:\/\/powershellgroup.org\/charlotte.nc\r\n\r\nFiltering for a specific group and then getting detail.\r\n.Link\r\nGet-PSUserGroup\r\nInvoke-Webrequest\r\n#&gt;\r\n[cmdletbinding()]\r\nParam(\r\n[Parameter(Position=0,Mandatory,\r\nValueFromPipeline,\r\nValueFromPipelineByPropertyName,\r\nHelpMessage=\"The URL for detailed user group information\")]\r\n[ValidateNotNullorEmpty()]\r\n[Alias(\"link\")]\r\n[string]$URL \r\n)\r\n\r\nProcess {\r\nwrite-Verbose \"Retrieving group data from $url\"\r\n\r\nTry {\r\n    $detail = Invoke-WebRequest $url -ErrorAction Stop\r\n}\r\nCatch {\r\n    Throw\r\n}\r\n\r\nif ($detail ) {\r\n    Write-Verbose \"Processing results\"\r\n\r\n    $class = $detail.AllElements | group class -AsHashTable -AsString\r\n    #suppress any errors for non-defined values which will leave \r\n    #corresponding property names with a null value\r\n    $script:ErrorActionPreference = \"SilentlyContinue\"\r\n\r\n    $email = ($class.'field field-type-email field-field-email'.innerText).Split(\":\")[1].Trim()\r\n    $mission = $class.'og-mission'.innertext.Trim()\r\n    $meeting = $class.'field field-type-text field-field-meetingtime'.innertext.Split(\":\")[1].Trim()\r\n    $location = $class.locality[0].innertext\r\n    $region = $class.region[0].innertext\r\n    $country = $class.'country-name'[0].innerText\r\n    $groupname = $class.title.where({$_.tagname -eq \"H1\"}).innerText\r\n    \r\n    Write-Verbose \"Creating results for $groupname\"\r\n\r\n    #write a custom object to the pipeline\r\n    [pscustomobject]@{\r\n    Name = $groupname\r\n    Email = $email\r\n    Meeting = $meeting\r\n    Location = $Location \r\n    Region = $region\r\n    Country = $Country\r\n    Mission = $mission\r\n    Link = $Url\r\n    }\r\n\r\n    #reset variables in case there were errors\r\n    Remove-variable -Name groupname,email,meeting,location,region,mission\r\n} #if $r\r\n} #process\r\n\r\n} #end function\r\n<\/pre>\n<p>Now I can get the group detail directly from PowerShell.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett2.png\" alt=\"\" \/><\/p>\n<p>If you have both commands, you can even combine them.<\/p>\n<pre><code>get-psusergroup | where {$_.name -match 'charlotte'} | Get-PSUserGroupDetail<\/code><\/pre>\n<p>This isn't too bad.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett3.png\" alt=\"\" \/><\/p>\n<p>You could use PowerShell to get details for every single group but that can be time consuming as processing is done sequentially. One way you might improve performance is my taking advantage of the parallel foreach feature in a PowerShell workflow. I wrote another function, really more as a proof of concept that defines a nested workflow. Within this workflow, it processes a collection of links in parallel in batches of 8.<\/p>\n<pre class=\"lang:ps decode:true \" >\r\nForeach -parallel -throttlelimit 8 ($url in $links) {\r\nSequence {\r\nTry {\r\n$detail = Invoke-WebRequest $url -ErrorAction Stop\r\n}\r\nCatch {\r\nThrow\r\n}\r\n\u2026<\/pre>\n<p>Because workflows are intended to run isolated, I had to incorporate code from Get-PSUserGroupDetail, instead of trying to call it directly. Here's the complete function.<\/p>\n<pre class=\"lang:ps decode:true \" >Function Get-PSUserGroupDetailAll {\r\n&lt;#\r\n.Synopsis\r\nGet details for all PowerShell user groups.\r\n.Description\r\nThis command is similar to Get-PSUserGroupDetail, except it will use a PowerShell workflow to retrieve all user group detail in parallel. While this aids in performance this command could still take a few minutes to complete. There are no parameters.\r\n.Example\r\nPS C:\\&gt; Get-PSUserGroupDetailAll\r\n\r\nName     : Pac IT Pros - PowerShell - Sacramento\r\nEmail    : powershell-SAC@pacitpros.org\r\nMeeting  : First Tuesday of the month 6-9 pm Pacific time and simulcast online\r\nLocation : Sacramento\r\nRegion   : CA\r\nCountry  : United States\r\nMission  : Pac IT Pros - PowerShell - Sacramento, CA\r\n           PowerShell users group meeting in Sacramento, CA and online.\r\n           Meetings are on\r\n           the first Tuesday of the month, 6-9 pm (Pacific) and simulcast on\r\n           the web.\r\nLink     : http:\/\/powershellgroup.org\/Sacramento\r\n...\r\n.Link\r\nGet-PSUserGroupDetail\r\n#&gt;\r\n\r\n[cmdletbinding()]\r\nParam()\r\n\r\nWrite-Verbose \"Starting $($MyInvocation.Mycommand)\"\r\n#define a nested workflow using the core code from Get-PSUsergroupdetail\r\nWorkflow GetDetail {\r\n\r\nParam([string[]]$Links)\r\nForeach -parallel -throttlelimit 8 ($url in $links) {\r\n    Sequence {\r\n    Try {\r\n        $detail = Invoke-WebRequest $url -ErrorAction Stop\r\n    }\r\n    Catch {\r\n        Throw\r\n    }\r\n\r\nif ($detail ) {\r\n    Write-Verbose \"Processing results\"\r\n\r\n    #reset variables in case there were errors\r\n    $groupname = $null\r\n    $email = $null\r\n    $meeting = $null\r\n    $location = $null\r\n    $region = $null\r\n    $country = $null\r\n    $mission = $null\r\n\r\n    $classElements = $detail.AllElements | group class -AsHashTable -AsString\r\n\r\n    Try {\r\n        $email = ($classElements.'field field-type-email field-field-email'.innerText).Split(\":\")[1].Trim()\r\n    } Catch { $email = $null }\r\n    Try {\r\n        $mission = $classElements.'og-mission'.innertext.Trim()\r\n    } Catch { $mission = $null }\r\n    Try {\r\n        $meeting = $classElements.'field field-type-text field-field-meetingtime'.innertext.Split(\":\")[1].Trim()\r\n    } Catch { $meeting = $null }\r\n    Try {\r\n        $location = $classElements.locality[0].innertext\r\n    } Catch { $location = $null }\r\n    Try {\r\n        $region = $classElements.region[0].innertext\r\n    } Catch { $region = $null }\r\n    Try {\r\n        $country = $classElements.'country-name'[0].innerText\r\n    } Catch { $country = $null }\r\n    Try {\r\n        $groupname = $classElements.title.where({$_.tagname -eq \"H1\"}).innerText\r\n    } Catch { $groupname = $null }\r\n\r\n    Write-Verbose \"Creating results for $groupname\"\r\n\r\n    #write a custom object to the pipeline\r\n    [pscustomobject]@{\r\n    Name = $groupname\r\n    Email = $email\r\n    Meeting = $meeting\r\n    Location = $Location \r\n    Region = $region\r\n    Country = $Country\r\n    Mission = $mission\r\n    Link = $Url\r\n    }\r\n\r\n} #if $detail\r\n    \r\n    } #sequence\r\n} #foreach\r\n\r\n} #end workflow\r\n  \r\nwrite-Verbose \"Retrieving group data\"\r\n$links = Get-PSUserGroup | Select -ExpandProperty Link\r\nWrite-Verbose \"Processing $($links.count) links\"\r\n#invoke the workflow\r\n$results = GetDetail $links\r\n\r\n#write results to pipeline without Workflow properties\r\n$Results | Select * -ExcludeProperty PS*\r\nWrite-Verbose \"Ending $($MyInvocation.Mycommand)\"\r\n\r\n} #end function\r\n<\/pre>\n<p>But even with parallel processing, this is still not a speedy process. Running the command on my Windows 8.1 box with 8GB of RAM and a very fast FiOS connection still took about 2 minutes to complete. But I suppose if you don't mind waiting here's what you can expect.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett4.png\" alt=\"\" \/><\/p>\n<p>I will say, that having all of this information is fun to play with.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett5.png\" alt=\"\" \/><\/p>\n<p>Or you could do something like this.<\/p>\n<pre><code>$us = $all | where {$_.country -eq 'United States'} | Group Region -AsHashTable \u2013AsString<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett6.png\" alt=\"\" \/><\/p>\n<p>My last function on the topic is called Show-PSUserGroup. The central command runs my original Get-PSUserGroup function which pipes the results to Out-Gridview. From there you can select one or more groups and each group's link will open up in your browser.<\/p>\n<pre class=\"lang:ps decode:true \" >Function Show-PSUserGroup {\r\n\r\n&lt;#\r\n.SYNOPSIS\r\nGraphically display PowerShell user groups.\r\n.DESCRIPTION\r\nThis command will display PowerShell user groups using Out-Gridview. You can select one or more groups which should open the corresponding page in your web browser.\r\n.NOTES\r\nNAME        :  Show-PSUserGroup\r\nVERSION     :  1.0   \r\nLAST UPDATED:  4\/8\/2015\r\n.LINK\r\nGet-PSUserGroup \r\n.INPUTS\r\nNone\r\n.OUTPUTS\r\nNone\r\n#&gt;\r\n\r\n[cmdletbinding()]\r\nParam()\r\n\r\nGet-PSUserGroup | \r\nOut-GridView -Title \"Select one or more user groups\" -OutputMode Multiple |\r\nForeach {\r\n    #write each result to the pipeline\r\n    $_\r\n    #open each link\r\n    Start $_.link\r\n}\r\n\r\n} #end function\r\n<\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett7.png\" alt=\"\" \/><\/p>\n<p>Clicking OK opens each link in my browser.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett8.png\" alt=\"\" \/><\/p>\n<p>If you've collected all of my functions, I recommend creating a module file. I have all of them in a module file called PSUsergroups.psm1. All you need at the end is an export command.<\/p>\n<pre><code>Export-ModuleMember -Function *<\/code><\/pre>\n<p>Save the file in the necessary module location and your commands are ready when you are.<\/p>\n<p>NOTE: If you run a PowerShell User Group and you are not registered on this site, I strongly encourage you to do so. Otherwise you are making it very hard for people to find you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago I posted a PowerShell function to retrieve information about PowerShell user groups. That function returned basic group information like this. Each group on the site has its own page which is what that Link property is for. So it didn&#8217;t take much work to use the same techniques as my original&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"More Fun Getting #PowerShell User Groups","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,8],"tags":[410,534,382],"class_list":["post-4380","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-invoke-webrequest","tag-powershell","tag-workflow"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>More Fun Getting PowerShell User Groups &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"More Fun Getting PowerShell User Groups &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"A few days ago I posted a PowerShell function to retrieve information about PowerShell user groups. That function returned basic group information like this. Each group on the site has its own page which is what that Link property is for. So it didn&#039;t take much work to use the same techniques as my original...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2015-04-14T14:26:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-04-14T14:33:33+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"More Fun Getting PowerShell User Groups\",\"datePublished\":\"2015-04-14T14:26:26+00:00\",\"dateModified\":\"2015-04-14T14:33:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/\"},\"wordCount\":429,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/04\\\/041415_1426_MoreFunGett1.png\",\"keywords\":[\"Invoke-WebRequest\",\"PowerShell\",\"Workflow\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/\",\"name\":\"More Fun Getting PowerShell User Groups &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/04\\\/041415_1426_MoreFunGett1.png\",\"datePublished\":\"2015-04-14T14:26:26+00:00\",\"dateModified\":\"2015-04-14T14:33:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/04\\\/041415_1426_MoreFunGett1.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/04\\\/041415_1426_MoreFunGett1.png\",\"width\":905,\"height\":159},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4380\\\/more-fun-getting-powershell-user-groups\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"More Fun Getting PowerShell User Groups\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"More Fun Getting PowerShell User Groups &#8226; The Lonely Administrator","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:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/","og_locale":"en_US","og_type":"article","og_title":"More Fun Getting PowerShell User Groups &#8226; The Lonely Administrator","og_description":"A few days ago I posted a PowerShell function to retrieve information about PowerShell user groups. That function returned basic group information like this. Each group on the site has its own page which is what that Link property is for. So it didn't take much work to use the same techniques as my original...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/","og_site_name":"The Lonely Administrator","article_published_time":"2015-04-14T14:26:26+00:00","article_modified_time":"2015-04-14T14:33:33+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"More Fun Getting PowerShell User Groups","datePublished":"2015-04-14T14:26:26+00:00","dateModified":"2015-04-14T14:33:33+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/"},"wordCount":429,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png","keywords":["Invoke-WebRequest","PowerShell","Workflow"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/","name":"More Fun Getting PowerShell User Groups &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png","datePublished":"2015-04-14T14:26:26+00:00","dateModified":"2015-04-14T14:33:33+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/041415_1426_MoreFunGett1.png","width":905,"height":159},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4380\/more-fun-getting-powershell-user-groups\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"More Fun Getting PowerShell User Groups"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3918,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3918\/pimp-your-prompt\/","url_meta":{"origin":4380,"position":0},"title":"Pimp your Prompt","author":"Jeffery Hicks","date":"July 16, 2014","format":false,"excerpt":"If you are like me and live in PowerShell, then you spend a great deal of your day looking at your PowerShell prompt. That little indicator in the console and ISE that usually shows where you are. That little part of your PowerShell world is defined by a built-in function\u2026","rel":"","context":"In &quot;Powershell 3.0&quot;","block_context":{"text":"Powershell 3.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-3-0\/"},"img":{"alt_text":"bling2","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/bling2-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3990,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3990\/friday-fun-creating-powershell-scripts-with-powershell\/","url_meta":{"origin":4380,"position":1},"title":"Friday Fun: Creating PowerShell Scripts with PowerShell","author":"Jeffery Hicks","date":"September 5, 2014","format":false,"excerpt":"Sometimes PowerShell really does seem like magic. Especially when you can use it to handle complicated or tedious tasks, such as creating a PowerShell script. I know many an IT Pro who want to script but without having to actually write a script. Well, I'm not sure that is realistic,\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"012914_1704_CreatingCIM1.png","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/01\/012914_1704_CreatingCIM1-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":933,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/933\/powershell-ise-new-function\/","url_meta":{"origin":4380,"position":2},"title":"PowerShell ISE New Function","author":"Jeffery Hicks","date":"September 16, 2010","format":false,"excerpt":"Yesterday I showed how to add a menu choice to the PowerShell ISE to insert the current date and time. Today I have something even better. At least it's something I've needed for awhile. I write a lot of advanced functions in PowerShell. I'm often cutting and pasting from previous\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/09\/ise-addons.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4368,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4368\/friday-fun-get-powershell-user-groups\/","url_meta":{"origin":4380,"position":3},"title":"Friday Fun: Get PowerShell User Groups","author":"Jeffery Hicks","date":"April 10, 2015","format":false,"excerpt":"The other day Don Jones tweeted about find a PowerShell user group. In case you didn't know, just about every user group associated with PowerShell can be found online at http:\/\/powershellgroup.org. This is a terrific resource for finding a user group near you. Of course, Twitter being what it is\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1307,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1307\/friday-fun-powershell-pep-talk\/","url_meta":{"origin":4380,"position":4},"title":"Friday Fun PowerShell Pep Talk","author":"Jeffery Hicks","date":"April 1, 2011","format":false,"excerpt":"Today's Friday Fun is meant to help get you excited about the upcoming Scripting Games. I want to add a little pep to your PowerShell prompt. Perhaps it will even keep you motivated. What I have for you today are variety of prompt functions. Consider them variations on a theme.\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"PowerShell Pep Talk","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/04\/color-pep-prompt-300x144.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5958,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5958\/friday-fun-perk-up-your-powershell-prompt\/","url_meta":{"origin":4380,"position":5},"title":"Friday Fun: Perk Up Your PowerShell Prompt","author":"Jeffery Hicks","date":"April 6, 2018","format":false,"excerpt":"I haven't written a Friday Fun post in quite a while. Often these posts don't have much practical value but hopefully illustrate a concept or technique. Although what I have today is something you could use immediately. I have a version of a PowerShell prompt function that will color code\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/04\/pslocationprompt-2_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/04\/pslocationprompt-2_thumb.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/04\/pslocationprompt-2_thumb.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4380"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4380\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}