-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When I use this resource, there's a problem if no user is logged on the client machine, because the resource is trying to reach HKCU that does not exists.
Verbose log:
Cannot find path 'HKCU:\Control Panel\Desktop\MuiCached' because it does not exist.
+ CategoryInfo : ObjectNotFound: (HKCU:\Control Panel\Desktop\MuiCached:) [], CimException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyValueCommand
+ PSComputerName : CM9
Cannot index into a null array.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NullArray
+ PSComputerName : CM9
You cannot call a method on a null-valued expression.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : InvokeMethodOnNull
+ PSComputerName : CM9
Maybe resource should check if the key exists before trying to reach it?
Thanks