I am attempting to use Invoke-HKCURegistrySettingsForAllUsers function to make various HKCU changes. It works fine and targets all accounts, however, I would like to have it not target the administrator account (instead focusing on the default and 1 other account).
I see this should be possible using the -UserProfiles parameter. However, I can’t seem to find the right way to pass the accounts/variables in to that parameter.
Any advice on how to pass accounts in to exclude/include would be awesome, thank you
I assume your admin account names are like ADMINKYLE-4 so I would use the -Like operator instead of -notcontains because -notcontains cannot do wildcards.