Check .GetType rather than object directly

pull/7861/head
Paul Durivage 10 years ago
parent 319f32e408
commit e6cd216ade

@ -79,7 +79,7 @@ $user_obj = Get-User $username
if ($state -eq 'present') {
# Add or update user
try {
if ($user_obj) {
if ($user_obj.GetType) {
Update-Password $user_obj $password
}
else {

Loading…
Cancel
Save