Replies: 2 comments
-
this should be an easy fix, thanks for the report. it'll be fixed in dbatools 2.0 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello, can you please run the the following command:
then restart powershell, and try again. this is prerelease2 of dbatools 2.0, which contains a ton of fixes |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've created a script that uses
dbatools
to backup a remote database and restore it to another remote database. This script works well on my local machine, however when attempting to run said script within a Docker container built from an image based on the Amazon Linux 2 image, I consistently receive the following error on the line of the script that imports thedbatools
module:hostname: The term 'hostname' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I've searched across these discussions and the issues list, but wasn't able to find any similar issues aside from this one, which is not the same as the issue that I'm experiencing. I posted here first, rather than creating an issue, because I feel like this is more likely related to a lack of knowledge on my part, rather than a bug. If that's not the case, however, please let me know and I'll create an issue instead.
I've attached a ZIP file including a trimmed-down version of the Dockerfile and PowerShell script (shown below) that can be used to reproduce the issue. There are also
Build
andRun
PowerShell scripts included in the ZIP that can be used to create the image and start the container.Thank you in advance for any assistance!
Test.ps1 :
Dockerfile:
DbaToolsIssueRepro.zip
Beta Was this translation helpful? Give feedback.
All reactions