<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get-VIPermission - get VMs associated with Principal in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839134#M61459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With Folder:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$principal = '&amp;lt;domain&amp;gt;\&amp;lt;user_group&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-VM | where{(Get-VIPermission -Entity $_).Principal -contains $principal} |&lt;/P&gt;&lt;P&gt;Select Name,Folder,@{N='Datastore';E={(Get-Datastore -RelatedObject $_).Name -join '|'}},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @{N='Cluster';E={(Get-Cluster -VM $_).Name}}&amp;nbsp; | Export-csv c:\users\&amp;lt;me&amp;gt;\&amp;lt;filename.csv&amp;gt; -NoClobber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm ready to make an environment in vRealize and do forecasting for the group and give them read-only access to the datastores and clusters. Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2020 16:28:22 GMT</pubDate>
    <dc:creator>vmCalgary</dc:creator>
    <dc:date>2020-04-23T16:28:22Z</dc:date>
    <item>
      <title>Get-VIPermission - get VMs associated with Principal</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839131#M61456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get-ViPermission | Select Principal gives me a list of AD user groups using vSphere. How do I find out the list of VMs associated with a particular Principal, &amp;lt;domain&amp;gt;\Video Infrastructure, selecting VM name, datastore, and cluster?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:35:59 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839131#M61456</guid>
      <dc:creator>vmCalgary</dc:creator>
      <dc:date>2020-04-23T14:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get-VIPermission - get VMs associated with Principal</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839132#M61457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;principal&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;&amp;lt;domain&amp;gt;\Video Infrastructure&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: #00008b;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-VIPermission&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;Entity &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Principal &lt;SPAN style="color: #a9a9a9;"&gt;-contains&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;principal&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Select Name&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;N&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;Datastore&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;E&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-Datastore&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;RelatedObject &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Name &lt;SPAN style="color: #a9a9a9;"&gt;-join&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}}&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;N&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #8b0000;"&gt;Cluster&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;E&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;Get-Cluster&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;-&lt;/SPAN&gt;VM &lt;SPAN style="color: #000000;"&gt;$&lt;/SPAN&gt;&lt;SPAN style="color: #ff4500;"&gt;_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;.Name&lt;SPAN style="color: #000000;"&gt;}}&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 14:59:03 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839132#M61457</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2020-04-23T14:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Get-VIPermission - get VMs associated with Principal</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839133#M61458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you LucD (as always). The following worked like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$principal = '&amp;lt;domain&amp;gt;\&amp;lt;user_group&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-VM | where{(Get-VIPermission -Entity $_).Principal -contains $principal} |&lt;/P&gt;&lt;P&gt;Select Name,@{N='Datastore';E={(Get-Datastore -RelatedObject $_).Name -join '|'}},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @{N='Cluster';E={(Get-Cluster -VM $_).Name}}&amp;nbsp; | Export-csv c:\users\&amp;lt;me&amp;gt;\&amp;lt;filename.csv&amp;gt; -NoClobber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will need to tweak this somewhat as a peer mentioned we need the 'vm and templates' folder name as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:22:33 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839133#M61458</guid>
      <dc:creator>vmCalgary</dc:creator>
      <dc:date>2020-04-23T16:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get-VIPermission - get VMs associated with Principal</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839134#M61459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With Folder:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$principal = '&amp;lt;domain&amp;gt;\&amp;lt;user_group&amp;gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-VM | where{(Get-VIPermission -Entity $_).Principal -contains $principal} |&lt;/P&gt;&lt;P&gt;Select Name,Folder,@{N='Datastore';E={(Get-Datastore -RelatedObject $_).Name -join '|'}},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @{N='Cluster';E={(Get-Cluster -VM $_).Name}}&amp;nbsp; | Export-csv c:\users\&amp;lt;me&amp;gt;\&amp;lt;filename.csv&amp;gt; -NoClobber&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm ready to make an environment in vRealize and do forecasting for the group and give them read-only access to the datastores and clusters. Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:28:22 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Get-VIPermission-get-VMs-associated-with-Principal/m-p/1839134#M61459</guid>
      <dc:creator>vmCalgary</dc:creator>
      <dc:date>2020-04-23T16:28:22Z</dc:date>
    </item>
  </channel>
</rss>

