Check .GetType rather than object directly
This commit is contained in:
parent
319f32e408
commit
e6cd216ade
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ $user_obj = Get-User $username
|
||||||
if ($state -eq 'present') {
|
if ($state -eq 'present') {
|
||||||
# Add or update user
|
# Add or update user
|
||||||
try {
|
try {
|
||||||
if ($user_obj) {
|
if ($user_obj.GetType) {
|
||||||
Update-Password $user_obj $password
|
Update-Password $user_obj $password
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue