schwoerb Absent Member.
Absent Member.
969 views

Scripting Driver Commands

I was wondering if anyone knows if there are some less documented commands with the Scripting driver.

Specifically I am looking to see if commands exist that are functionally equivalent to set attribute and clear attribute. If not, I will create something on the Powershell side and transform it in dirxml. At present I only see the REMOVE_attr attr_value.

Thanks.
Labels (1)
0 Likes
12 Replies
Knowledge Partner
Knowledge Partner

Re: Scripting Driver Commands

schwoerb wrote:

> I was wondering if anyone knows if there are some less documented
> commands with the Scripting driver.
>
> Specifically I am looking to see if commands exist that are functionally
> equivalent to set attribute and clear attribute. If not, I will create
> something on the Powershell side and transform it in dirxml. At present
> I only see the REMOVE_attr attr_value.


Can you explain in more detail what you are trying to achieve?
Are you talking about publishing changes back to IDM? That I've really never
played with much at all.

On the subscriber side, you have the following categories under
idm_geteventvaluenames to work with..

ADD_
ADD_REF_
REMOVE_
REMOVE_REF_
REMOVE_ALL_

I have had no problems using these in combination with idm_geteventvaluenames,
some creative parsing/grouping and then calling idm_geteventvalues as required.
Have a very generic "modify.ps1" that handles pretty much anything IDM can
throw at it and translates that into PowerShell commands.

--
If you find this post helpful, and are viewing this using the web, please show
your appreciation by clicking on the star below
Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
Highlighted
schwoerb Absent Member.
Absent Member.

Re: Scripting Driver Commands

Thanks for the REMOVE_ALL_ command. I will test it out, just curious where you found that option, as I haven’t seen that anywhere.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Scripting Driver Commands

schwoerb <schwoerb@no-mx.forums.microfocus.com> wrote:
>

Thanks for the REMOVE_ALL_ command. I will test it out, just curious
where you found that option, as I haven’t seen that anywhere.

A lot of careful reading of the docs (old and new) plus lots of testing and
digging.
Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Scripting Driver Commands

On 11/29/2018 2:27 PM, Alex McHugh wrote:
> schwoerb <schwoerb@no-mx.forums.microfocus.com> wrote:
>>

> Thanks for the REMOVE_ALL_ command. I will test it out, just curious
> where you found that option, as I haven’t seen that anywhere.
>
> A lot of careful reading of the docs (old and new) plus lots of testing and
> digging.


One idea is to get the Unix/Linux bi dir driver, which is really a
special case config of the scripting driver for Linux, so you can get a
lot of good ideas from it.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Scripting Driver Commands

Indeed it doesn't look like REMOVE_ALL made it into the documentation. I will make a note of that for documentation updates.

The code for library functions for Windows PowerShell is in ...\WSDriver\Scripts\PowerShell\IDMLib.ps1. Of course, these things need to be in the docs and not require reading the code!

Thanks,
Sam Sampson
NetIQ IDM Drivers (Third-Party)
0 Likes
Knowledge Partner
Knowledge Partner

Re: Scripting Driver Commands

On 11/30/2018 8:24 AM, Zygomax wrote:
>
> Indeed it doesn't look like REMOVE_ALL made it into the documentation. I
> will make a note of that for documentation updates.
>
> The code for library functions for Windows PowerShell is in
> ...\WSDriver\Scripts\PowerShell\IDMLib.ps1. Of course, these things need
> to be in the docs and not require reading the code!


And some people get upset when we read the code.Oh well. Can't win.

Thanks for pointing that out.


0 Likes
Knowledge Partner
Knowledge Partner

Re: Scripting Driver Commands

Geoffrey Carman <geoffreycarmanNOSPAM@NOSPAMgmail.com> wrote:
> On 11/30/2018 8:24 AM, Zygomax wrote:
>>
>> Indeed it doesn't look like REMOVE_ALL made it into the documentation. I
>> will make a note of that for documentation updates.
>>
>> The code for library functions for Windows PowerShell is in
>> ...\WSDriver\Scripts\PowerShell\IDMLib.ps1. Of course, these things need
>> to be in the docs and not require reading the code!

>
> And some people get upset when we read the code.Oh well. Can't win.
>
> Thanks for pointing that out.
>



IIRC - I just grabbed the WS*.tmp file that is used as a temp transfer
between RL and shim and looked at that.

I have poked around in IDMLib.ps1 but that was to work out something else.
Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
schwoerb Absent Member.
Absent Member.

Re: Scripting Driver Commands

I just tried the REMOVE_ALL_ in Windows and it didn't work. I have a wrapper around IDMLib.ps1 as it is missing lots of stuff, IMHO. I admit that I am a patch level or two back, but can you verify that REMOVE_ALL_ is handled by idmevent.exe for the Windows Scripting Driver.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Scripting Driver Commands

schwoerb <schwoerb@no-mx.forums.microfocus.com> wrote:
>
> I just tried the REMOVE_ALL_ in Windows and it didn't work.


Odd, I am pretty sure it works in windows on subscriber thread and has done
so for 2 years.

Note: it has to be REMOVE_ALL_ATTRNAME

Not just REMOVE_ALL

> wrapper around IDMLib.ps1
> REMOVE_ALL_ is handled by idmevent.exe


So this is publisher? Have barely played with that. So not sure what is
supported there.

Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
schwoerb Absent Member.
Absent Member.

Re: Scripting Driver Commands

Yes. It works removing a single value with:
idmevent.exe -t MODIFY -a assocValue
REMOVE_attrName attrValue

Same thing does not work with:
idmevent.exe -t MODIFY -a assocValue
REMOVE_ALL_attrName

I didn't put a attrValue, as that doesn't make any sense.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Scripting Driver Commands

I've looked into this and there is a bug regarding REMOVE_ALL and the Publisher, such that it won't work.

If you have the values available on the Publisher side, you could iterate over them and use REMOVE_ of course.

In any case, we will get a fix into our next patch.

Thanks,
Sam
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Scripting Driver Commands

Getting caught up...

I was wrong! The name-value pair format always requires a value, so it's "REMOVE_ALL_attrName true" by convention. Give that a try.

Within a script it would be "idm_publishvalue "REMOVE_ALL_attrName true".

Our documentation needs more detail in this regard.

Thanks,
Sam
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.