- valakiyt: A világ mindennek az alja!
- sziku69: Szólánc.
- eBay-es kütyük kis pénzért
- [Re:] Mutasd az iOS Homescreened!
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- bambano: Bambanő háza tája
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- lkristóf: Prohardver fórum userscript – hogy lásd, mikor neked válaszoltak
- Sapphi: StremHU | Source – Self-hostolható Stremio addon magyar trackerekhez
- MasterDeeJay: RAM gondolatok: Mennyi a minimum? DDR3 is jó?
-
LOGOUT
Sziasztok, udvozlunk mindenkit Magyarorszag legnagyobb VMware forumjaban!

Új hozzászólás Aktív témák
-
bugizozi
őstag
Sziasztok!
Ha valaki két vCenter között szeretne a jövőben role-okat migrálni akkor eme iromány hasznos lehet neki [link]
Clone roles between two virtual center servers
So i wanted to make a copy of a role that is in vc1. I wanted to have it in vc2.
Basically you can just open two vSphere clients, one to vc1 and other to vc2, and just select each privilege that is in this role and select it on second window. (click,click,click…) Yeah, if you have 1 role to copy, with very small amount of privileges then it is not such issue. But what if you have more?
Ok, let’s start from the beginning.Sitauation:
VC1 ---|
. |
. RoleA
VC2 ---|
. |
. RoleAWe want to copy roleA from VC1 to VC2.
First check if your powercli runs in multi VC mode.PowerCLI C:\Get-PowerCLIConfiguration
Proxy Policy Default Server
Mode
------------ ---------------
UseSystemProxy MultipleIf not, set the default server mode to multi.
Set-PowerCLIConfiguration -DefaultVIServerMode multiple -Confirm:$false
Once this is set you can now connect to multiple VC servers. Since -server handles array we can do:
Connect-viserver -server "VC1","VC2" -credential (get-credential)
Role that will be cloned has name RoleA within VC1, let’s view it:
Get-VIrole -Name "RoleA" -Server VC1 | fl *
We can see it’s description,Name,ID and what will be most important for us PrivilegeList
Let’s store the privilege list for this roleA from VC1. We will store those privileges ids as a string in string array.[string[]]$privsforRoleAfromVC1=Get-VIPrivilege -Role (Get-VIRole -Name "RoleA" -server VC1) |%{$_.id}
Once we have the privileges ids, we can now create blank role in VC2.
New-VIRole -name "RoleA" -Server VC2
We will now populate privileges in our empty RoleA within VC2:
Set-VIRole -role (get-virole -Name "RoleA" -Server VC2) -AddPrivilege (get-viprivilege -id $privsforRoleAfromVC1 -server VC2)
If everything went fine we should have now 1:1 copy of our RoleA. Let’s check it:
(Get-VIRole -Name RoleA -Server VC1).PrivilegeList.Count
(Get-VIRole -Name RoleA -Server VC2).PrivilegeList.CountIf you don’t want to use this additional variable that holds privileges you can put it directly in one line
Set-VIRole -role (get-virole -Name "RoleA" -Server VC2) -AddPrivilege (get-viprivilege -id (Get-VIPrivilege -Role (Get-VIRole -Name "RoleA" -server VC1) |%{$_.id}) -server VC2)
That’s it

Új hozzászólás Aktív témák
- Álláskeresés, interjú, önéletrajz
- Házimozi belépő szinten
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- valakiyt: A világ mindennek az alja!
- PH!otósok beszélgetős, offolós topikja
- Képregény topik
- Építő/felújító topik
- Battlefield 6
- Mikrotik routerek
- Milyen billentyűzetet vegyek?
- További aktív témák...
- Vírusirtó, Antivirus, VPN kulcsok GARANCIÁVAL!
- MS SQL Server 2016, 2017, 2019
- MEGA AKCIÓ! - Jogtiszta Windows - Office & Autodesk & CorelDRAW - Azonnal - Számlával - Garanciával
- Adobe Előfizetések - Adobe Creative Cloud All Apps - 12 Hónap - 15% AKCIÓ
- Bitdefender Total Security 3év/3eszköz! - Tökéletes védelem.
- BESZÁMÍTÁS! LENOVO ThinkPad P15 Gen1 munkaállomás - i7 10875H 16GB DDR4 512GB SSD Quadro T1000 4GB W
- HIBÁTLAN iPhone 12 Pro 128GB Gold-1 ÉV GARANCIA - Kártyafüggetlen, MS4441, 100% Akksi
- GYÖNYÖRŰ iPhone SE 2020 64GB Red -1 ÉV GARANCIA - Kártyafüggetlen, MS4527, 100% Akksi
- BESZÁMÍTÁS! ASUS H510M i5 11400F 16GB DDR4 512GB SSD RX 6700 10GB Zalman T4 Plus Chieftec 650W
- Dell Precision 7550,15.6,FHD,i7-10850H,16GB DDR4,512GB SSD,RTX 3000 6GB DDR6,WIN11
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs



