Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

winusers plugin incorrect display languege

winusers plugin incorrect display languege or fonts

Server information

Operating system

  • OS Name :
  • Version :
  • RAM installed :
  • Free RAM :
  • CPU :
  • Distribution :
  • Linux x86_64
  • 3.10.0-957.12.2.el7.x86_64
  • 991 MB
  • 245 MB
  • Intel(R) Xeon(R) CPU E7- 4860 @ 2.27GHz
  • CentOS Linux 7 (Core)

Software

  • PHP Version :
  • Web Server :
  • Database Server :
  • Version OCSReports:
  • 7.3.5
  • Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.3.5 mod_perl/2.0.10 Perl/v5.16.3
  • MariaDB Server version 10.3.15-MariaDB
  • 2.7

in OCS Inventory NG plugins by (800 points)

17 Answers

0 votes
Hi

Please try this new version => https://github.com/PluginsOCSInventory-NG/winusers/releases/tag/2.1

Regards

Frank
by (90.4k points)
0 votes

Copy new file to directory

and get error in log file

WARNING *** EXECUTABLE PLUGIN => Executable plugin <C:\Program Files (x86)\OCS Inventory Agent\plugins\winusers.ps1> output is not UTF-8 encoded or an XML document, trying to UTF-8 encode

WARNING *** EXECUTABLE PLUGIN => Executable plugin <C:\Program Files (x86)\OCS Inventory Agent\plugins\winusers.ps1> output encoded to UTF-8, trying to reload XML document

ERROR *** EXECUTABLE PLUGIN => Executable plugin <C:\Program Files (x86)\OCS Inventory Agent\plugins\winusers.ps1> output is not a valid XML document

by (800 points)
0 votes
by (90.4k points)
0 votes

Hi

Please try this new version => https://github.com/PluginsOCSInventory-NG/winusers/releases/tag/2.2

Regards

Frank

by (90.4k points)
0 votes
try 2.2 plugin. same error

I try run powershell without admin privileges and get error
Get-LocalGroupMember : Группа Administrateurs не найдена.

C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent\winusers.ps1:3 знак:16

+     $admingroup = Get-LocalGroupMember -Group "Administrateurs"

+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Administrateurs:String) [Get-LocalGroupMember], GroupNotFoundException

    + FullyQualifiedErrorId : GroupNotFound,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

gci : Отказано в доступе по пути "C:\Users\.NET v4.5".

C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent\winusers.ps1:19 знак:16

