Переносил на днях базу данных используемую в External Type на сайте Sharepoint, и потребовалось уточнить от имени какой учётной записи производится доступ к базе данных. Всю цепочку настроек можно посмотреть через сайт управления кроме используемой учётной записи.
Нашелся вот такой простой скриптик, который выводит все Secure Store Target Application Id и соответствующие им логины и пароли:
$SecureStoreProvider=[Microsoft.Office.SecureStoreService.Server.SecureStoreProviderFactory]::Create() $site = Get-SPSite -Identity $(Get-SPWebApplication -IncludeCentralAdministration | ?{ $_.IsAdministrationWebApplication}).Url $SecureStoreProvider.Context = Get-SPServiceContext -Site ($site) $SecureStoreProvider.GetTargetApplications() | ForEach-Object { Write-Host $_.Name try { $SecureStoreProvider.GetCredentials($_.ApplicationId) | ForEach-Object { $Credential = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($_.Credential)) Write-Host "`t$($_.CredentialType): $($Credential)" } } catch { Write-Host "`t$($_)" -ForegroundColor yellow } } <div class="container"> <div class="line number1 index0 alt2"><code class="powershell plain"> </code></div> </div>
Скрипт взят отсюда https://sharepointobservations.wordpress.com/2015/02/05/retrievingrecovering-secure-store-credentials/
Filed under: Без рубрики, Operations Manager, Powershell | Tagged: Powershell, Sharepoint | Leave a comment »