Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Classes/PASAccount.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,35 @@ class PASAccount
}
}# VerifyPassword()

[System.Boolean] VerifySource()
{
$result = $null

switch ($this.SourceType) {
"Host" {
$result = Invoke-PASAPI -APICall ServerManage/CheckTargetHealth -Body ( @{ID=$this.SourceId ; TargetType="Computer"} | ConvertTo-Json )
break;
}
"Database" {
$result = Invoke-PASAPI -APICall ServerManage/CheckTargetHealth -Body ( @{ID=$this.SourceId ; TargetType="Database"} | ConvertTo-Json )
break;
}

}# switch ($this.SourceType)

$this.Healthy = $result

# if the VerifySource comes back okay, return true
if ($result -eq "OK")
{
return $true
}
else
{
return $false
}# if ($result -eq "OK")
}# VerifySource()

[System.Boolean] UpdatePassword($password)
{
# if the account was successfully managed
Expand Down