I have installed OCS UNIX server 2.7 on a debian 10.4 and it is working fine. Now I'm trying to make the plugin "Winusers v2.2" work but to no avail.
On Windows 10 machines (multiple ones), the agent (v 220.127.116.11), launchs the plugin's PowerShell script in 32 bits which prevent some PS commands from executing (namely Get-LocalUser and Get-LocalGroupMember).
How do I know that?
- The script works fine when I execute it locally from a PS console;
- When the agent executes it, I get the error "get-localuser' is not recognized as the name of a cmdlet" in the logs of the plugin;
- When I replace "Get-localuser" by a somewhat similar command "Get-WmiObject -ComputerName localhost -Class Win32_UserAccount", I get the same error as above but this time for Get-LocalGroupMember (not recognized as the name of a cmdlet);
- When I replace Get-LocalGroupMember by a somewhat similar command (gwmi win32_group -computername localhost -filter 'Name = "Administrateurs"'), the script runs correctly and I see a list of users on the computer page on the administration server;
- Microsoft documentation for both commands states explicitely that they run exclusively in 64 bits mode.
So is the agent really the culprit and is there a way to make it run the scripts in 64 bits?
Or am I doing something wrong elsewhere?
NB. My workaround may be satisfactory for some cases but not in mine (at least not in the present state).