Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3486096
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:59:15+00:00 2026-05-18T10:59:15+00:00

I have a powershell script to iterate through a list of LinkedServer objects in

  • 0

I have a powershell script to iterate through a list of LinkedServer objects in a SQL Server with some code like this:

foreach($linkedServer in $instance.LinkedServers)
{       
... some code ...
}   

I want to find out information on the default security of a linked server. To see what I mean, load SQL Server Management Studio and open a linked server. If you don’t have any, just create one to a remote server. Click on the Security tab and you will see a list of linked server login mappings (LinkedServerLogins collection in SMO). At the bottom of the screen will be a default setting in the section called “For a login not defined in the list above…”. I cannot find anywhere in the SMO object model to get to this information. Is it possible?

Thanks,
Mark.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:59:16+00:00Added an answer on May 18, 2026 at 10:59 am

    It seems to be in the linked server login properties:

    foreach($linkedServer in $instance.LinkedServers)
    {   
        "LinkedServer:" + $linkedServer.Name
    
        foreach($linkedServerLogin in $linkedServer.LinkedServerLogins)
        {
            " LinkedServerLogin:" + $linkedServerLogin.Name
            foreach($property in $linkedServerLogin.Properties)
            {
                "  Property:" + $property.Name + " - " + $property.Value
            }
        }
    } 
    

    Impersonate and RemoteUser are included in the properties.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a few lines of PowerShell code that I would like to use
I have a Powershell script that copies files from one location to another. Once
Does anyone have a Powershell script to change the credentials used by a Windows
I have a simple PowerShell script that uses WMI to create a web site
I have the following string expression in a PowerShell script: select count(*) cnt from
Have you ever seen any of there error messages? -- SQL Server 2000 Could
I have an application that has Powershell 1 embedded into it, but we need
Is there a way to bundle PowerShell such that I don't have to install
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.