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>