get-dbaDatabase #8318
Unanswered
Julian1893
asked this question in
Q&A
get-dbaDatabase
#8318
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Is there a way to hand over the switches "Database" and "ExcludeDatabase" in a variable to get-DbaDatabase?
The following does not work:
$Instance = 'localhost'
$SelectedDatabases = 'master','model','msdb','tempdb'
$ExcludeOrIncludeDBs = 'ExcludeDatabase'
$Databases = Get-DbaDatabase -SqlInstance $Instance -$ExcludeOrIncludeDBs $SelectedDatabases | foreach {$_.Name}
Instead a login window appears and Username shows "-ExcludeDatabase"
Beta Was this translation helpful? Give feedback.
All reactions