Sha256: e35788c8daa586c54f87c8e46f51ce48e12d05234dfc124eb73870c2c7318a42

Contents?: true

Size: 483 Bytes

Versions: 30

Compression:

Stored size: 483 Bytes

Contents

Param(
    [Parameter(Mandatory=$true)]
    [string]$username,
    [Parameter(Mandatory=$true)]
    [string]$password
)

Add-Type -AssemblyName System.DirectoryServices.AccountManagement

$DSContext = New-Object System.DirectoryServices.AccountManagement.PrincipalContext(
    [System.DirectoryServices.AccountManagement.ContextType]::Machine,
    $env:COMPUTERNAME
)

if ( $DSContext.ValidateCredentials( $username, $password ) ) {
    exit 0
} else {
    exit 1
}

Version data entries

30 entries across 26 versions & 4 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-unbundled-2.1.1.0 plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-unbundled-2.0.4.0 plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-unbundled-2.0.3.0 plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/plugins/hosts/windows/scripts/check_credentials.ps1
vagrant-unbundled-2.0.2.0 plugins/hosts/windows/scripts/check_credentials.ps1