PSMyPassword.psm1

function Write-Color { 
    <#
    .SYNOPSIS
        Write-Color is a wrapper around Write-Host.
 
        It provides:
        - Easy manipulation of colors,
        - Logging output to file (log)
        - Nice formatting options out of the box.
 
    .DESCRIPTION
        Author: przemyslaw.klys at evotec.pl
        Project website: https://evotec.xyz/hub/scripts/write-color-ps1/
        Project support: https://github.com/EvotecIT/PSWriteColor
 
        Original idea: Josh (https://stackoverflow.com/users/81769/josh)
 
    .EXAMPLE
    Write-Color -Text "Red ", "Green ", "Yellow " -Color Red,Green,Yellow
 
    .EXAMPLE
    Write-Color -Text "This is text in Green ",
                    "followed by red ",
                    "and then we have Magenta... ",
                    "isn't it fun? ",
                    "Here goes DarkCyan" -Color Green,Red,Magenta,White,DarkCyan
 
    .EXAMPLE
    Write-Color -Text "This is text in Green ",
                    "followed by red ",
                    "and then we have Magenta... ",
                    "isn't it fun? ",
                    "Here goes DarkCyan" -Color Green,Red,Magenta,White,DarkCyan -StartTab 3 -LinesBefore 1 -LinesAfter 1
 
    .EXAMPLE
    Write-Color "1. ", "Option 1" -Color Yellow, Green
    Write-Color "2. ", "Option 2" -Color Yellow, Green
    Write-Color "3. ", "Option 3" -Color Yellow, Green
    Write-Color "4. ", "Option 4" -Color Yellow, Green
    Write-Color "9. ", "Press 9 to exit" -Color Yellow, Gray -LinesBefore 1
 
    .EXAMPLE
    Write-Color -LinesBefore 2 -Text "This little ","message is ", "written to log ", "file as well." `
                -Color Yellow, White, Green, Red, Red -LogFile "C:\testing.txt" -TimeFormat "yyyy-MM-dd HH:mm:ss"
    Write-Color -Text "This can get ","handy if ", "want to display things, and log actions to file ", "at the same time." `
                -Color Yellow, White, Green, Red, Red -LogFile "C:\testing.txt"
 
    .EXAMPLE
    # Added in 0.5
    Write-Color -T "My text", " is ", "all colorful" -C Yellow, Red, Green -B Green, Green, Yellow
    wc -t "my text" -c yellow -b green
    wc -text "my text" -c red
 
    .NOTES
        Additional Notes:
        - TimeFormat https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
    #>

    [alias('Write-Colour')]
    [CmdletBinding()]
    param ([alias ('T')] [String[]]$Text,
        [alias ('C', 'ForegroundColor', 'FGC')] [ConsoleColor[]]$Color = [ConsoleColor]::White,
        [alias ('B', 'BGC')] [ConsoleColor[]]$BackGroundColor = $null,
        [alias ('Indent')][int] $StartTab = 0,
        [int] $LinesBefore = 0,
        [int] $LinesAfter = 0,
        [int] $StartSpaces = 0,
        [alias ('L')] [string] $LogFile = '',
        [Alias('DateFormat', 'TimeFormat')][string] $DateTimeFormat = 'yyyy-MM-dd HH:mm:ss',
        [alias ('LogTimeStamp')][bool] $LogTime = $true,
        [int] $LogRetry = 2,
        [ValidateSet('unknown', 'string', 'unicode', 'bigendianunicode', 'utf8', 'utf7', 'utf32', 'ascii', 'default', 'oem')][string]$Encoding = 'Unicode',
        [switch] $ShowTime,
        [switch] $NoNewLine)
    $DefaultColor = $Color[0]
    if ($null -ne $BackGroundColor -and $BackGroundColor.Count -ne $Color.Count) {
        Write-Error "Colors, BackGroundColors parameters count doesn't match. Terminated."
        return
    }
    if ($LinesBefore -ne 0) { for ($i = 0; $i -lt $LinesBefore; $i++) { Write-Host -Object "`n" -NoNewline } }
    if ($StartTab -ne 0) { for ($i = 0; $i -lt $StartTab; $i++) { Write-Host -Object "`t" -NoNewline } }
    if ($StartSpaces -ne 0) { for ($i = 0; $i -lt $StartSpaces; $i++) { Write-Host -Object ' ' -NoNewline } }
    if ($ShowTime) { Write-Host -Object "[$([datetime]::Now.ToString($DateTimeFormat))] " -NoNewline }
    if ($Text.Count -ne 0) {
        if ($Color.Count -ge $Text.Count) { if ($null -eq $BackGroundColor) { for ($i = 0; $i -lt $Text.Length; $i++) { Write-Host -Object $Text[$i] -ForegroundColor $Color[$i] -NoNewline } } else { for ($i = 0; $i -lt $Text.Length; $i++) { Write-Host -Object $Text[$i] -ForegroundColor $Color[$i] -BackgroundColor $BackGroundColor[$i] -NoNewline } } } else {
            if ($null -eq $BackGroundColor) {
                for ($i = 0; $i -lt $Color.Length; $i++) { Write-Host -Object $Text[$i] -ForegroundColor $Color[$i] -NoNewline }
                for ($i = $Color.Length; $i -lt $Text.Length; $i++) { Write-Host -Object $Text[$i] -ForegroundColor $DefaultColor -NoNewline }
            } else {
                for ($i = 0; $i -lt $Color.Length; $i++) { Write-Host -Object $Text[$i] -ForegroundColor $Color[$i] -BackgroundColor $BackGroundColor[$i] -NoNewline }
                for ($i = $Color.Length; $i -lt $Text.Length; $i++) { Write-Host -Object $Text[$i] -ForegroundColor $DefaultColor -BackgroundColor $BackGroundColor[0] -NoNewline }
            }
        }
    }
    if ($NoNewLine -eq $true) { Write-Host -NoNewline } else { Write-Host }
    if ($LinesAfter -ne 0) { for ($i = 0; $i -lt $LinesAfter; $i++) { Write-Host -Object "`n" -NoNewline } }
    if ($Text.Count -and $LogFile) {
        $TextToFile = ""
        for ($i = 0; $i -lt $Text.Length; $i++) { $TextToFile += $Text[$i] }
        $Saved = $false
        $Retry = 0
        Do {
            $Retry++
            try {
                if ($LogTime) { "[$([datetime]::Now.ToString($DateTimeFormat))] $TextToFile" | Out-File -FilePath $LogFile -Encoding $Encoding -Append -ErrorAction Stop -WhatIf:$false } else { "$TextToFile" | Out-File -FilePath $LogFile -Encoding $Encoding -Append -ErrorAction Stop -WhatIf:$false }
                $Saved = $true
            } catch { if ($Saved -eq $false -and $Retry -eq $LogRetry) { $PSCmdlet.WriteError($_) } else { Write-Warning "Write-Color - Couldn't write to log file $($_.Exception.Message). Retrying... ($Retry/$LogRetry)" } }
        } Until ($Saved -eq $true -or $Retry -ge $LogRetry)
    }
}
function Protect-MyPassword {
    [cmdletBinding(DefaultParameterSetName = 'SecurePassword')]
    param (
        # [Parameter(Position = 0, Mandatory = $false, ValueFromPipeline = $false)][string] $UserName = 'ThisIsNotImportant',

        [Parameter(ParameterSetName = 'SecurePassword')][securestring] $Password,
        [Parameter(ParameterSetName = 'PlainTextPassword')][string] $PlainTextPassword,
        [Parameter()][alias('FilePath')][string] $Path,
        [validateset("File", 'Screen')][string] $Output = 'Screen',
        [string] $AsUserName,
        [string] $AsPassword
    )
    #if (($AsUserName) -and ($AsPassword)) {
    # $SecurePassword = $AsPassword | ConvertTo-SecureString -AsPlainText -Force
    # $Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $AsUserName, $SecurePassword
    # Invoke-Command -ComputerName $Env:COMPUTERNAME -Credential $Credentials -ScriptBlock {
    # Write-Color "Test", ' ', $Env:USERNAME
    # }
    #}
    #return
    <#
    if (-not $Password) {
        if ($UserName) {
            $SecureCredentials = Get-Credential -UserName $UserName -Message 'Please enter password to secure'
        } else {
            $SecureCredentials = Get-Credential -Message 'Please enter password to secure'
        }
        $SecurePassword = $SecureCredentials.Password | ConvertFrom-SecureString
    } else {
        $SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString
    }
    #>

    if ($PlainTextPassword) {
        $SecurePassword = $PlainTextPassword | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString
    } elseif ($Password) {
        $SecurePassword = $Password | ConvertFrom-SecureString
    } else {
        Write-Color -Text "Please provide password you want to encrypt: " -Color Yellow -NoNewLine
        $Password = Read-Host -AsSecureString
        $SecurePassword = $Password | ConvertFrom-SecureString
    }

    if ($Output -eq 'File') {
        if ($Path -ne '') {
            $SecurePassword | Out-File -FilePath $Path

            $FullPath = Resolve-Path $Path
            if ($FullPath) {
                Write-Color -Text 'Protect-MyPassword', ' - ', 'secure file created in path ', $FullPath -Color Yellow, White, White, Yellow
            } else {
                Write-Color -Text 'Protect-MyPassword', ' - ', "can't find file at ", $FullPath -Color Yellow, White, White, Yellow
            }
        } else {
            Write-Color -Text 'Protect-MyPassword - File Path ', $Path, " is empty. Terminating." -Color White, Red, White
        }
    } elseif ($Output -eq 'Screen') {
        return $SecurePassword
    }
    return
}
function Set-MyPassword {
    <#
    .SYNOPSIS
    Allows the user to change the password of the Active Directory account using PowerShell, including when the password is expired.
 
    .DESCRIPTION
    Allows the user to change the password of the Active Directory account using PowerShell, including when the password is expired. This command can be run on a computer outside of the domain and doesn't require any special permissions.
 
    .PARAMETER UserName
    Provide username to change password for. If not provided user will be prompted to provide one
 
    .PARAMETER OldPassword
    Provide old password for the user. If not provided user will be prompted to provide one
 
    .PARAMETER NewPassword
    Provide new password for the user. If not provided user will be prompted to provide one
 
    .PARAMETER DomainController
    Provide DomainController name or ip address. If user doesn't provide Domain Controller name, the command will try to find it automatically (if computer is part of the domain)
 
    .PARAMETER Domain
    Provide Domain name. If user doesn't provide Domain name, the command will try to find it automatically (if computer is part of the domain)
 
    .EXAMPLE
    Set-MyPassword
 
    .EXAMPLE
    Set-MyPassword -UserName "svc_test" -DomainController "ad1.ad.evotec.xyz"
 
    .NOTES
    General notes
    #>

    [CmdletBinding(DefaultParameterSetName = 'Secure')]
    param(
        [Parameter(ParameterSetName = 'Secure')][string] $UserName,
        [Parameter(ParameterSetName = 'Secure')][securestring] $OldPassword,
        [Parameter(ParameterSetName = 'Secure')][securestring] $NewPassword,
        [Parameter(ParameterSetName = 'Secure')][alias('DC', 'Server', 'ComputerName')][string] $DomainController,
        [Parameter(ParameterSetName = 'Secure')][string] $Domain,
        [switch] $NoConfirm
    )
    Begin {
        $Failed = $false
        Write-Color
        if (-not $DomainController) {
            if ($env:COMPUTERNAME -eq $env:USERDOMAIN) {
                # not joined to domain, lets prompt for DC
                Write-Color -Text "No Active Directory detected. ", "Please provide Domain Controller ", "DNS name or IP Address", ' to continue: ' -NoNewLine -Color Gray, Yellow, Gray, Yellow
                $DomainController = Read-Host
            } else {
                if (-not $Domain) {
                    $Domain = $Env:USERDNSDOMAIN
                }
                try {
                    $Context = [System.DirectoryServices.ActiveDirectory.DirectoryContext]::new([System.DirectoryServices.ActiveDirectory.DirectoryContextType]::Domain, $Domain)
                    $DomainController = ([System.DirectoryServices.ActiveDirectory.DomainController]::FindOne($Context)).Name
                    Write-Color -Text "Detected domain: ", $Domain, " and domain controller: ", $DomainController -Color White, Yellow, White, Yellow
                } catch {
                    Write-Color -Text "Detected domain: ", $Domain, " but couldn't detect domain controller. Please provide one: " -NoNewLine
                    $DomainController = Read-Host #-Prompt 'Domain Controller DNS name or IP Address'
                }
            }
        }
        if (-not $UserName) {
            Write-Color -Text "Please provide username you would like to change password for: " -Color Yellow -NoNewLine
            $UserName = Read-Host
            if (-not $UserName) {
                Write-Color -Text "Password change for account failed. ", "Username not provided." -Color Gray, Red, Gray, Red
                $Failed = $true
            }
        }
        if (-not $OldPassword) {
            Write-Color -Text "Please provide old password: " -Color Yellow -NoNewLine
            $OldPassword = Read-Host -AsSecureString
            $OldPasswordPlain = [System.Net.NetworkCredential]::new([string]::Empty, $OldPassword).Password
        }
        if (-not $NewPassword) {
            Write-Color -Text "Please provide new password: " -Color Yellow -NoNewLine
            $NewPassword = Read-Host -AsSecureString
            $NewPasswordPlain = [System.Net.NetworkCredential]::new([string]::Empty, $NewPassword).Password
            Write-Color -Text "Please provide new password again: " -Color Yellow -NoNewLine
            $NewPasswordCheck = Read-Host -AsSecureString
            $NewPasswordCheckPlain = [System.Net.NetworkCredential]::new([string]::Empty, $NewPasswordCheck).Password
            if ($NewPasswordCheckPlain -ne $NewPasswordPlain) {
                Write-Color -Text "New passwords don't match. Password change for account ", $UserName, " failed." -Color Gray, Red, Gray
                $Failed = $true
            }
        }
    }
    Process {
        if ($Failed) {
            return
        } elseif ($DomainController -and $OldPassword -and $NewPassword -and $UserName) {
            $DllImport = @'
[DllImport("netapi32.dll", CharSet = CharSet.Unicode)]
public static extern bool NetUserChangePassword(string domain, string username, string oldpassword, string newpassword);
'@

            try {
                $NetApi32 = Add-Type -MemberDefinition $DllImport -Name 'NetApi32' -Namespace 'Win32' -PassThru -ErrorAction Stop
            } catch {
                Write-Color -Text "Password change for account ", $UserName, " failed. Error: ", $_.Exception.Message -Color Gray, Red, Gray, Red
                return
            }

            if (-not $NoConfirm) {
                Write-Color -Text "You're about to change password for account ", $UserName, " on domain ", $Domain, " using domain controller ", $DomainController, ". " -Color Gray, Yellow, Gray, Yellow, Gray, Yellow
                Write-Color
                Write-Color -Text "Please press Y to approve change, or N to prevent password change and confirm with ENTER: " -Color Magenta -NoNewLine
                $Confirm = Read-Host
                if ($Confirm -ne 'Y') {
                    Write-Color -Text "Password change for account ", $UserName, " aborted." -Color Gray, Red, Gray
                    return
                }
            }
            $result = $NetApi32::NetUserChangePassword($DomainController, $UserName, $OldPasswordPlain, $NewPasswordPlain)
            if ($result) {
                Write-Color -Text "Password change for account ", $UserName, " failed on $DomainController." -Color Gray, Red, Gray, Red
            } else {
                Write-Color -Text "Password change for account ", $UserName, " succeeded on $DomainController." -Color Gray, Green, Gray, Green
            }
        } else {
            Write-Color -Text "Password change for account failed. All parameters are required. " -Color Red
        }
    }
    End {
        $OldPassword = $null
        $OldPasswordPlain = $null
        $NewPassword = $null
        $NewPasswordPlain = $null
        $NewPasswordCheck = $null
        $NewPasswordCheckPlain = $null
        [System.GC]::Collect()
    }
}
function Test-MyPassword {
    <#
    .SYNOPSIS
    Tests if the password is valid against the domain.
 
    .DESCRIPTION
    Tests if the password is valid against the domain.
 
    .PARAMETER UserName
    Provide username to test password for. If not provided user will be prompted to provide one
 
    .PARAMETER Password
    Provide password for the user. If not provided user will be prompted to provide one
 
    .PARAMETER Domain
    Provide Domain name. If user doesn't provide Domain name, the command will try to find it automatically (if computer is part of the domain)
 
    .PARAMETER ReturnObject
    Request return of an object for additional testing
 
    .EXAMPLE
    Test-MyPassword
 
    .NOTES
    General notes
    #>

    [CmdletBinding()]
    param(
        [string] $UserName,
        [securestring] $Password,
        [string] $Domain,
        [switch] $ReturnObject
    )
    Begin {
        if (-not $Domain) {
            $Domain = $env:USERDOMAIN
        }
        if (-not $UserName) {
            Write-Color -Text "Please provide ", "UserName", " you want to test: " -Color Gray, Yellow, Gray -NoNewLine
            $UserName = Read-Host
        }
        if (-not $Password) {
            Write-Color -Text "Please provide ", "Password", " for the account: " -Color Gray, Yellow, Gray -NoNewLine
            $Password = Read-Host -AsSecureString
        }
        $PasswordPlain = [System.Net.NetworkCredential]::new([string]::Empty, $Password).Password
    }
    Process {
        Add-Type -AssemblyName System.DirectoryServices.AccountManagement
        $Context = [System.DirectoryServices.AccountManagement.ContextType]::Domain
        $PrincipalContext = [System.DirectoryServices.AccountManagement.PrincipalContext]::new($Context, $Domain)
        $ProperPassword = $PrincipalContext.ValidateCredentials($UserName, $PasswordPlain)
        if ($ProperPassword) {
            Write-Color -Text "Password is valid for the account: ", $UserName, " in the domain: ", $Domain, "." -Color Gray, Green, Gray, Green, Gray
        } else {
            Write-Color -Text "Password is not valid for the account: ", $UserName, " in the domain: ", $Domain, "." -Color Gray, Red, Gray, Red, Gray
        }
        if ($ReturnObject) {
            [PSCustomobject] @{
                UserName        = $UserName
                Domain          = $Domain
                IsPasswordValid = $ProperPassword
            }
        }
    }
    End {
        $Password = $null
        $PasswordPlain = $null
        [System.GC]::Collect()
    }
}



# Export functions and aliases as required
Export-ModuleMember -Function @('Protect-MyPassword', 'Set-MyPassword', 'Test-MyPassword') -Alias @()
# SIG # Begin signature block
# MIIdWQYJKoZIhvcNAQcCoIIdSjCCHUYCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUKr1jsvvNQZpVt5LvYio6v8wa
# BNygghhnMIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0B
# AQUFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD
# VQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVk
# IElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQsw
# CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaU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