+     "{0:n2}" -f ((gci -path $pth -recurse | measure-object -property  ...

+                   ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : PermissionDenied: (C:\Users\.NET v4.5:String) [Get-ChildItem], UnauthorizedAccessExcepti

   on

    + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand

gci : Отказано в доступе по пути "C:\Users\.NET v4.5 Classic".

C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent\winusers.ps1:19 знак:16

+     "{0:n2}" -f ((gci -path $pth -recurse | measure-object -property  ...

+                   ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : PermissionDenied: (C:\Users\.NET v4.5 Classic:String) [Get-ChildItem], UnauthorizedAcces

   sException

    + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand

gci : Отказано в доступе по пути "C:\Users\DefaultAppPool".

C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent\winusers.ps1:19 знак:16

+     "{0:n2}" -f ((gci -path $pth -recurse | measure-object -property  ...

+                   ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : PermissionDenied: (C:\Users\DefaultAppPool:String) [Get-ChildItem], UnauthorizedAccessEx

   ception

    + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand

gci : Отказано в доступе по пути "C:\Users\it".

C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent\winusers.ps1:19 знак:16

+     "{0:n2}" -f ((gci -path $pth -recurse | measure-object -property  ...

+                   ~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : PermissionDenied: (C:\Users\it:String) [Get-ChildItem], UnauthorizedAccessException

    + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand

wthen run with admin privilages get this error

PS C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent> .\winusers.ps1

.\winusers.ps1 : Невозможно загрузить файл C:\Users\v.egorov\Desktop\plugins ocs\winusers 3\winusers\agent\winusers.ps1

, так как выполнение сценариев отключено в этой системе. Для получения дополнительных сведений см. about_Execution_Poli

cies по адресу http://go.microsoft.com/fwlink/?LinkID=135170.

строка:1 знак:1

+ .\winusers.ps1

+ ~~~~~~~~~~~~~~

    + CategoryInfo          : Ошибка безопасности: (:) [], PSSecurityException

    + FullyQualifiedErrorId : UnauthorizedAccess
by (800 points)
0 votes
Hi,

For your information, I had tested. Its runs ok.

In a powershell windows with admin rights => set executionpolicy bypass

Then run the script.
by (90.4k points)
0 votes

In a powershell windows with admin rights => set executionpolicy bypass

Then run the script.

But how can the ocinventory run the powershell with  executionpolicy bypass ?

I cant change GPO polisy.

by (800 points)
0 votes
Th script is executed by the agent which runs under system account. Have you tested the script like as I said ?
by (90.4k points)
0 votes

PS C:\Program Files (x86)\OCS Inventory Agent\Plugins> PowerShell.exe -ExecutionPolicy UnRestricted -File winusers.ps1

Get-LocalGroupMember : Group Administrateurs was not found.

At C:\Program Files (x86)\OCS Inventory Agent\Plugins\winusers.ps1:3 char:16

+     $admingroup = Get-LocalGroupMember -Group "Administrateurs"

+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Administrateurs:String) [Get-LocalGroupMember], GroupNotFoundException

    + FullyQualifiedErrorId : GroupNotFound,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

Get-LocalGroupMember : Group Administrateurs was not found.

At C:\Program Files (x86)\OCS Inventory Agent\Plugins\winusers.ps1:3 char:16

+     $admingroup = Get-LocalGroupMember -Group "Administrateurs"

+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Administrateurs:String) [Get-LocalGroupMember], GroupNotFoundException

    + FullyQualifiedErrorId : GroupNotFound,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

Get-LocalGroupMember : Group Administrateurs was not found.

At C:\Program Files (x86)\OCS Inventory Agent\Plugins\winusers.ps1:3 char:16

+     $admingroup = Get-LocalGroupMember -Group "Administrateurs"

+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Administrateurs:String) [Get-LocalGroupMember], GroupNotFoundException

    + FullyQualifiedErrorId : GroupNotFound,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

Get-LocalGroupMember : Group Administrateurs was not found.

At C:\Program Files (x86)\OCS Inventory Agent\Plugins\winusers.ps1:3 char:16

+     $admingroup = Get-LocalGroupMember -Group "Administrateurs"

+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (Administrateurs:String) [Get-LocalGroupMember], GroupNotFoundException

    + FullyQualifiedErrorId : GroupNotFound,Microsoft.PowerShell.Commands.GetLocalGroupMemberCommand

<WINUSERS>

<NAME>DefaultAccount</NAME>

<TYPE>Local user</TYPE>

<SIZE>0,00</SIZE>

<LASTLOGON></LASTLOGON>

<DESCRIPTION>Учетная запись пользователя, управляемая системой.</DESCRIPTION>

<STATUS>Disabled</STATUS>

<USERMAYCHANGEPWD>True</USERMAYCHANGEPWD>

<PASSWORDEXPIRES></PASSWORDEXPIRES>

<SID>S-1-5-21-2506596589-90734120-218726010-503</SID>

</WINUSERS>

<WINUSERS>

<NAME>it</NAME>

<TYPE>Local user</TYPE>

<SIZE>313,08</SIZE>

<LASTLOGON>06/23/2018 14:00:53</LASTLOGON>

<DESCRIPTION></DESCRIPTION>

<STATUS>Enabled</STATUS>

<USERMAYCHANGEPWD>True</USERMAYCHANGEPWD>

<PASSWORDEXPIRES></PASSWORDEXPIRES>

<SID>S-1-5-21-2506596589-90734120-218726010-1001</SID>

</WINUSERS>

<WINUSERS>

<NAME>Администратор</NAME>

<TYPE>Local user</TYPE>

<SIZE>0,00</SIZE>

<LASTLOGON></LASTLOGON>

<DESCRIPTION>Встроенная учетная запись администратора компьютера/домена</DESCRIPTION>

<STATUS>Disabled</STATUS>

<USERMAYCHANGEPWD>True</USERMAYCHANGEPWD>

<PASSWORDEXPIRES></PASSWORDEXPIRES>

<SID>S-1-5-21-2506596589-90734120-218726010-500</SID>

</WINUSERS>

<WINUSERS>

<NAME>Гость</NAME>

<TYPE>Local user</TYPE>

<SIZE>0,00</SIZE>

<LASTLOGON></LASTLOGON>

<DESCRIPTION>Встроенная учетная запись для доступа гостей к компьютеру или домену</DESCRIPTION>

<STATUS>Disabled</STATUS>

<USERMAYCHANGEPWD>False</USERMAYCHANGEPWD>

<PASSWORDEXPIRES></PASSWORDEXPIRES>

<SID>S-1-5-21-2506596589-90734120-218726010-501</SID>

</WINUSERS>

this powershell dont show AD users, only local.

PS C:\Program Files (x86)\OCS Inventory Agent\Plugins> Get-ExecutionPolicy -List | Format-Table -AutoSize

        Scope ExecutionPolicy

        ----- ---------------

MachinePolicy       Undefined

   UserPolicy       Undefined

      Process       Undefined

  CurrentUser       Undefined

 LocalMachine       Undefined

under system account may be it neads to  set executionpolicy bypass to ?

PS C:\Program Files (x86)\OCS Inventory Agent\Plugins>

by (800 points)
0 votes
Can you tell me which versions of ocs agent have you installed ?

Regards

Frank
by (90.4k points)
 
Powered by Question2Answer
...