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.6 available

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

'Web application Inventory' on foreign clients

Hey boys&girls,

I was wondering why the 'Web application Inventory' was not working on my client windows machines although it was already activated in the configuration menu (inventory)

I double-checked the 'saas.ps1' script which is installed with the windows agent by default.

There is an 'if-statement' which checks the used language but only for french or english.

So if you are on another client language as in my expamle german, you have to change that lines of code.

Original code piece:

$lang = Get-Culture

if($lang.Name -eq "fr-FR"){
    $pwlang = "Nom d'enregistrement"
}else{
    $pwlang = "Record Name"
}

Changed code piece:

$lang = Get-Culture

if($lang.Name -eq "fr-FR"){
    $pwlang = "Nom d'enregistrement"
}elseif($lang.Name -eq "de-DE"){
    $pwlang = "Eintragsname"
}else{
    $pwlang = "Record Name"
}

So for your language just check the '$lang.Name'-variable inside your powershell on the client computer to get the country code (mine was: 'de-DE') and by using the command 'ipconfig /displaydns' you can check the translated 'Record Name'-entry which is the first line of each dns entry (mine was: 'Eintragsname').

Then put it inside the script with an 'elseif-statement' like I mentioned above.

After all you have to deploy the new 'saas.ps1' script to all of your clients with the deployment feature 'store' within the OCS-Software (path is: 'C:\Program Files\OCS Inventory Agent\Plugins' and you have to upload a zip-file as usual).
Alternatively you could change the 'saas.ps1' script on all the client manually, but meeeehhh.. no way.

The 'Web application Inventory' should work for your foreign client from now on like a charm.

Not really a question, I just want to help those who struggle with this function.

Kind regards

in OCS Inventory NG agent for Windows by (290 points)
edited by

Please log in or register to answer this question.

 
Powered by Question2Answer
...