Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export-DbaLinkedServer can't get decrypt password #5953

Closed
3 tasks
yugioh0716 opened this issue Aug 9, 2019 · 5 comments
Closed
3 tasks

Export-DbaLinkedServer can't get decrypt password #5953

yugioh0716 opened this issue Aug 9, 2019 · 5 comments

Comments

@yugioh0716
Copy link

Environmental information

Powershell Version

PSVersion 5.1.14393.2879

Dbatools Version

Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.30\dbatools.psd1
Version : 1.0.30

OS Version

Windows Server 2016 Standard (zh-tw)

Domain or WORKGROUP

WORKGROUP

SQL Server:

Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: )
####Database Engine
Traditional Chinese

Report

Use Export-DbaLinkedServer can not export file include linked server decrypt password
/* For security reasons the linked server remote logins password is changed with ######## */

I try to use administrator to run Export-DbaLinkedServer, but I still get the same result.

Host used

  • [V] powershell.exe
  • ISE
  • VS Code
  • Other (please specify)

Errors Received

WARNING: [Get-DecryptedObject] Can't unprotect registry data on MyDBServer. Do you have administrative access to the Windows registry on Otherwise, we're out of ideas.

Steps to Reproduce

Export-DbaLinkedServer -SqlInstance MyDBServer -Path E:\

Expected Behavior

Export the sql file all linked server information include decrypt password, I can run the sql file in another SQL Server.

Actual Behavior

WARNING: [Get-DecryptedObject] Can't unprotect registry data on MyDBServer. Do you have administrative access to the Windows registry on Otherwise, we're out of ideas.

The sql file show /* For security reasons the linked server remote logins password is changed with ######## */

@yugioh0716 yugioh0716 changed the title [Bug]Export-DbaLinkedServer can't get decrypt password Export-DbaLinkedServer can't get decrypt password Aug 9, 2019
@wsmelton
Copy link
Member

wsmelton commented Aug 9, 2019

@yugioh0716 this is a best effort attempt to try and decrypt the password. Are you running this locally on the server or from a remote machine? In most environments the only way this works is to run this on the local source server.

@yugioh0716
Copy link
Author

@wsmelton I running the command in the local source SQL server, and I try to running the command in different SQL Server and get the same issue.

@wsmelton
Copy link
Member

wsmelton commented Aug 9, 2019

Your information shows you are working on a WORKGROUP computer, not a server part of a domain? If that is true then the method we use to attempt to decrypt the password will not work. There are remote commands in PowerShell that just won't work in a WORKGROUP environment.

@yugioh0716
Copy link
Author

@wsmelton My SQL Server is standalone installation in Windows Server 2016 not join domain, but I run the command in local source Server, I do not use remote command . The command is not work in workgroup SQL server?

@wsmelton
Copy link
Member

wsmelton commented Aug 9, 2019

I understand your setup but the method we use account for remote calling of code. In a WORKGROUP machine those commands will not function. So we cannot support decyrpting passwords in a WORKGROUP setup.

@wsmelton wsmelton closed this as completed Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants