Anonymous_User Absent Member.
Absent Member.
1510 views

NETIQ DRA Triggers that use Powershell - Examples?


Is anybody using powershell with NETIQ DRA triggers? We want to set
some Exchange attributes and need syntax examples?


--
PatWinton
------------------------------------------------------------------------
PatWinton's Profile: https://forums.netiq.com/member.php?userid=5443
View this thread: https://forums.netiq.com/showthread.php?t=53333

0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: NETIQ DRA Triggers that use Powershell - Examples?

PatWinton,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your issue been resolved? If not, you might try one of the following options:

- Visit http://www.netiq.com/support and search the knowledgebase and/or check all
the other support options available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.netiq.com)

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.netiq.com/faq.php

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your NetIQ Forums Team
http://forums.netiq.com


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: NETIQ DRA Triggers that use Powershell - Examples?


PatWinton;256446 Wrote:
> Is anybody using powershell with NETIQ DRA triggers? We want to set
> some Exchange attributes and need syntax examples?



my apologies for the delay. Here is an example


$gsScriptName = "InitialsDescription.ps1";
$gsErrorMsgFirstLine = "Automation trigger script: " + $gsScriptName;
$FirstArg = ""
$initials = ""

#Creating a File
Set-Content -Value "DRAPretask" -Path C:\DRAPretask.txt

#For retrieving the commandline agruments
$CmdLineArgs = $InVarSet.Get("CmdLine")
Add-Content -Value $CmdLineArgs -Path C:\DRAPretask.txt

#To retrieve the number of arguments in the argument string
$number = $InVarSet.Get("CmdLine.numArgs")

#Adding the content into file
Add-Content -Value $number -Path C:\DRAPretask.txt

if($number -ne 0)
{
#To retrieve individual argument and also if required to retrieve
multiple agruments list user can use "For Loop"
$FirstArg = $InVarSet.Get("CmdLine.arg0")

$initials = $InVarSet.Get("CmdLine.arg1")
}


$sOperationName = $InVarset.Get("In.OperationName");
if($sOperationName.length -eq 0)
{
$sErrorMsgText = "OperationName not retrieved from $InVarset.";
$InVarset.Put("Out.ErrorMsg.Script", $gsErrorMsgFirstLine +
$sErrorMsgText);
}

#Updating the description proeprty value based on arguments
$InVarset.put("In.Properties.description", $FirstArg)

#Updating the initials property value
$InVarset.put("In.Properties.initials", $initials)


$sNewName = "";

if( $InVarset.Get("In.Properties.sn"))
{
if( $InVarset.Get("In.Properties.givenName"))
{
$sNewName = $InVarset.Get("In.Properties.sn").Trim() + ", " +
$InVarset.Get("In.Properties.givenName").Trim();
}
else
{
$sNewName = $InVarset.Get("In.Properties.sn").Trim();
}
}
else
{
return;
}


--
jacksonse
------------------------------------------------------------------------
jacksonse's Profile: https://forums.netiq.com/member.php?userid=4587
View this thread: https://forums.netiq.com/showthread.php?t=53333

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.