DSInternals.psm1

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
#
# Script module file for 'DSInternals' module.
#
# Copyright (c) Michael Grafnetter
#

#
# Load the platform-specific libraries.
# Note: This cannot be done in the module manifest,
# as it only supports restricted language mode.
#

$interopAssemblyPath = Join-Path $PSScriptRoot "$env:PROCESSOR_ARCHITECTURE\DSInternals.Replication.Interop.dll"
Add-Type -Path $interopAssemblyPath

#
# Cmdlet aliases
#

New-Alias Set-ADAccountPasswordHash Set-SamAccountPasswordHash
New-Alias Set-WinUserPasswordHash Set-SamAccountPasswordHash
New-Alias ConvertFrom-UnattendXmlPassword ConvertFrom-UnicodePassword
New-Alias ConvertTo-AADHash ConvertTo-OrgIdHash
New-Alias ConvertTo-MsoPasswordHash ConvertTo-OrgIdHash
New-Alias Get-ADReplicationAccount Get-ADReplAccount
New-Alias ConvertFrom-ManagedPasswordBlob ConvertFrom-ADManagedPasswordBlob

# Export the aliases
Export-ModuleMember -Alias * -Cmdlet *