Skip to content
Permalink
Browse files

Mass Alias Removal (#5582)

* remove things

* removed a lot of aliases

* remove more

* remove silent

* remove cred alias

* remove test-dep

* remove test-dep and fix enableexception

* fix alias usage

* replace -sqlserver

* cleanup

* remove test dep notices

* nodeps

* lil fixes

* fixes

* removed detailed from output

* fix that

* params

* formats
  • Loading branch information...
potatoqualitee committed May 24, 2019
1 parent 84db300 commit 7b92b60b2aea45570ff518aec2b4189f2d6b47a1
Showing 482 changed files with 217 additions and 1,447 deletions.
@@ -59,7 +59,6 @@ function Add-DbaComputerCertificate {
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Low")]
param (
[Alias("ServerInstance", "SqlServer", "SqlInstance")]
[DbaInstance[]]$ComputerName = $env:COMPUTERNAME,
[PSCredential]$Credential,
[Alias("Password")]
@@ -69,7 +68,6 @@ function Add-DbaComputerCertificate {
[string]$Path,
[string]$Store = "LocalMachine",
[string]$Folder = "My",
[Alias('Silent')]
[switch]$EnableException
)

@@ -77,9 +77,7 @@ function Add-DbaDbRoleMember {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
param (
[parameter(ValueFromPipeline)]
[Alias("ServerInstance", "SqlServer")]
[DbaInstance[]]$SqlInstance,
[Alias("Credential")]
[PSCredential]$SqlCredential,
[string[]]$Database,
[string[]]$Role,
@@ -76,7 +76,6 @@ function Add-DbaRegServer {
#>
[CmdletBinding(SupportsShouldProcess)]
param (
[Alias("ServerInstance", "SqlServer")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[parameter(Mandatory)]
@@ -138,7 +137,4 @@ function Add-DbaRegServer {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Add-DbaRegisteredServer
}
}
@@ -66,7 +66,6 @@ function Add-DbaRegServerGroup {
#>
[CmdletBinding(SupportsShouldProcess)]
param (
[Alias("ServerInstance", "SqlServer")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[parameter(Mandatory)]
@@ -112,7 +111,4 @@ function Add-DbaRegServerGroup {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Add-DbaRegisteredServerGroup
}
}
@@ -181,7 +181,6 @@ function Backup-DbaDatabase {
[parameter(ParameterSetName = "Pipe", Mandatory)]
[DbaInstanceParameter]$SqlInstance,
[PSCredential]$SqlCredential,
[Alias("Databases")]
[object[]]$Database,
[object[]]$ExcludeDatabase,
[string[]]$BackupDirectory,
@@ -210,7 +209,6 @@ function Backup-DbaDatabase {
[string]$TimeStampFormat,
[switch]$IgnoreFileChecks,
[switch]$OutputScriptOnly,
[Alias('Silent')]
[switch]$EnableException
)

@@ -112,7 +112,6 @@ function Backup-DbaDbCertificate {
[CmdletBinding(DefaultParameterSetName = "Default", SupportsShouldProcess, ConfirmImpact = 'Low')]
param (
[parameter(Mandatory, ParameterSetName = "instance")]
[Alias("ServerInstance", "SqlServer")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[parameter(ParameterSetName = "instance")]
@@ -127,7 +126,6 @@ function Backup-DbaDbCertificate {
[string]$Suffix = "$(Get-Date -format 'yyyyMMddHHmmssms')",
[parameter(ValueFromPipeline, ParameterSetName = "collection")]
[Microsoft.SqlServer.Management.Smo.Certificate[]]$InputObject,
[Alias('Silent')]
[switch]$EnableException
)

@@ -136,8 +134,6 @@ function Backup-DbaDbCertificate {
Stop-Function -Message "If you specify a decryption password, you must also specify an encryption password" -Target $DecryptionPassword
}

Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Backup-DbaDatabaseCertificate

function export-cert ($cert) {
$certName = $cert.Name
$db = $cert.Parent
@@ -155,7 +155,4 @@ function Backup-DbaDbMasterKey {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Backup-DbaDatabaseMasterKey
}
}
@@ -49,8 +49,7 @@ function Clear-DbaConnectionPool {
[Alias("cn", "host", "Server")]
[DbaInstanceParameter[]]$ComputerName = $env:COMPUTERNAME,
[PSCredential]$Credential,
[switch][Alias('Silent')]
$EnableException
[switch]$EnableException
)

process {
@@ -78,7 +77,4 @@ function Clear-DbaConnectionPool {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Clear-DbaSqlConnectionPool
}
}
@@ -59,10 +59,8 @@ function Clear-DbaLatchStatistics {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Singular Noun doesn't make sense")]
param (
[parameter(Mandatory, ValueFromPipeline)]
[Alias("ServerInstance", "SqlServer", "SqlServers")]
[DbaInstance[]]$SqlInstance,
[PSCredential]$SqlCredential,
[Alias('Silent')]
[switch]$EnableException
)
process {
@@ -62,7 +62,6 @@ function Clear-DbaPlanCache {
#>
[CmdletBinding(SupportsShouldProcess)]
param (
[Alias("ServerInstance", "SqlServer", "SqlServers")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[int]$Threshold = 100,
@@ -49,10 +49,8 @@ function Clear-DbaWaitStatistics {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Singular Noun doesn't make sense")]
param (
[parameter(Mandatory, ValueFromPipeline)]
[Alias("ServerInstance", "SqlServer", "SqlServers")]
[DbaInstance[]]$SqlInstance,
[PSCredential]$SqlCredential,
[Alias('Silent')]
[switch]$EnableException
)
process {
@@ -227,7 +227,6 @@ function Connect-DbaInstance {
[Parameter(Mandatory, ValueFromPipeline)]
[Alias("ServerInstance", "SqlServer", "Connstring", "ConnectionString")]
[DbaInstanceParameter[]]$SqlInstance,
[Alias("Credential")]
[PSCredential]$SqlCredential,
[string]$Database,
[string]$AccessToken,
@@ -74,7 +74,6 @@ function ConvertTo-DbaDataTable {
ValueFromPipeline)]
[AllowNull()]
[PSObject[]]$InputObject,
[Parameter(Position = 1)]
[ValidateSet("Ticks",
"TotalDays",
"TotalHours",
@@ -88,14 +87,12 @@ function ConvertTo-DbaDataTable {
[string]$SizeType = "Int64",
[switch]$IgnoreNull,
[switch]$Raw,
[Alias('Silent')]
[switch]$EnableException
)

begin {
Write-Message -Level Debug -Message "Bound parameters: $($PSBoundParameters.Keys -join ", ")"
Write-Message -Level Debug -Message "TimeSpanType = $TimeSpanType | SizeType = $SizeType"
Test-DbaDeprecation -DeprecatedOn 1.0.0 -Alias Out-DbaDataTable

function Convert-Type {
# This function will check so that the type is an accepted type which could be used when inserting into a table.
@@ -84,7 +84,6 @@ function Copy-DbaAgentAlert {
[object[]]$ExcludeAlert,
[switch]$IncludeDefaults,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
@@ -322,7 +321,4 @@ function Copy-DbaAgentAlert {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlAlert
}
}
@@ -283,7 +283,4 @@ function Copy-DbaAgentJob {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlJob
}
}
@@ -96,12 +96,10 @@ function Copy-DbaAgentJobCategory {
[string[]]$AgentCategory,
[string[]]$OperatorCategory,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

begin {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Copy-DbaAgentCategory
function Copy-JobCategory {
<#
.SYNOPSIS
@@ -395,7 +393,4 @@ function Copy-DbaAgentJobCategory {
Copy-JobCategory
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlAgentCategory
}
}
@@ -82,7 +82,6 @@ function Copy-DbaAgentOperator {
[object[]]$Operator,
[object[]]$ExcludeOperator,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

@@ -170,7 +169,4 @@ function Copy-DbaAgentOperator {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlOperator
}
}
@@ -80,11 +80,9 @@ function Copy-DbaAgentProxy {
[string[]]$ProxyAccount,
[string[]]$ExcludeProxyAccount,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Copy-DbaAgentProxyAccount
try {
$sourceServer = Connect-SqlInstance -SqlInstance $Source -SqlCredential $SourceSqlCredential -MinimumVersion 9
} catch {
@@ -207,7 +205,4 @@ function Copy-DbaAgentProxy {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlProxyAccount
}
}
@@ -181,8 +181,4 @@ function Copy-DbaAgentSchedule {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Copy-DbaAgentSharedSchedule
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlSharedSchedule
}
}
@@ -80,7 +80,6 @@ function Copy-DbaAgentServer {
[Switch]$DisableJobsOnDestination,
[Switch]$DisableJobsOnSource,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

@@ -174,8 +173,4 @@ function Copy-DbaAgentServer {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlServerAgent
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-DbaSqlServerAgent
}
}
@@ -76,7 +76,6 @@ function Copy-DbaBackupDevice {
[PSCredential]$DestinationSqlCredential,
[object[]]$BackupDevice,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
@@ -217,7 +216,4 @@ function Copy-DbaBackupDevice {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlBackupDevice
}
}
@@ -97,7 +97,6 @@ function Copy-DbaCredential {
[Alias('ExcludeCredentialIdentity')]
[string[]]$ExcludeIdentity,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

@@ -217,7 +216,4 @@ function Copy-DbaCredential {
Copy-Credential $credentials -force:$force
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlCredential
}
}
@@ -87,7 +87,6 @@ function Copy-DbaCustomError {
[object[]]$CustomError,
[object[]]$ExcludeCustomError,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

@@ -172,7 +171,4 @@ function Copy-DbaCustomError {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlCustomError
}
}
@@ -91,7 +91,6 @@ function Copy-DbaDataCollector {
[object[]]$ExcludeCollectionSet,
[switch]$NoServerReconfig,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
@@ -247,9 +246,4 @@ function Copy-DbaDataCollector {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlDataCollector
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-DbaSqlDataCollector
if (Test-FunctionInterrupt) { return }
}
}

0 comments on commit 7b92b60

Please sign in to comment.
You can’t perform that action at this time.