January 9, 2018 at 9:23 am
Is there a way to get the SQL user that is embedded in the shared datasources via powershell or query?
January 9, 2018 at 9:56 am
Solved my own problem, used this:
Try
items = rs.ListChildren("/", True)
Console.WriteLine("Datasources:")
Console.WriteLine()
For Each catalogItem as CatalogItem in items
if (catalogItem.Type = ItemTypeEnum.DataSource)
Console.WriteLine(catalogItem.Path)
dataSource = rs.GetDataSourceContents(catalogItem.Path)
If Not (dataSource Is Nothing) Then
Console.WriteLine(" Connection String: {0}", dataSource.ConnectString)
Console.WriteLine(" Extension name: {0}", dataSource.Extension)
Console.WriteLine(" Credential retrieval: {0}", dataSource.CredentialRetrieval)
Console.WriteLine(" Windows credentials: {0}", dataSource.WindowsCredentials)
Console.WriteLine(" Username: {0}", dataSource.UserName)
Console.WriteLine(" Password: {0}", dataSource.Password)
Console.WriteLine(" Enabled: {0}", dataSource.Enabled)
Console.WriteLine(" EnabledSpecified: {0}", dataSource.EnabledSpecified)
Console.WriteLine(" ImpersonateUser: {0}", dataSource.ImpersonateUser)
Console.WriteLine(" ImpersonateUserSpecified: {0}", dataSource.ImpersonateUserSpecified)
Console.WriteLine(" OriginalConnectStringExpressionBased: {0}", dataSource.OriginalConnectStringExpressionBased)
Console.WriteLine(" Prompt: {0}", dataSource.Prompt)
Console.WriteLine(" UseOriginalConnectString: {0}", dataSource.UseOriginalConnectString)
Console.WriteLine("===================================")
End If
count = count + 1
end if
Next catalogItem
Console.WriteLine()
Console.WriteLine("Total {0} datasources", count)
Catch e As IOException
Console.WriteLine(e.Message)
End Try
End Sub
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy