This commit is contained in:
Ralf Koop 2023-09-24 10:38:40 +02:00
commit 961dc54218
2 changed files with 30 additions and 0 deletions

6
Eingang/Csharp.md Normal file
View File

@ -0,0 +1,6 @@
# C\# oder Csharp
Operatoren = ??
?? und ??=: die NULL-Sammeloperatoren
siehe hierzu https://learn.microsoft.com/de-de/dotnet/csharp/language-reference/operators/null-coalescing-operator

View File

@ -0,0 +1,24 @@
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Any web application associated with SSS proxy application or central admin
$WebAppURL="https://collaboration-int.bauer-de.bauermedia.group"
#Establish the Context
$Provider = New-Object Microsoft.Office.SecureStoreService.Server.SecureStoreProvider
$Provider.Context = Get-SPServiceContext -Site $WebAppURL
#Get All Target Applications
$TargetApps = $provider.GetTargetApplications()
foreach ($App in $TargetApps)
{
Write-Output $App.Name
#Get the credentials for the App
$Credentials = $provider.GetCredentials($App.Name)
foreach ($Cred in $Credentials)
{
$EncryptString = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($cred.Credential)
$DecryptString = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($EncryptString)
Write-Output "$($cred.CredentialType): $($DecryptString)"
}
}