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

Mass Alias Removal #5582

Merged
merged 18 commits into from
May 24, 2019
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions functions/Add-DbaComputerCertificate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function Add-DbaComputerCertificate {
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = "Low")]
param (
[Alias("ServerInstance", "SqlServer", "SqlInstance")]
[DbaInstance[]]$ComputerName = $env:COMPUTERNAME,
[PSCredential]$Credential,
[Alias("Password")]
Expand All @@ -69,7 +68,6 @@ function Add-DbaComputerCertificate {
[string]$Path,
[string]$Store = "LocalMachine",
[string]$Folder = "My",
[Alias('Silent')]
[switch]$EnableException
)

Expand Down
2 changes: 0 additions & 2 deletions functions/Add-DbaDbRoleMember.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions functions/Add-DbaRegServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function Add-DbaRegServer {
#>
[CmdletBinding(SupportsShouldProcess)]
param (
[Alias("ServerInstance", "SqlServer")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[parameter(Mandatory)]
Expand Down Expand Up @@ -138,7 +137,4 @@ function Add-DbaRegServer {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Add-DbaRegisteredServer
}
}
4 changes: 0 additions & 4 deletions functions/Add-DbaRegServerGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function Add-DbaRegServerGroup {
#>
[CmdletBinding(SupportsShouldProcess)]
param (
[Alias("ServerInstance", "SqlServer")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[parameter(Mandatory)]
Expand Down Expand Up @@ -112,7 +111,4 @@ function Add-DbaRegServerGroup {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -Alias Add-DbaRegisteredServerGroup
}
}
2 changes: 0 additions & 2 deletions functions/Backup-DbaDatabase.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ function Backup-DbaDatabase {
[parameter(ParameterSetName = "Pipe", Mandatory)]
[DbaInstanceParameter]$SqlInstance,
[PSCredential]$SqlCredential,
[Alias("Databases")]
[object[]]$Database,
[object[]]$ExcludeDatabase,
[string[]]$BackupDirectory,
Expand Down Expand Up @@ -210,7 +209,6 @@ function Backup-DbaDatabase {
[string]$TimeStampFormat,
[switch]$IgnoreFileChecks,
[switch]$OutputScriptOnly,
[Alias('Silent')]
[switch]$EnableException
)

Expand Down
4 changes: 0 additions & 4 deletions functions/Backup-DbaDbCertificate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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
)

Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions functions/Backup-DbaDbMasterKey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,4 @@ function Backup-DbaDbMasterKey {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Backup-DbaDatabaseMasterKey
}
}
6 changes: 1 addition & 5 deletions functions/Clear-DbaConnectionPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ function Clear-DbaConnectionPool {
[Alias("cn", "host", "Server")]
[DbaInstanceParameter[]]$ComputerName = $env:COMPUTERNAME,
[PSCredential]$Credential,
[switch][Alias('Silent')]
$EnableException
[switch]$EnableException
)

process {
Expand Down Expand Up @@ -78,7 +77,4 @@ function Clear-DbaConnectionPool {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Clear-DbaSqlConnectionPool
}
}
2 changes: 0 additions & 2 deletions functions/Clear-DbaLatchStatistics.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion functions/Clear-DbaPlanCache.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function Clear-DbaPlanCache {
#>
[CmdletBinding(SupportsShouldProcess)]
param (
[Alias("ServerInstance", "SqlServer", "SqlServers")]
[DbaInstanceParameter[]]$SqlInstance,
[PSCredential]$SqlCredential,
[int]$Threshold = 100,
Expand Down
2 changes: 0 additions & 2 deletions functions/Clear-DbaWaitStatistics.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion functions/Connect-DbaInstance.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions functions/ConvertTo-DbaDataTable.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function ConvertTo-DbaDataTable {
ValueFromPipeline)]
[AllowNull()]
[PSObject[]]$InputObject,
[Parameter(Position = 1)]
[ValidateSet("Ticks",
"TotalDays",
"TotalHours",
Expand All @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions functions/Copy-DbaAgentAlert.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ function Copy-DbaAgentAlert {
[object[]]$ExcludeAlert,
[switch]$IncludeDefaults,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
Expand Down Expand Up @@ -322,7 +321,4 @@ function Copy-DbaAgentAlert {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlAlert
}
}
3 changes: 0 additions & 3 deletions functions/Copy-DbaAgentJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,4 @@ function Copy-DbaAgentJob {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlJob
}
}
5 changes: 0 additions & 5 deletions functions/Copy-DbaAgentJobCategory.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -395,7 +393,4 @@ function Copy-DbaAgentJobCategory {
Copy-JobCategory
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlAgentCategory
}
}
4 changes: 0 additions & 4 deletions functions/Copy-DbaAgentOperator.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ function Copy-DbaAgentOperator {
[object[]]$Operator,
[object[]]$ExcludeOperator,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

Expand Down Expand Up @@ -170,7 +169,4 @@ function Copy-DbaAgentOperator {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlOperator
}
}
5 changes: 0 additions & 5 deletions functions/Copy-DbaAgentProxy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -207,7 +205,4 @@ function Copy-DbaAgentProxy {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlProxyAccount
}
}
4 changes: 0 additions & 4 deletions functions/Copy-DbaAgentSchedule.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
5 changes: 0 additions & 5 deletions functions/Copy-DbaAgentServer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function Copy-DbaAgentServer {
[Switch]$DisableJobsOnDestination,
[Switch]$DisableJobsOnSource,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

Expand Down Expand Up @@ -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
}
}
4 changes: 0 additions & 4 deletions functions/Copy-DbaBackupDevice.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function Copy-DbaBackupDevice {
[PSCredential]$DestinationSqlCredential,
[object[]]$BackupDevice,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
Expand Down Expand Up @@ -217,7 +216,4 @@ function Copy-DbaBackupDevice {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlBackupDevice
}
}
4 changes: 0 additions & 4 deletions functions/Copy-DbaCredential.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ function Copy-DbaCredential {
[Alias('ExcludeCredentialIdentity')]
[string[]]$ExcludeIdentity,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

Expand Down Expand Up @@ -217,7 +216,4 @@ function Copy-DbaCredential {
Copy-Credential $credentials -force:$force
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlCredential
}
}
4 changes: 0 additions & 4 deletions functions/Copy-DbaCustomError.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ function Copy-DbaCustomError {
[object[]]$CustomError,
[object[]]$ExcludeCustomError,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)

Expand Down Expand Up @@ -172,7 +171,4 @@ function Copy-DbaCustomError {
}
}
}
end {
Test-DbaDeprecation -DeprecatedOn "1.0.0" -EnableException:$false -Alias Copy-SqlCustomError
}
}
6 changes: 0 additions & 6 deletions functions/Copy-DbaDataCollector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ function Copy-DbaDataCollector {
[object[]]$ExcludeCollectionSet,
[switch]$NoServerReconfig,
[switch]$Force,
[Alias('Silent')]
[switch]$EnableException
)
begin {
Expand Down Expand Up @@ -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 }
}
}
Loading