Replies: 3 comments 1 reply
-
Hi @redboyhun The only switch parameter declared for A rough idea for the process to copy safe/copy members/copy accounts follows: $SourceName = "SourceSafe"
$DestinationSafe = "DestinationSafe"
$sourceSafe = Get-PASSafe -SafeName $SourceName
#Create New Safe
$sourceSafe |
Select-Object -Property description, managingCPM, numberOfDaysRetention, numberOfVersionsRetention |
Add-PASSafe -SafeName $DestinationSafe
$sourceMembers = Get-PASSafeMember -SafeName $SourceName
#Copy Members
$sourceMembers | foreach{
$PSItem | Select-Object -Property MemberName -ExpandProperty Permissions |
Add-PASSafeMember -SafeName $DestinationSafe
}
$sourceAccounts = Get-PASAccount -safeName $SourceName
#Copy Accounts
$sourceAccounts | foreach {
$PSItem | Select-Object -Property address, userName, platformID, platformAccountProperties |
Add-PASAccount -safe $DestinationSafe
} |
Beta Was this translation helpful? Give feedback.
-
Hi @pspete Is this supposed to work? $pasAccount | Select-Object -Property address, userName, platformID, platformAccountProperties | Add-PASAccount -safe $DestinationSafe
Add-PASAccount : Cannot process argument transformation on parameter 'platformAccountProperties'. Cannot convert value "@{LogonDomain=test.test.org}" to type "System.Collec
|
Beta Was this translation helpful? Give feedback.
-
@begunrom - its just a rough idea. |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
anyone did a script for this task?
I'd like to make a duplicate/copy of a Safe, incl. Safe size, Members and Accounts too.
I need it due to an issue, so I can get rid of the history of the accounts.
What I am not sure and could not test it yet, if the Get-PASSafeMember could be used with Add-PASSafeMember 1-to-1. As I saw the Add command uses switches, but the Get gives a PSCustomObject back, so I probably should make some conversion of the Data.
Same applies for accounts I guess.
Maybe someone made this already and can share his/her solution?
Beta Was this translation helpful? Give feedback.
All reactions