Hello,
Is it possible to create a DS-Entry of the type 'Secret' via Powershell?
There is the built in Cmdlet New-DSCredentialEntry which will create a new entry of type 'Credentials'.
There is also the Cmdlet New-DSEntryBase that may work but it's documentation is not very helpful:
Create a new entry without validating anything. This is the functional equivalent of a passthrough. Unless you
know exactly what you are doing, you should probably use the CMDlets created by us to generate new entries.
Hello Yannik,
Here is an example how to create a 'Secret' entry:
$password = @{
hasSensitiveData = $true
sensitiveData = 'MySecretIshere'
}
$data = @{
password = $password
}
$vaultID = '00000000-0000-0000-0000-000000000000'
$test = New-Object System.Management.Automation.PSObject -Property @{
name = 'MySecretName'
connectionType = 26
connectionSubType = 'AccessCode'
description = 'My Description'
data = $data
group = 'FolderA\SubFolderA'
repositoryId = $vaultID
}
New-DSEntryBase -JsonBody (ConvertTo-Json -InputObject $test -Depth 5)
If you need further assistance, let us know.
Best regards,
Maxime
Hello Maxime,
That worked, Thank you so much! :)