forked from dataplat/dbatools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
typealiases.ps1
34 lines (32 loc) · 1.86 KB
/
typealiases.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Obtain a reference to the TypeAccelerators type
$TAType = [psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")
# Define our type aliases
$TypeAliasTable = @{
DbaInstance = "Dataplat.Dbatools.Parameter.DbaInstanceParameter"
DbaCmConnectionParameter = "Dataplat.Dbatools.Parameter.DbaCmConnectionParameter"
DbaInstanceParameter = "Dataplat.Dbatools.Parameter.DbaInstanceParameter"
dbargx = "Dataplat.Dbatools.Utility.RegexHelper"
dbatime = "Dataplat.Dbatools.Utility.DbaTime"
dbadatetime = "Dataplat.Dbatools.Utility.DbaDateTime"
dbadate = "Dataplat.Dbatools.Utility.DbaDate"
dbatimespan = "Dataplat.Dbatools.Utility.DbaTimeSpan"
prettytimespan = "Dataplat.Dbatools.Utility.DbaTimeSpanPretty"
dbasize = "Dataplat.Dbatools.Utility.Size"
dbavalidate = "Dataplat.Dbatools.Utility.Validation"
DbaMode = "Dataplat.Dbatools.General.ExecutionMode"
DbaCredential = "Dataplat.Dbatools.Parameter.DbaCredentialparameter"
DbaCredentialParameter = "Dataplat.Dbatools.Parameter.DbaCredentialparameter"
DbaDatabaseSmo = "Dataplat.Dbatools.Parameter.DbaDatabaseSmoParameter"
DbaDatabaseSmoParameter = "Dataplat.Dbatools.Parameter.DbaDatabaseSmoParameter"
DbaDatabase = "Dataplat.Dbatools.Parameter.DbaDatabaseParameter"
DbaDatabaseParameter = "Dataplat.Dbatools.Parameter.DbaDatabaseParameter"
DbaValidatePattern = "Dataplat.Dbatools.Utility.DbaValidatePatternAttribute"
DbaValidateScript = "Dataplat.Dbatools.Utility.DbaValidateScriptAttribute"
}
# Add all type aliases
foreach ($TypeAlias in $TypeAliasTable.Keys) {
try {
$TAType::Add($TypeAlias, $TypeAliasTable[$TypeAlias])
} catch {
}
}