<?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: export roles from one vcenter and import to another in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2937780#M109076</link>
    <description>&lt;P&gt;Export&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Get-VIRole |
Select @{N='vCenter';E={$_.Uid.Split('@:')[1]}},
  Name,
  @{N='PrivilegeList';E={[string]::Join([char]10,$_.PrivilegeList)}} |
Export-Csv -Path .\roles.csv -NoTypeInformation -UseCulture&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Import&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Import-Csv -Path .\roles.csv -PipelineVariable row |
ForEach-Object -Process {
  $Role = @{
    Name = $row.Name
    Privilege = $row.PrivilegeList.Split("`n") | ForEach-Object { Get-VIPrivilege -Id $_ }
    Server = $row.vCenter
    Confirm = $false
    WhatIf = $true
  }
  New-VIRole &lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/2151685"&gt;@role&lt;/a&gt;
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Note that you will have to exclude the system-defined Roles.&lt;BR /&gt;They are created automatically, and a user can not create those&lt;/P&gt;</description>
    <pubDate>Fri, 11 Nov 2022 07:35:50 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2022-11-11T07:35:50Z</dc:date>
    <item>
      <title>export roles from one vcenter and import to another</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/1408812#M46693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got 6 vcrnters that I need to create the same role&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how do I export the rtole from one vcenter and import into another?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 17:05:29 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/1408812#M46693</guid>
      <dc:creator>tdubb123</dc:creator>
      <dc:date>2016-11-15T17:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: export roles from one vcenter and import to another</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/1408813#M46694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the following links:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://kunaludapi.blogspot.com.br/2016/02/export-vcenter-roles-privileges-powercli.html" title="http://kunaludapi.blogspot.com.br/2016/02/export-vcenter-roles-privileges-powercli.html"&gt;vGeek: Export vcenter roles (privileges) - Powercli.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://kunaludapi.blogspot.com.br/2016/02/import-vcenter-roles-privileges-powercli.html" title="http://kunaludapi.blogspot.com.br/2016/02/import-vcenter-roles-privileges-powercli.html"&gt;vGeek: import vCenter roles (privileges) - Powercli.&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 22:11:44 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/1408813#M46694</guid>
      <dc:creator>rcporto</dc:creator>
      <dc:date>2016-11-15T22:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: export roles from one vcenter and import to another</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/1408814#M46695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;B&gt;tdubb123&lt;/B&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you have a chance to read the blog post I referenced in my previous post? Do you have any additional doubt? If not, remember to mark answers as helpful or correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 14:13:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/1408814#M46695</guid>
      <dc:creator>rcporto</dc:creator>
      <dc:date>2016-12-12T14:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: export roles from one vcenter and import to another</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2937758#M109072</link>
      <description>&lt;P&gt;was this ever solved?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 01:36:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2937758#M109072</guid>
      <dc:creator>jwashingtonbt</dc:creator>
      <dc:date>2022-11-11T01:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: export roles from one vcenter and import to another</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2937780#M109076</link>
      <description>&lt;P&gt;Export&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Get-VIRole |
Select @{N='vCenter';E={$_.Uid.Split('@:')[1]}},
  Name,
  @{N='PrivilegeList';E={[string]::Join([char]10,$_.PrivilegeList)}} |
Export-Csv -Path .\roles.csv -NoTypeInformation -UseCulture&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Import&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;Import-Csv -Path .\roles.csv -PipelineVariable row |
ForEach-Object -Process {
  $Role = @{
    Name = $row.Name
    Privilege = $row.PrivilegeList.Split("`n") | ForEach-Object { Get-VIPrivilege -Id $_ }
    Server = $row.vCenter
    Confirm = $false
    WhatIf = $true
  }
  New-VIRole &lt;a href="https://communities.vmware.com/t5/user/viewprofilepage/user-id/2151685"&gt;@role&lt;/a&gt;
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Note that you will have to exclude the system-defined Roles.&lt;BR /&gt;They are created automatically, and a user can not create those&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 07:35:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2937780#M109076</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-11-11T07:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: export roles from one vcenter and import to another</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2995151#M113828</link>
      <description>&lt;P&gt;I know this is an ancient thread but I wanted to say thank you to Luc. This still works in 8.0U2. I have been meaning to find a way to export and import our custom roles for ages and finally got around to it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 16:12:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/export-roles-from-one-vcenter-and-import-to-another/m-p/2995151#M113828</guid>
      <dc:creator>pmichelli</dc:creator>
      <dc:date>2023-11-10T16:12:35Z</dc:date>
    </item>
  </channel>
</rss>

