diff --git a/.aider/aider.psm1 b/.aider/aider.psm1 index eb6bfd93d5..f67a192f2c 100644 --- a/.aider/aider.psm1 +++ b/.aider/aider.psm1 @@ -300,7 +300,7 @@ function Repair-SmallThing { Context "Parameter validation" { BeforeAll { $command = Get-Command Backup-DbaDbMasterKey - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", @@ -320,7 +320,7 @@ function Repair-SmallThing { Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaDbMasterKey - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/.aider/prompts/conventions.md b/.aider/prompts/conventions.md index ab58b0c974..4b7027f0ff 100644 --- a/.aider/prompts/conventions.md +++ b/.aider/prompts/conventions.md @@ -128,7 +128,7 @@ Describe "Add-DbaAgReplica" -Tag "IntegrationTests" { Describe "Get-DbaDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDatabase - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaAgDatabase.Tests.ps1 b/tests/Add-DbaAgDatabase.Tests.ps1 index 6c857bb9a8..ce8678cece 100644 --- a/tests/Add-DbaAgDatabase.Tests.ps1 +++ b/tests/Add-DbaAgDatabase.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaAgDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaAgDatabase - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaAgListener.Tests.ps1 b/tests/Add-DbaAgListener.Tests.ps1 index 6e7eea3518..1bbf0a95fa 100644 --- a/tests/Add-DbaAgListener.Tests.ps1 +++ b/tests/Add-DbaAgListener.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaAgListener" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaAgListener - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaAgReplica.Tests.ps1 b/tests/Add-DbaAgReplica.Tests.ps1 index cb982e2417..2e5abf991d 100644 --- a/tests/Add-DbaAgReplica.Tests.ps1 +++ b/tests/Add-DbaAgReplica.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaAgReplica" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaAgReplica - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaComputerCertificate.Tests.ps1 b/tests/Add-DbaComputerCertificate.Tests.ps1 index 71470eed7a..2e8801500e 100644 --- a/tests/Add-DbaComputerCertificate.Tests.ps1 +++ b/tests/Add-DbaComputerCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaComputerCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaComputerCertificate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Add-DbaDbMirrorMonitor.Tests.ps1 b/tests/Add-DbaDbMirrorMonitor.Tests.ps1 index 72cf5222dd..65e05a402e 100644 --- a/tests/Add-DbaDbMirrorMonitor.Tests.ps1 +++ b/tests/Add-DbaDbMirrorMonitor.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaDbMirrorMonitor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaDbMirrorMonitor - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaDbRoleMember.Tests.ps1 b/tests/Add-DbaDbRoleMember.Tests.ps1 index 623595b66b..afa70d22d1 100644 --- a/tests/Add-DbaDbRoleMember.Tests.ps1 +++ b/tests/Add-DbaDbRoleMember.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaDbRoleMember" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaDbRoleMember - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 b/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 index 469b463e7e..6247711bcc 100644 --- a/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 +++ b/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaPfDataCollectorCounter" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaPfDataCollectorCounter - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Add-DbaRegServerGroup.Tests.ps1 b/tests/Add-DbaRegServerGroup.Tests.ps1 index d129d8c02d..185e81496c 100644 --- a/tests/Add-DbaRegServerGroup.Tests.ps1 +++ b/tests/Add-DbaRegServerGroup.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaRegServerGroup" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaRegServerGroup - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaReplArticle.Tests.ps1 b/tests/Add-DbaReplArticle.Tests.ps1 index 925db18e93..95fe1d2f64 100644 --- a/tests/Add-DbaReplArticle.Tests.ps1 +++ b/tests/Add-DbaReplArticle.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaReplArticle" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaReplArticle - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Backup-DbaComputerCertificate.Tests.ps1 b/tests/Backup-DbaComputerCertificate.Tests.ps1 index bcc448b445..eac6a6070a 100644 --- a/tests/Backup-DbaComputerCertificate.Tests.ps1 +++ b/tests/Backup-DbaComputerCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaComputerCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaComputerCertificate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SecurePassword", "InputObject", diff --git a/tests/Backup-DbaDbCertificate.Tests.ps1 b/tests/Backup-DbaDbCertificate.Tests.ps1 index 381d9d0cc3..f6fa55d1df 100644 --- a/tests/Backup-DbaDbCertificate.Tests.ps1 +++ b/tests/Backup-DbaDbCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaDbCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaDbCertificate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Backup-DbaDbMasterKey.Tests.ps1 b/tests/Backup-DbaDbMasterKey.Tests.ps1 index 0ce79702b5..546e781d5d 100644 --- a/tests/Backup-DbaDbMasterKey.Tests.ps1 +++ b/tests/Backup-DbaDbMasterKey.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaDbMasterKey - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Backup-DbaServiceMasterKey.Tests.ps1 b/tests/Backup-DbaServiceMasterKey.Tests.ps1 index 9e864c5cb1..9079c77135 100644 --- a/tests/Backup-DbaServiceMasterKey.Tests.ps1 +++ b/tests/Backup-DbaServiceMasterKey.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaServiceMasterKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaServiceMasterKey - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Clear-DbaConnectionPool.Tests.ps1 b/tests/Clear-DbaConnectionPool.Tests.ps1 index b0ac15ac32..0b05c15d78 100644 --- a/tests/Clear-DbaConnectionPool.Tests.ps1 +++ b/tests/Clear-DbaConnectionPool.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaConnectionPool" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaConnectionPool - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Clear-DbaLatchStatistics.Tests.ps1 b/tests/Clear-DbaLatchStatistics.Tests.ps1 index 7fe0086df7..76e2f50625 100644 --- a/tests/Clear-DbaLatchStatistics.Tests.ps1 +++ b/tests/Clear-DbaLatchStatistics.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaLatchStatistics" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaLatchStatistics - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Clear-DbaPlanCache.Tests.ps1 b/tests/Clear-DbaPlanCache.Tests.ps1 index 8e92b39c17..93359bbd16 100644 --- a/tests/Clear-DbaPlanCache.Tests.ps1 +++ b/tests/Clear-DbaPlanCache.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaPlanCache" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaPlanCache - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Clear-DbaWaitStatistics.Tests.ps1 b/tests/Clear-DbaWaitStatistics.Tests.ps1 index 439ff74dca..65b90477a4 100644 --- a/tests/Clear-DbaWaitStatistics.Tests.ps1 +++ b/tests/Clear-DbaWaitStatistics.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaWaitStatistics" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaWaitStatistics - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Convert-DbaLsn.Tests.ps1 b/tests/Convert-DbaLsn.Tests.ps1 index 13cd2de08f..d0be494a25 100644 --- a/tests/Convert-DbaLsn.Tests.ps1 +++ b/tests/Convert-DbaLsn.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Convert-DbaLSN" -Tag "UnitTests" { BeforeAll { $command = Get-Command Convert-DbaLSN - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "LSN", "EnableException" diff --git a/tests/Convert-DbaMaskingValue.Tests.ps1 b/tests/Convert-DbaMaskingValue.Tests.ps1 index 785978a3b8..f792940e98 100644 --- a/tests/Convert-DbaMaskingValue.Tests.ps1 +++ b/tests/Convert-DbaMaskingValue.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Convert-DbaMaskingValue" -Tag "UnitTests" { BeforeAll { $command = Get-Command Convert-DbaMaskingValue - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Value", "DataType", diff --git a/tests/ConvertTo-DbaTimeline.Tests.ps1 b/tests/ConvertTo-DbaTimeline.Tests.ps1 index fed94cba62..35fa27d9e0 100644 --- a/tests/ConvertTo-DbaTimeline.Tests.ps1 +++ b/tests/ConvertTo-DbaTimeline.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "ConvertTo-DbaTimeline" -Tag "UnitTests" { BeforeAll { $command = Get-Command ConvertTo-DbaTimeline - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "InputObject", "ExcludeRowLabel", diff --git a/tests/ConvertTo-DbaXESession.Tests.ps1 b/tests/ConvertTo-DbaXESession.Tests.ps1 index 656ecc2218..51ef3cba8b 100644 --- a/tests/ConvertTo-DbaXESession.Tests.ps1 +++ b/tests/ConvertTo-DbaXESession.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "ConvertTo-DbaXESession" -Tag "UnitTests" { BeforeAll { $command = Get-Command ConvertTo-DbaXESession - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "InputObject", "Name", diff --git a/tests/Copy-DbaAgentAlert.Tests.ps1 b/tests/Copy-DbaAgentAlert.Tests.ps1 index 9b4b2ff122..b8b115d443 100644 --- a/tests/Copy-DbaAgentAlert.Tests.ps1 +++ b/tests/Copy-DbaAgentAlert.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentAlert" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentAlert - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentJob.Tests.ps1 b/tests/Copy-DbaAgentJob.Tests.ps1 index 8dc92ea0c8..f1504cc7a4 100644 --- a/tests/Copy-DbaAgentJob.Tests.ps1 +++ b/tests/Copy-DbaAgentJob.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentJob" -Tag "IntegrationTests" { BeforeAll { $command = Get-Command Copy-DbaAgentJob - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentJobCategory.Tests.ps1 b/tests/Copy-DbaAgentJobCategory.Tests.ps1 index 5eb3b354ec..30ff847b61 100644 --- a/tests/Copy-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Copy-DbaAgentJobCategory.Tests.ps1 @@ -8,7 +8,7 @@ Describe "Copy-DbaAgentJobCategory" -Tag "IntegrationTests" { BeforeAll { $command = Get-Command Copy-DbaAgentJobCategory - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", @@ -24,7 +24,7 @@ Describe "Copy-DbaAgentJobCategory" -Tag "IntegrationTests" { "WhatIf" ) } - + AfterAll { $null = Remove-DbaAgentJobCategory -SqlInstance $TestConfig.instance2 -Category 'dbatoolsci test category' -Confirm:$false } diff --git a/tests/Copy-DbaAgentOperator.Tests.ps1 b/tests/Copy-DbaAgentOperator.Tests.ps1 index 2b2824c439..12c202ff94 100644 --- a/tests/Copy-DbaAgentOperator.Tests.ps1 +++ b/tests/Copy-DbaAgentOperator.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentOperator" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentOperator - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentProxy.Tests.ps1 b/tests/Copy-DbaAgentProxy.Tests.ps1 index cb5bcc317a..51fd7ee939 100644 --- a/tests/Copy-DbaAgentProxy.Tests.ps1 +++ b/tests/Copy-DbaAgentProxy.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentProxy" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentProxy - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentSchedule.Tests.ps1 b/tests/Copy-DbaAgentSchedule.Tests.ps1 index 7bf8192b13..c6db33d464 100644 --- a/tests/Copy-DbaAgentSchedule.Tests.ps1 +++ b/tests/Copy-DbaAgentSchedule.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentSchedule" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentSchedule - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentServer.Tests.ps1 b/tests/Copy-DbaAgentServer.Tests.ps1 index b33c62b17c..2f5132f4d9 100644 --- a/tests/Copy-DbaAgentServer.Tests.ps1 +++ b/tests/Copy-DbaAgentServer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentServer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaBackupDevice.Tests.ps1 b/tests/Copy-DbaBackupDevice.Tests.ps1 index 6619ff437a..08ab71c0c2 100644 --- a/tests/Copy-DbaBackupDevice.Tests.ps1 +++ b/tests/Copy-DbaBackupDevice.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Copy-DbaBackupDevice" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaBackupDevice - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaCustomError.Tests.ps1 b/tests/Copy-DbaCustomError.Tests.ps1 index 529c21a66a..506417d0a1 100644 --- a/tests/Copy-DbaCustomError.Tests.ps1 +++ b/tests/Copy-DbaCustomError.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaCustomError" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaCustomError - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaDataCollector.Tests.ps1 b/tests/Copy-DbaDataCollector.Tests.ps1 index bcb0bc2879..216185cfdf 100644 --- a/tests/Copy-DbaDataCollector.Tests.ps1 +++ b/tests/Copy-DbaDataCollector.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Copy-DbaDataCollector" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDataCollector - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'Source', 'SourceSqlCredential', diff --git a/tests/Copy-DbaDbCertificate.Tests.ps1 b/tests/Copy-DbaDbCertificate.Tests.ps1 index 05ef7d7349..a8f1f8b7ba 100644 --- a/tests/Copy-DbaDbCertificate.Tests.ps1 +++ b/tests/Copy-DbaDbCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaDbCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDbCertificate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'Source', 'SourceSqlCredential', @@ -41,13 +41,13 @@ Describe "Copy-DbaDbCertificate" -Tag "IntegrationTests" { Context "Can create a database certificate" { BeforeAll { $securePassword = ConvertTo-SecureString -String "GoodPass1234!" -AsPlainText -Force - + # Create master key on instance2 $masterKey = New-DbaDbMasterKey -SqlInstance $TestConfig.instance2 -Database master -SecurePassword $securePassword -Confirm:$false -ErrorAction SilentlyContinue # Create test databases $testDatabases = New-DbaDatabase -SqlInstance $TestConfig.instance2, $TestConfig.instance3 -Name dbatoolscopycred - + # Create master key and certificate on source $null = New-DbaDbMasterKey -SqlInstance $TestConfig.instance2 -Database dbatoolscopycred -SecurePassword $securePassword -Confirm:$false $certificateName = "Cert_$(Get-Random)" @@ -74,13 +74,13 @@ Describe "Copy-DbaDbCertificate" -Tag "IntegrationTests" { It -Skip "Successfully copies a certificate" { $results = Copy-DbaDbCertificate @splatCopyCert | Where-Object SourceDatabase -eq dbatoolscopycred | Select-Object -First 1 - + $results.Notes | Should -BeNullOrEmpty $results.Status | Should -Be "Successful" - + $sourceDb = Get-DbaDatabase -SqlInstance $TestConfig.instance2 -Database dbatoolscopycred $destDb = Get-DbaDatabase -SqlInstance $TestConfig.instance3 -Database dbatoolscopycred - + $results.SourceDatabaseID | Should -Be $sourceDb.ID $results.DestinationDatabaseID | Should -Be $destDb.ID diff --git a/tests/Copy-DbaDbMail.Tests.ps1 b/tests/Copy-DbaDbMail.Tests.ps1 index c9de445b5b..ee5abb6666 100644 --- a/tests/Copy-DbaDbMail.Tests.ps1 +++ b/tests/Copy-DbaDbMail.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaDbMail" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDbMail - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "Destination", diff --git a/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 b/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 index 3c565f9b3c..e2ecf2b40a 100644 --- a/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 +++ b/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Copy-DbaDbQueryStoreOption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDbQueryStoreOption - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaDbTableData.Tests.ps1 b/tests/Copy-DbaDbTableData.Tests.ps1 index b57f1f0547..6646acd3e4 100644 --- a/tests/Copy-DbaDbTableData.Tests.ps1 +++ b/tests/Copy-DbaDbTableData.Tests.ps1 @@ -8,7 +8,7 @@ Describe "Copy-DbaDbTableData" -Tag "UnitTests" { Context "Parameter validation" { BeforeAll { $command = Get-Command Copy-DbaDbTableData - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Copy-DbaEndpoint.Tests.ps1 b/tests/Copy-DbaEndpoint.Tests.ps1 index d8d5fc7a1b..27a6be9fff 100644 --- a/tests/Copy-DbaEndpoint.Tests.ps1 +++ b/tests/Copy-DbaEndpoint.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaEndpoint" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaEndpoint - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaInstanceAudit.Tests.ps1 b/tests/Copy-DbaInstanceAudit.Tests.ps1 index 182ccd2927..a315a75df6 100644 --- a/tests/Copy-DbaInstanceAudit.Tests.ps1 +++ b/tests/Copy-DbaInstanceAudit.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaInstanceAudit" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaInstanceAudit - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 b/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 index 4d069cad5b..7d7b7dc123 100644 --- a/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 +++ b/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaInstanceAuditSpecification" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaInstanceAuditSpecification - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaInstanceTrigger.Tests.ps1 b/tests/Copy-DbaInstanceTrigger.Tests.ps1 index 08261ca0f7..246f74e78d 100644 --- a/tests/Copy-DbaInstanceTrigger.Tests.ps1 +++ b/tests/Copy-DbaInstanceTrigger.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaInstanceTrigger" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaInstanceTrigger - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'Source', 'SourceSqlCredential', diff --git a/tests/Copy-DbaLinkedServer.Tests.ps1 b/tests/Copy-DbaLinkedServer.Tests.ps1 index 6745c4ddf7..930cfc77ed 100644 --- a/tests/Copy-DbaLinkedServer.Tests.ps1 +++ b/tests/Copy-DbaLinkedServer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaLinkedServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaLinkedServer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaPolicyManagement.Tests.ps1 b/tests/Copy-DbaPolicyManagement.Tests.ps1 index 5ede7bb692..41a07d3489 100644 --- a/tests/Copy-DbaPolicyManagement.Tests.ps1 +++ b/tests/Copy-DbaPolicyManagement.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaPolicyManagement" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaPolicyManagement - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaRegServer.Tests.ps1 b/tests/Copy-DbaRegServer.Tests.ps1 index 40a3317f4e..a8654e2e5f 100644 --- a/tests/Copy-DbaRegServer.Tests.ps1 +++ b/tests/Copy-DbaRegServer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaRegServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaRegServer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaResourceGovernor.Tests.ps1 b/tests/Copy-DbaResourceGovernor.Tests.ps1 index 923d6dc20b..d3143cfe6f 100644 --- a/tests/Copy-DbaResourceGovernor.Tests.ps1 +++ b/tests/Copy-DbaResourceGovernor.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaResourceGovernor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaResourceGovernor - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaSpConfigure.Tests.ps1 b/tests/Copy-DbaSpConfigure.Tests.ps1 index cfb9cc4789..2bc20dd9f8 100644 --- a/tests/Copy-DbaSpConfigure.Tests.ps1 +++ b/tests/Copy-DbaSpConfigure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaSpConfigure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaSpConfigure - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaSsisCatalog.Tests.ps1 b/tests/Copy-DbaSsisCatalog.Tests.ps1 index 60fe65581e..eb23c5ae0f 100644 --- a/tests/Copy-DbaSsisCatalog.Tests.ps1 +++ b/tests/Copy-DbaSsisCatalog.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaSsisCatalog" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaSsisCatalog - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "Destination", diff --git a/tests/Copy-DbaStartupProcedure.Tests.ps1 b/tests/Copy-DbaStartupProcedure.Tests.ps1 index f51baa80de..75a552733c 100644 --- a/tests/Copy-DbaStartupProcedure.Tests.ps1 +++ b/tests/Copy-DbaStartupProcedure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaStartupProcedure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaStartupProcedure - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'Source', 'SourceSqlCredential', diff --git a/tests/Copy-DbaSystemDbUserObject.Tests.ps1 b/tests/Copy-DbaSystemDbUserObject.Tests.ps1 index ac76af2ebc..4fe038ec2e 100644 --- a/tests/Copy-DbaSystemDbUserObject.Tests.ps1 +++ b/tests/Copy-DbaSystemDbUserObject.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaSystemDbUserObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaSystemDbUserObject - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaXESession.Tests.ps1 b/tests/Copy-DbaXESession.Tests.ps1 index 334f2c2399..e5e2d9f298 100644 --- a/tests/Copy-DbaXESession.Tests.ps1 +++ b/tests/Copy-DbaXESession.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaXESession" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaXESession - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Source", "Destination", diff --git a/tests/Copy-DbaXESessionTemplate.Tests.ps1 b/tests/Copy-DbaXESessionTemplate.Tests.ps1 index c1499ba27e..a6d24e63d8 100644 --- a/tests/Copy-DbaXESessionTemplate.Tests.ps1 +++ b/tests/Copy-DbaXESessionTemplate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaXESessionTemplate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaXESessionTemplate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "Path", "Destination", diff --git a/tests/Disable-DbaAgHadr.Tests.ps1 b/tests/Disable-DbaAgHadr.Tests.ps1 index d0a9bffb74..93e430916e 100644 --- a/tests/Disable-DbaAgHadr.Tests.ps1 +++ b/tests/Disable-DbaAgHadr.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaAgHadr" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaAgHadr - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Disable-DbaDbEncryption.Tests.ps1 b/tests/Disable-DbaDbEncryption.Tests.ps1 index 8fca2d5c83..da3c336e96 100644 --- a/tests/Disable-DbaDbEncryption.Tests.ps1 +++ b/tests/Disable-DbaDbEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaDbEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaDbEncryption - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 b/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 index abbdb98a02..a323b8937c 100644 --- a/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaForceNetworkEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaForceNetworkEncryption - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Disable-DbaHideInstance.Tests.ps1 b/tests/Disable-DbaHideInstance.Tests.ps1 index 91550a48eb..217d4dc306 100644 --- a/tests/Disable-DbaHideInstance.Tests.ps1 +++ b/tests/Disable-DbaHideInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaHideInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaHideInstance - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Disable-DbaReplDistributor.Tests.ps1 b/tests/Disable-DbaReplDistributor.Tests.ps1 index 5fcb683ae5..89fd7b6d56 100644 --- a/tests/Disable-DbaReplDistributor.Tests.ps1 +++ b/tests/Disable-DbaReplDistributor.Tests.ps1 @@ -11,7 +11,7 @@ Add-ReplicationLibrary Describe "Disable-DbaReplDistributor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaReplDistributor - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaReplPublishing.Tests.ps1 b/tests/Disable-DbaReplPublishing.Tests.ps1 index 7b63602781..4acaf31dbd 100644 --- a/tests/Disable-DbaReplPublishing.Tests.ps1 +++ b/tests/Disable-DbaReplPublishing.Tests.ps1 @@ -9,7 +9,7 @@ Add-ReplicationLibrary Describe "Disable-DbaReplPublishing" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaReplPublishing - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaStartupProcedure.Tests.ps1 b/tests/Disable-DbaStartupProcedure.Tests.ps1 index cb62f4e3ec..51a43ec833 100644 --- a/tests/Disable-DbaStartupProcedure.Tests.ps1 +++ b/tests/Disable-DbaStartupProcedure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaStartupProcedure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaStartupProcedure - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaTraceFlag.Tests.ps1 b/tests/Disable-DbaTraceFlag.Tests.ps1 index 3954f17521..60f7774bab 100644 --- a/tests/Disable-DbaTraceFlag.Tests.ps1 +++ b/tests/Disable-DbaTraceFlag.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaTraceFlag" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaTraceFlag - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disconnect-DbaInstance.Tests.ps1 b/tests/Disconnect-DbaInstance.Tests.ps1 index 5816f38aaa..6eee476828 100644 --- a/tests/Disconnect-DbaInstance.Tests.ps1 +++ b/tests/Disconnect-DbaInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disconnect-DbaInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disconnect-DbaInstance - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "InputObject", "EnableException", diff --git a/tests/Dismount-DbaDatabase.Tests.ps1 b/tests/Dismount-DbaDatabase.Tests.ps1 index fabede8371..f6054274e0 100644 --- a/tests/Dismount-DbaDatabase.Tests.ps1 +++ b/tests/Dismount-DbaDatabase.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Dismount-DbaDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Dismount-DbaDatabase - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaAgHadr.Tests.ps1 b/tests/Enable-DbaAgHadr.Tests.ps1 index 6b892bc729..4cd12c0800 100644 --- a/tests/Enable-DbaAgHadr.Tests.ps1 +++ b/tests/Enable-DbaAgHadr.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaAgHadr" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaAgHadr - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Enable-DbaDbEncryption.Tests.ps1 b/tests/Enable-DbaDbEncryption.Tests.ps1 index 927afd7b9f..6a4f8bea47 100644 --- a/tests/Enable-DbaDbEncryption.Tests.ps1 +++ b/tests/Enable-DbaDbEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaDbEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaDbEncryption - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaFilestream.Tests.ps1 b/tests/Enable-DbaFilestream.Tests.ps1 index 944ff6c940..4b893c1ebc 100644 --- a/tests/Enable-DbaFilestream.Tests.ps1 +++ b/tests/Enable-DbaFilestream.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaFilestream" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaFilestream - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", @@ -37,7 +37,7 @@ Describe "Enable-DbaFilestream" -Tag "IntegrationTests" { BeforeAll { $global:OriginalFileStream = Get-DbaFilestream -SqlInstance $TestConfig.instance1 } - + AfterAll { if ($global:OriginalFileStream.InstanceAccessLevel -eq 0) { Disable-DbaFilestream -SqlInstance $TestConfig.instance1 -Confirm:$false diff --git a/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 b/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 index 0147133461..5e2d8ec7f8 100644 --- a/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaForceNetworkEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaForceNetworkEncryption - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Enable-DbaHideInstance.Tests.ps1 b/tests/Enable-DbaHideInstance.Tests.ps1 index a2b4885226..7348cb7078 100644 --- a/tests/Enable-DbaHideInstance.Tests.ps1 +++ b/tests/Enable-DbaHideInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaHideInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaHideInstance - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Enable-DbaReplDistributor.Tests.ps1 b/tests/Enable-DbaReplDistributor.Tests.ps1 index c86a5fca21..05b14deeba 100644 --- a/tests/Enable-DbaReplDistributor.Tests.ps1 +++ b/tests/Enable-DbaReplDistributor.Tests.ps1 @@ -9,7 +9,7 @@ Add-ReplicationLibrary Describe "Enable-DbaReplDistributor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaReplDistributor - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaReplPublishing.Tests.ps1 b/tests/Enable-DbaReplPublishing.Tests.ps1 index b72e9a2724..fca3e6233b 100644 --- a/tests/Enable-DbaReplPublishing.Tests.ps1 +++ b/tests/Enable-DbaReplPublishing.Tests.ps1 @@ -9,7 +9,7 @@ Add-ReplicationLibrary Describe "Enable-DbaReplPublishing" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaReplPublishing - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaTraceFlag.Tests.ps1 b/tests/Enable-DbaTraceFlag.Tests.ps1 index 19ea7ed5e1..a6c79891e6 100644 --- a/tests/Enable-DbaTraceFlag.Tests.ps1 +++ b/tests/Enable-DbaTraceFlag.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaTraceFlag" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaTraceFlag - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Expand-DbaDbLogFile.Tests.ps1 b/tests/Expand-DbaDbLogFile.Tests.ps1 index 0d48d3cf11..8eebfc483b 100644 --- a/tests/Expand-DbaDbLogFile.Tests.ps1 +++ b/tests/Expand-DbaDbLogFile.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Expand-DbaDbLogFile" -Tag "UnitTests" { BeforeAll { $command = Get-Command Expand-DbaDbLogFile - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Export-DbaBinaryFile.Tests.ps1 b/tests/Export-DbaBinaryFile.Tests.ps1 index a734aa8814..40d342d48c 100644 --- a/tests/Export-DbaBinaryFile.Tests.ps1 +++ b/tests/Export-DbaBinaryFile.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaBinaryFile" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaBinaryFile - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaCredential.Tests.ps1 b/tests/Export-DbaCredential.Tests.ps1 index 7b97d43bd4..8b92201e95 100644 --- a/tests/Export-DbaCredential.Tests.ps1 +++ b/tests/Export-DbaCredential.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaCredential" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaCredential - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "Identity", diff --git a/tests/Export-DbaDacPackage.Tests.ps1 b/tests/Export-DbaDacPackage.Tests.ps1 index 68fafae28c..cf9154afa9 100644 --- a/tests/Export-DbaDacPackage.Tests.ps1 +++ b/tests/Export-DbaDacPackage.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaDacPackage" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaDacPackage - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaDbTableData.Tests.ps1 b/tests/Export-DbaDbTableData.Tests.ps1 index 3f34dc034b..8b6388f97b 100644 --- a/tests/Export-DbaDbTableData.Tests.ps1 +++ b/tests/Export-DbaDbTableData.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaDbTableData" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaDbTableData - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'InputObject', 'Path', diff --git a/tests/Export-DbaDiagnosticQuery.Tests.ps1 b/tests/Export-DbaDiagnosticQuery.Tests.ps1 index 7487074720..e6b3a4db11 100644 --- a/tests/Export-DbaDiagnosticQuery.Tests.ps1 +++ b/tests/Export-DbaDiagnosticQuery.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaDiagnosticQuery" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaDiagnosticQuery - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "InputObject", "ConvertTo", diff --git a/tests/Export-DbaExecutionPlan.Tests.ps1 b/tests/Export-DbaExecutionPlan.Tests.ps1 index 02defe5886..50e8adb06a 100644 --- a/tests/Export-DbaExecutionPlan.Tests.ps1 +++ b/tests/Export-DbaExecutionPlan.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaExecutionPlan" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaExecutionPlan - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaLinkedServer.Tests.ps1 b/tests/Export-DbaLinkedServer.Tests.ps1 index 140b1fdd54..2f03652674 100644 --- a/tests/Export-DbaLinkedServer.Tests.ps1 +++ b/tests/Export-DbaLinkedServer.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Export-DbaLinkedServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaLinkedServer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "LinkedServer", diff --git a/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 b/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 index f2d4069366..dadaa4421e 100644 --- a/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 +++ b/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaPfDataCollectorSetTemplate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaPfDataCollectorSetTemplate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", - "Credential", + "Credential", "CollectorSet", "Path", "FilePath", diff --git a/tests/Export-DbaRegServer.Tests.ps1 b/tests/Export-DbaRegServer.Tests.ps1 index 847f882da7..90f792f311 100644 --- a/tests/Export-DbaRegServer.Tests.ps1 +++ b/tests/Export-DbaRegServer.Tests.ps1 @@ -8,7 +8,7 @@ Describe "Export-DbaRegServer" -Tag "UnitTests" { Context "Parameter validation" { BeforeAll { $command = Get-Command Export-DbaRegServer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaReplServerSetting.Tests.ps1 b/tests/Export-DbaReplServerSetting.Tests.ps1 index a30c126383..2bb535472d 100644 --- a/tests/Export-DbaReplServerSetting.Tests.ps1 +++ b/tests/Export-DbaReplServerSetting.Tests.ps1 @@ -11,7 +11,7 @@ Add-ReplicationLibrary Describe "Export-DbaReplServerSetting" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaReplServerSetting - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaScript.Tests.ps1 b/tests/Export-DbaScript.Tests.ps1 index aa14776b6c..e167590785 100644 --- a/tests/Export-DbaScript.Tests.ps1 +++ b/tests/Export-DbaScript.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaScript" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaScript - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "InputObject", "ScriptingOptionsObject", diff --git a/tests/Export-DbaServerRole.Tests.ps1 b/tests/Export-DbaServerRole.Tests.ps1 index 430aaa9586..b502afa5f6 100644 --- a/tests/Export-DbaServerRole.Tests.ps1 +++ b/tests/Export-DbaServerRole.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaServerRole" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaServerRole - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', - 'SqlCredential', + 'SqlCredential', 'InputObject', 'ScriptingOptionsObject', 'ServerRole', @@ -45,7 +45,7 @@ Describe "Export-DbaServerRole" -Tags "IntegrationTests" { BeforeAll { $AltExportPath = "$env:USERPROFILE\Documents" $outputFile = "$AltExportPath\Dbatoolsci_ServerRole.sql" - + $random = Get-Random $login1 = "dbatoolsci_exportdbaserverrole_login1$random" $svRole = "dbatoolsci_ScriptPermissions$random" diff --git a/tests/Export-DbaSpConfigure.Tests.ps1 b/tests/Export-DbaSpConfigure.Tests.ps1 index f7e2805e2d..b029438719 100644 --- a/tests/Export-DbaSpConfigure.Tests.ps1 +++ b/tests/Export-DbaSpConfigure.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaSpConfigure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaSpConfigure - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", - "SqlCredential", + "SqlCredential", "Path", "FilePath", "EnableException" diff --git a/tests/Export-DbaSysDbUserObject.Tests.ps1 b/tests/Export-DbaSysDbUserObject.Tests.ps1 index 07ce5b04ab..55e61f8f2c 100644 --- a/tests/Export-DbaSysDbUserObject.Tests.ps1 +++ b/tests/Export-DbaSysDbUserObject.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaSysDbUserObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaSysDbUserObject - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Export-DbaXECsv.Tests.ps1 b/tests/Export-DbaXECsv.Tests.ps1 index fe4e265385..a3c4a29200 100644 --- a/tests/Export-DbaXECsv.Tests.ps1 +++ b/tests/Export-DbaXECsv.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaXECsv" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaXECsv - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "InputObject", - "Path", + "Path", "FilePath", "EnableException" ) diff --git a/tests/Export-DbaXESession.Tests.ps1 b/tests/Export-DbaXESession.Tests.ps1 index 2073206c81..9e8f197537 100644 --- a/tests/Export-DbaXESession.Tests.ps1 +++ b/tests/Export-DbaXESession.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaXESession" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaXESession - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbatoolsConfig.Tests.ps1 b/tests/Export-DbatoolsConfig.Tests.ps1 index 18307e4ebb..a20be041c8 100644 --- a/tests/Export-DbatoolsConfig.Tests.ps1 +++ b/tests/Export-DbatoolsConfig.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Export-DbatoolsConfig" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbatoolsConfig - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "FullName", "Module", diff --git a/tests/Find-DbaAgentJob.Tests.ps1 b/tests/Find-DbaAgentJob.Tests.ps1 index f5d17b28f2..ee3b9e3865 100644 --- a/tests/Find-DbaAgentJob.Tests.ps1 +++ b/tests/Find-DbaAgentJob.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaAgentJob" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaAgentJob - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaBackup.Tests.ps1 b/tests/Find-DbaBackup.Tests.ps1 index a44c16cc23..b02977c555 100644 --- a/tests/Find-DbaBackup.Tests.ps1 +++ b/tests/Find-DbaBackup.Tests.ps1 @@ -14,7 +14,7 @@ Describe "Find-DbaBackup" -Tag "UnitTests" { 'CheckArchiveBit' 'EnableException' ) - $expected = $TestConfig.CommonParameters + $knownParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $knownParameters } Context "Parameter validation" { diff --git a/tests/Find-DbaCommand.Tests.ps1 b/tests/Find-DbaCommand.Tests.ps1 index c9cdad6ec7..c97bc15f7a 100644 --- a/tests/Find-DbaCommand.Tests.ps1 +++ b/tests/Find-DbaCommand.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaCommand" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaCommand - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'Pattern', 'Tag', diff --git a/tests/Find-DbaDbDisabledIndex.Tests.ps1 b/tests/Find-DbaDbDisabledIndex.Tests.ps1 index c0644d2ed7..5aecf2c689 100644 --- a/tests/Find-DbaDbDisabledIndex.Tests.ps1 +++ b/tests/Find-DbaDbDisabledIndex.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaDbDisabledIndex" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbDisabledIndex - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaDbDuplicateIndex.Tests.ps1 b/tests/Find-DbaDbDuplicateIndex.Tests.ps1 index 58ca24efb1..029bd3c44d 100644 --- a/tests/Find-DbaDbDuplicateIndex.Tests.ps1 +++ b/tests/Find-DbaDbDuplicateIndex.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaDbDuplicateIndex" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbDuplicateIndex - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaDbGrowthEvent.Tests.ps1 b/tests/Find-DbaDbGrowthEvent.Tests.ps1 index 361fca9ee6..5120223b4d 100644 --- a/tests/Find-DbaDbGrowthEvent.Tests.ps1 +++ b/tests/Find-DbaDbGrowthEvent.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaDbGrowthEvent" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbGrowthEvent - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaDbUnusedIndex.Tests.ps1 b/tests/Find-DbaDbUnusedIndex.Tests.ps1 index a04ab63a5b..e2cb0f1dff 100644 --- a/tests/Find-DbaDbUnusedIndex.Tests.ps1 +++ b/tests/Find-DbaDbUnusedIndex.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaDbUnusedIndex" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbUnusedIndex - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaInstance.Tests.ps1 b/tests/Find-DbaInstance.Tests.ps1 index 65c90163d7..2a1e0e0b3e 100644 --- a/tests/Find-DbaInstance.Tests.ps1 +++ b/tests/Find-DbaInstance.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaInstance - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "DiscoveryType", diff --git a/tests/Find-DbaLoginInGroup.Tests.ps1 b/tests/Find-DbaLoginInGroup.Tests.ps1 index 44fc7a322b..eea5a2a83e 100644 --- a/tests/Find-DbaLoginInGroup.Tests.ps1 +++ b/tests/Find-DbaLoginInGroup.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaLoginInGroup" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaLoginInGroup - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaOrphanedFile.Tests.ps1 b/tests/Find-DbaOrphanedFile.Tests.ps1 index fc9bef5c19..738e21eba1 100644 --- a/tests/Find-DbaOrphanedFile.Tests.ps1 +++ b/tests/Find-DbaOrphanedFile.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaOrphanedFile" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaOrphanedFile - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaSimilarTable.Tests.ps1 b/tests/Find-DbaSimilarTable.Tests.ps1 index f45a1df27e..5518f13ce9 100644 --- a/tests/Find-DbaSimilarTable.Tests.ps1 +++ b/tests/Find-DbaSimilarTable.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaSimilarTable" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaSimilarTable - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaStoredProcedure.Tests.ps1 b/tests/Find-DbaStoredProcedure.Tests.ps1 index 435ad56b20..643ea74659 100644 --- a/tests/Find-DbaStoredProcedure.Tests.ps1 +++ b/tests/Find-DbaStoredProcedure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaStoredProcedure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaStoredProcedure - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaTrigger.Tests.ps1 b/tests/Find-DbaTrigger.Tests.ps1 index 5e9222a424..685329523d 100644 --- a/tests/Find-DbaTrigger.Tests.ps1 +++ b/tests/Find-DbaTrigger.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaTrigger" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaTrigger - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaUserObject.Tests.ps1 b/tests/Find-DbaUserObject.Tests.ps1 index a1e652aa54..b8b60ac946 100644 --- a/tests/Find-DbaUserObject.Tests.ps1 +++ b/tests/Find-DbaUserObject.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaUserObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaUserObject - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaView.Tests.ps1 b/tests/Find-DbaView.Tests.ps1 index d25901910a..bb894acd1f 100644 --- a/tests/Find-DbaView.Tests.ps1 +++ b/tests/Find-DbaView.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaView" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaView - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgBackupHistory.Tests.ps1 b/tests/Get-DbaAgBackupHistory.Tests.ps1 index 0b27876f25..d1a13bf533 100644 --- a/tests/Get-DbaAgBackupHistory.Tests.ps1 +++ b/tests/Get-DbaAgBackupHistory.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgBackupHistory" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgBackupHistory - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgDatabase.Tests.ps1 b/tests/Get-DbaAgDatabase.Tests.ps1 index b6df0137cc..5a1269ab03 100644 --- a/tests/Get-DbaAgDatabase.Tests.ps1 +++ b/tests/Get-DbaAgDatabase.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgDatabase - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgHadr.Tests.ps1 b/tests/Get-DbaAgHadr.Tests.ps1 index 27cdf1f007..37d3a090bf 100644 --- a/tests/Get-DbaAgHadr.Tests.ps1 +++ b/tests/Get-DbaAgHadr.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaAgHadr" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgHadr - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgReplica.Tests.ps1 b/tests/Get-DbaAgReplica.Tests.ps1 index c87aefcefe..f68c99fb94 100644 --- a/tests/Get-DbaAgReplica.Tests.ps1 +++ b/tests/Get-DbaAgReplica.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgReplica" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgReplica - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentAlert.Tests.ps1 b/tests/Get-DbaAgentAlert.Tests.ps1 index 3157f8f2f5..07fba45a53 100644 --- a/tests/Get-DbaAgentAlert.Tests.ps1 +++ b/tests/Get-DbaAgentAlert.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentAlert" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentAlert - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentAlertCategory.Tests.ps1 b/tests/Get-DbaAgentAlertCategory.Tests.ps1 index f14095aa73..8a61a1c6cf 100644 --- a/tests/Get-DbaAgentAlertCategory.Tests.ps1 +++ b/tests/Get-DbaAgentAlertCategory.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentAlertCategory" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentAlertCategory - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentJobCategory.Tests.ps1 b/tests/Get-DbaAgentJobCategory.Tests.ps1 index e16356345d..b8f6113df2 100644 --- a/tests/Get-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Get-DbaAgentJobCategory.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgentJobCategory" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentJobCategory - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentJobStep.Tests.ps1 b/tests/Get-DbaAgentJobStep.Tests.ps1 index ebb7c05520..380bb9dbc2 100644 --- a/tests/Get-DbaAgentJobStep.Tests.ps1 +++ b/tests/Get-DbaAgentJobStep.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentJobStep" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentJobStep - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentLog.Tests.ps1 b/tests/Get-DbaAgentLog.Tests.ps1 index d694134caa..fe117412f2 100644 --- a/tests/Get-DbaAgentLog.Tests.ps1 +++ b/tests/Get-DbaAgentLog.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgentLog" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentLog - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentOperator.Tests.ps1 b/tests/Get-DbaAgentOperator.Tests.ps1 index 2a91098a81..6269c2aaf9 100644 --- a/tests/Get-DbaAgentOperator.Tests.ps1 +++ b/tests/Get-DbaAgentOperator.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaAgentOperator" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentOperator - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentProxy.Tests.ps1 b/tests/Get-DbaAgentProxy.Tests.ps1 index ae1655a748..9506de1761 100644 --- a/tests/Get-DbaAgentProxy.Tests.ps1 +++ b/tests/Get-DbaAgentProxy.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentProxy" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentProxy - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentServer.Tests.ps1 b/tests/Get-DbaAgentServer.Tests.ps1 index 94e139ae05..6aba3af792 100644 --- a/tests/Get-DbaAgentServer.Tests.ps1 +++ b/tests/Get-DbaAgentServer.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgentServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentServer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAvailabilityGroup.Tests.ps1 b/tests/Get-DbaAvailabilityGroup.Tests.ps1 index ec7adf48aa..8e1497daaf 100644 --- a/tests/Get-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Get-DbaAvailabilityGroup.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAvailabilityGroup" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAvailabilityGroup - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAvailableCollation.Tests.ps1 b/tests/Get-DbaAvailableCollation.Tests.ps1 index 3fe2c828b8..fee137ae59 100644 --- a/tests/Get-DbaAvailableCollation.Tests.ps1 +++ b/tests/Get-DbaAvailableCollation.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaAvailableCollation" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAvailableCollation - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaBackupDevice.Tests.ps1 b/tests/Get-DbaBackupDevice.Tests.ps1 index e96cb69b98..06af8b1d11 100644 --- a/tests/Get-DbaBackupDevice.Tests.ps1 +++ b/tests/Get-DbaBackupDevice.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaBackupDevice" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaBackupDevice - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaBinaryFileTable.Tests.ps1 b/tests/Get-DbaBinaryFileTable.Tests.ps1 index 106703e0f7..53ed4e974b 100644 --- a/tests/Get-DbaBinaryFileTable.Tests.ps1 +++ b/tests/Get-DbaBinaryFileTable.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaBinaryFileTable" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaBinaryFileTable - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaClientAlias.Tests.ps1 b/tests/Get-DbaClientAlias.Tests.ps1 index 1efa7b89b6..0d6665ece6 100644 --- a/tests/Get-DbaClientAlias.Tests.ps1 +++ b/tests/Get-DbaClientAlias.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaClientAlias" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaClientAlias - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaClientProtocol.Tests.ps1 b/tests/Get-DbaClientProtocol.Tests.ps1 index e6e8faace2..a79838303a 100644 --- a/tests/Get-DbaClientProtocol.Tests.ps1 +++ b/tests/Get-DbaClientProtocol.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaClientProtocol" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaClientProtocol - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaCmConnection.Tests.ps1 b/tests/Get-DbaCmConnection.Tests.ps1 index c038633bf1..2466e68f68 100644 --- a/tests/Get-DbaCmConnection.Tests.ps1 +++ b/tests/Get-DbaCmConnection.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaCmConnection" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCmConnection - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "UserName", diff --git a/tests/Get-DbaCmObject.Tests.ps1 b/tests/Get-DbaCmObject.Tests.ps1 index 7b9b31baf1..ba00ab61f0 100644 --- a/tests/Get-DbaCmObject.Tests.ps1 +++ b/tests/Get-DbaCmObject.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaCmObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCmObject - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ClassName", "Query", diff --git a/tests/Get-DbaComputerCertificate.Tests.ps1 b/tests/Get-DbaComputerCertificate.Tests.ps1 index ba93f976a5..ec56fff901 100644 --- a/tests/Get-DbaComputerCertificate.Tests.ps1 +++ b/tests/Get-DbaComputerCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaComputerCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaComputerCertificate - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaComputerSystem.Tests.ps1 b/tests/Get-DbaComputerSystem.Tests.ps1 index 7ccfb0e85e..968dd93f52 100644 --- a/tests/Get-DbaComputerSystem.Tests.ps1 +++ b/tests/Get-DbaComputerSystem.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaComputerSystem" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaComputerSystem - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaConnectedInstance.Tests.ps1 b/tests/Get-DbaConnectedInstance.Tests.ps1 index cf148499c6..79baf374a5 100644 --- a/tests/Get-DbaConnectedInstance.Tests.ps1 +++ b/tests/Get-DbaConnectedInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaConnectedInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaConnectedInstance - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters } Context "Parameter validation" { diff --git a/tests/Get-DbaConnection.Tests.ps1 b/tests/Get-DbaConnection.Tests.ps1 index ae45f8e702..bdc5adc127 100644 --- a/tests/Get-DbaConnection.Tests.ps1 +++ b/tests/Get-DbaConnection.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaConnection" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaConnection - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaCpuRingBuffer.Tests.ps1 b/tests/Get-DbaCpuRingBuffer.Tests.ps1 index bae173c093..a95ee028ec 100644 --- a/tests/Get-DbaCpuRingBuffer.Tests.ps1 +++ b/tests/Get-DbaCpuRingBuffer.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaCpuRingBuffer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCpuRingBuffer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaCpuUsage.Tests.ps1 b/tests/Get-DbaCpuUsage.Tests.ps1 index d34a42aa88..0f6d37d375 100644 --- a/tests/Get-DbaCpuUsage.Tests.ps1 +++ b/tests/Get-DbaCpuUsage.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaCpuUsage" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCpuUsage - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaCredential.Tests.ps1 b/tests/Get-DbaCredential.Tests.ps1 index a02958a1c5..ae4c67f0c6 100644 --- a/tests/Get-DbaCredential.Tests.ps1 +++ b/tests/Get-DbaCredential.Tests.ps1 @@ -19,7 +19,7 @@ Describe "Get-DbaCredential" -Tag "UnitTests" { 'ExcludeIdentity', 'EnableException' ) - $expected = $TestConfig.CommonParameters + $knownParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $knownParameters } Context "Parameter validation" { diff --git a/tests/Get-DbaCustomError.Tests.ps1 b/tests/Get-DbaCustomError.Tests.ps1 index 8761e87011..647f431352 100644 --- a/tests/Get-DbaCustomError.Tests.ps1 +++ b/tests/Get-DbaCustomError.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaCustomError" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCustomError - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbAssembly.Tests.ps1 b/tests/Get-DbaDbAssembly.Tests.ps1 index d1c49b5e2e..1c8ef36adc 100644 --- a/tests/Get-DbaDbAssembly.Tests.ps1 +++ b/tests/Get-DbaDbAssembly.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbAssembly" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbAssembly - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbAsymmetricKey.Tests.ps1 b/tests/Get-DbaDbAsymmetricKey.Tests.ps1 index 75ef68e301..dd1729dec0 100644 --- a/tests/Get-DbaDbAsymmetricKey.Tests.ps1 +++ b/tests/Get-DbaDbAsymmetricKey.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbAsymmetricKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbAsymmetricKey - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbCertificate.Tests.ps1 b/tests/Get-DbaDbCertificate.Tests.ps1 index c847a04354..522979882b 100644 --- a/tests/Get-DbaDbCertificate.Tests.ps1 +++ b/tests/Get-DbaDbCertificate.Tests.ps1 @@ -17,7 +17,7 @@ Describe "Get-DbaDbCertificate" -Tag "UnitTests" { 'InputObject' 'EnableException' ) - $expected = $TestConfig.CommonParameters + $knownParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $knownParameters } Context "Parameter validation" { diff --git a/tests/Get-DbaDbCheckConstraint.Tests.ps1 b/tests/Get-DbaDbCheckConstraint.Tests.ps1 index a99b49fa33..dd09863736 100644 --- a/tests/Get-DbaDbCheckConstraint.Tests.ps1 +++ b/tests/Get-DbaDbCheckConstraint.Tests.ps1 @@ -10,7 +10,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbCheckConstraint" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbCheckConstraint - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbCompatibility.Tests.ps1 b/tests/Get-DbaDbCompatibility.Tests.ps1 index e3bde56882..8d22ffd07f 100644 --- a/tests/Get-DbaDbCompatibility.Tests.ps1 +++ b/tests/Get-DbaDbCompatibility.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbCompatibility" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbCompatibility - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbCompression.Tests.ps1 b/tests/Get-DbaDbCompression.Tests.ps1 index 39f8830e35..4bb1e19ce6 100644 --- a/tests/Get-DbaDbCompression.Tests.ps1 +++ b/tests/Get-DbaDbCompression.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbCompression" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbCompression - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbDbccOpenTran.Tests.ps1 b/tests/Get-DbaDbDbccOpenTran.Tests.ps1 index 51a916eeda..881eed1eff 100644 --- a/tests/Get-DbaDbDbccOpenTran.Tests.ps1 +++ b/tests/Get-DbaDbDbccOpenTran.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbDbccOpenTran" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbDbccOpenTran - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 b/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 index 43fab3f5e7..4e859bb4a6 100644 --- a/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 +++ b/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbDetachedFileInfo" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbDetachedFileInfo - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccHelp.Tests.ps1 b/tests/Get-DbaDbccHelp.Tests.ps1 index d3a05e263e..8eb34ecba2 100644 --- a/tests/Get-DbaDbccHelp.Tests.ps1 +++ b/tests/Get-DbaDbccHelp.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccHelp" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccHelp - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccMemoryStatus.Tests.ps1 b/tests/Get-DbaDbccMemoryStatus.Tests.ps1 index 873f1b6511..7faad26efb 100644 --- a/tests/Get-DbaDbccMemoryStatus.Tests.ps1 +++ b/tests/Get-DbaDbccMemoryStatus.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccMemoryStatus" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccMemoryStatus - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccProcCache.Tests.ps1 b/tests/Get-DbaDbccProcCache.Tests.ps1 index d148f6b017..5157f2e0c9 100644 --- a/tests/Get-DbaDbccProcCache.Tests.ps1 +++ b/tests/Get-DbaDbccProcCache.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccProcCache" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccProcCache - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccSessionBuffer.Tests.ps1 b/tests/Get-DbaDbccSessionBuffer.Tests.ps1 index 61538a8f3e..71ddab1fe7 100644 --- a/tests/Get-DbaDbccSessionBuffer.Tests.ps1 +++ b/tests/Get-DbaDbccSessionBuffer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbccSessionBuffer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccSessionBuffer - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccStatistic.Tests.ps1 b/tests/Get-DbaDbccStatistic.Tests.ps1 index ca090afce1..9a2a3d669a 100644 --- a/tests/Get-DbaDbccStatistic.Tests.ps1 +++ b/tests/Get-DbaDbccStatistic.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccStatistic" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccStatistic - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccUserOption.Tests.ps1 b/tests/Get-DbaDbccUserOption.Tests.ps1 index 93a75ff31a..7e66593f76 100644 --- a/tests/Get-DbaDbccUserOption.Tests.ps1 +++ b/tests/Get-DbaDbccUserOption.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccUserOption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccUserOption - $expected = $TestConfig.CommonParameters + $expected = [System.Management.Automation.PSCmdlet]::CommonParameters $expected += @( "SqlInstance", "SqlCredential",