Execute PowerShell Scripts via SAP NetWeaver Identity Management
Hello,
Has anyone implemented the execution of a PowerShell script from SAP NetWeaver Identity Management (7.1, 7.2, 8.0?). Currently implementing 8.0, and our client is looking to kick off PowerShell scripts that would generate Active Directory accounts, Exchange accounts etc.
Thanks!
Hey Brendan,
We've done this out of a 7.2 implementation for exchange 2010 admin processes. We started with running powershell via a command line pass. It worked pretty well but it wasn't plain sailing. We used positional parameters to pass data to the scripts in question, we also had to come up with a return process that deals with any errors that might come of the powershell session. We had some issues with the shell sessions closing after the script completed.
We've since redesigned and now drop flat files to a constantly running powershell script that acts a bit like an IDM dispatcher (but obviously not integrated with IDM). It kicks off other powershell sessions and monitors their progress allowing it to process time outs, stack work up, etc.
We also found timing the processes to be an issue. If you create an AD account in IDM and then try to immediately move onto mailbox enable (for example) the account we created wasn't yet replicated to exchange so we had to build wait time into various parts of the process.
Thanks,
Pete.
Similar Messages
-
The CENTRAL SOURCE OF INFORMATION about SAP NetWeaver Identity Management
Check out the central homepage for "SAP NetWeaver Identity Management" on the SDN:
The direct link to <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/nw-identitymanagement">SAP NetWeaver Identity Management</a> can be found using the following menu path:
- SAP NetWeaver Product
- Complementary Offerings
- <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/nw-identitymanagement">SAP NetWeaver Identity Management</a>
Here you will find all kind of information about the product.
Have fun!
KristianCongratulations!
Very Nice! -
Executing powershell script via task scheduler
Hello,
I am trying to execute powershell script via windows task scheduler which will forcefully delete all email in a mailbox, but I am getting the below errors
Operational Code - 2
Task Category - Action Completed --- Task Scheduler successfully completed task "\IL98" , instance "{2b193375-cbd2-4986-918d-3cfd4027d6b6}" , action "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" with return code 0.
Last Run Result - 0X0
When I am adding additional cmdlets in the script "Set-ExecutionPolicy Unrestricted", I am getting Last Run Result 0X5 rest of the error remains the same.
Powershell version - 3.0
Task Scheduler version - 1.0
If I try to run the script manually via Exchange Powershell the script executes without any errors
Thanks in Advance,
Ankush ShahI figured out the problem, there wasn't any problem with the script but I had to correct inputs in windows task scheuler
Below is the resolution:
Under Actions:
Program/Script --> ws\System32\WindowsPowerShell\v1.0\powershell.exe
Add Argument --> -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto
; <filepath>"
Eariler I was writing the filepath after double quote "
Also I have selected the option "Run with Highest Privilages" to avoid
0x5 error -
Need information about notification with SAP Netweaver Identity Management
Dear Experts,
I need some informations about send e-mail from SAP NIM. We want to send an e-mail after creation of sap users etc.
Please note that today we have a Domino/Lotus server.
I undertsood that we can send e-mail through the Identy Center (IC) component. But I did not find how to set up this solution? I did not find architecture informations?
Could you please provide me the different configuration steps?
Should I install another component? Or I just have to configure my SMTP Server?
Also, have you got the best practices for this step?
Thanks a lot for your help
Regards
Hocine NAÏHello,
For notification, first you need to create a repository of generic type and provide the lotus notus host details in the repository constant.
Eg:
EMAIL_SERVER abc.def.com
EMAIL_ORIGINATOR orignator mail ID
Then create a task with the "To Generic" type Pass.
Select the name of the function below in the Next data entry of the Destination tab of the pass.
and provide the attribute and value as below:
MSKEYVALUE %MSKEYVALUE%
EMAIL_RECIPIENT recipients mail ID
EMAIL_SUBJECT Hello %DISPLAYANEM%
LOCATION %LOCATION%
Eg of a Function to sent mail is shown below:
function SendEmail(Par){
Recipient = Par.get("EMAIL_RECIPIENT");
Subject = Par.get("EMAIL_SUBJECT")
Location = Par.get("LOCATION");
Body = "This is a report from SAP NetWeaver Identity Center at %$ddm.date% %$ddm.time%<BR><BR>";
Body = Body + "Your location is <B>" + Location + "</B><BR>";
Body = Body + "<BR>";
Body = Body + "Best regards<BR>";
Body = Body + "MaXware AS<BR>";
UserFunc.uSendSMTPMessage("%$glb.EMAIL_ORIGINATOR%", Recipient,Subject,Body,"%$glb.EMAIL_SERVER%",1); -
Executing powershell scripts via Task Scheduler
Hi,
I have a powershell script that I wrote that when executed from the shell works fine but when executed from task scheduler does not work.
In my script, an email is sent out based on the results of the execution. When I run this from the shell, email goes out, when scheduled, no email and there is no indication of errors having occurred anywhere in the system.
Has anyone run into a similar issue?
I did change my powershell execution policy to be unrestricted (both in the x86 and x64 consoles). I am running Windows 2008 R2.
Thanks - Greg.Hi,
In addition the above suggestions, please also refer to the below threads:
Using Task Scheduler for a powershell script on server 2008
http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/e298d613-47b8-4492-92d1-0b55cc8497c1
Using Windows Task Scheduler to execute Powershell Script frequently
http://social.technet.microsoft.com/Forums/en-US/winserverpowershell/thread/5901a6ad-ba18-4817-82a9-f75d2d6b439f
Hope this helps.
Best Regards,
Yan Li
Yan Li
TechNet Community Support -
Executing PowerShell script via JAVA
Hi,
I have simple powershell script as below :
# Filename: Hello.ps1
Write-Host
Write-Host 'Hello World!'
Write-Host "Good-bye World! `n"
# end of script
I wish to run this script via JAVA by the below JAVA code -
import java.io.*;
public class PsJava {
public static void main(String[] args)
throws IOException{
Runtime runtime = Runtime.getRuntime();
String cmds = (String)
"cmd /C powershell C:/Documents and Settings/vvenkata/My Documents/Hello.ps1";
Process proc = runtime.exec(cmds);
proc.getOutputStream().close();
InputStream inputstream = proc.getInputStream();
InputStreamReader inputstreamreader =
new InputStreamReader(inputstream);
BufferedReader bufferedreader =
new BufferedReader(inputstreamreader);
String line;
while ((line = bufferedreader.readLine()) != null) {
System.out.println(line);
Thanks
Now, why is that I am not able to see any print statements from Hello.ps1 ? Can anyone help me on this?Hi,
I have place my powershell script in the 'C' directory. and i have changed my JAVA code as below, but it still doesn't give any output in my Eclipse Console.
import java.io.*;
public class PsJava {
public static void main(String[] args)
throws IOException{
Runtime runtime = Runtime.getRuntime();
String cmds = (String)
"cmd /c powershell c:/Hello.ps1";
Process proc = runtime.exec(cmds);
proc.getOutputStream().close();
InputStream inputstream = proc.getInputStream();
InputStreamReader inputstreamreader =
new InputStreamReader(inputstream);
BufferedReader bufferedreader =
new BufferedReader(inputstreamreader);
String line;
while ((line = bufferedreader.readLine()) != null) {
System.out.println(line);
Please advice me on this. If I have to create a batch file, then can you let me know how do I do that?
Thanks -
SAP Netweaver Identity Management
When does the sap defined Global JScript gets listed in the identity center console?
Maybe you want to know that you have to import the SAP Provisioning Framework into your Identity Center.
It's located in the installation directory, e.g. "C:\Program Files\SAP\IdM\Identity Center\Templates\Identity Center\SAP Provisioning framework"
After import you can find the Global JScripts where Zaheer told you
Thats what you needed?
Regards
Michael -
Netweaver identity management RFP response
Any one with sample Netweaver identity management RFP response
Esther,
That's a function of experience and reading SAP's documentation. Please contact me via direct message for more discussion on this as I think will will go outside of SAP's forum rules.
Cheers,
Matt -
Executing powershell script from remote computer using RSAT
Hi.
I want to execute powershell script on AD server from remote computer (in the same domain). I installed and tested RSAT - it is working fine. But i cant execute PS from c# code.
ps.Commands.AddCommand("Import-Module").AddArgument("ActiveDirectory");
ps.Invoke();
ps.Commands.AddCommand("Get-ADOrganizationalUnit -Filter 'Name -like \"*\"'");
var res = ps.Invoke();
And i get exception:
An unhandled exception of type 'System.Management.Automation.CommandNotFoundException' occurred in System.Management.Automation.dll
Additional information: The term 'Get-SBNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.Hi
CapitanPlanet
For the
CommandNotFoundException, it means the command cannot be found.
On the other hand, your issue is about the PowerShell, if you still have the issue, I suggest that you should post it in the
PowerShell forum for efficient response.
Here are some useful information, please check
Powershell
commands from C# not working (System.Management.Automation.CommandNotFoundException)
Powershell, Service Bus For Windows Server Programmatically: Command found, module could not be loaded
https://msdn.microsoft.com/en-us/library/dn282152.aspx
Best regards,
Kristin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Netweaver identity management comparison
Hi
I would like a comparison of Identity management products including Netweaver Identity management.
please help me with any whitepaper or discussion document.Hi Biswajit,
if you search for Gartner and user provisioning you will find their often quoted magic quadrant. Unfortunately the document is high-level with a focus on sales and information about SAP IdM is just outdated. You will find mainly German information on kuppingercole.com. Interesting are some scenarios like in a PoC where vendors have to cope some tasks - but I couldn't find a comparison which includes SAP IdM.
It just depends on the focus you have on Identity Management. I see advantages for SAP IdM in a flexible data management and good provisioning rules in a heterogenous environment. With the 7.1 release you will get pretty workflows in the SAP Portal. It's also recommended as a replacement of the CUA. Other vendors may have a focus on authentification or use a Virtual Directory instead of a database.
Best regards,
Nils -
How to change maintenance powershell script via GPO?
Per suggestion reposted from here: http://social.technet.microsoft.com/Forums/windowsserver/en-US/6eece9d6-a524-48aa-8e64-7554f0ec9b31/how-to-change-maintenance-powershell-script-via-gpo?forum=winserverGP
Posted at http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/desktop-shortcuts-to-items-on-network-drives/94eddb27-342b-40fc-9ad4-677ff4ee8ebe?page=9&tm=1403700614489 originally.
There is a very annoying "feature" in Windows 7 called BrokenShortcuts.ps1 which is being called out weekly via maintenance task and if it finds more than 4 "broken" network shortcuts it removes them all. So it means if a user at this
moment is disconnected from the network he will lose all links to shares, network applications sitting on his desktop. Funny that there was no such script on Vista and i don't see this on Win8. On the post i have attached one user suggested to edit this script
and change 4 to 500 or whatever high number. That's fine for one time fix. But i need to do this for 200+ users. This file cannot be simply replaced by a script, so i'm wondering is there any way to do it via GPO?
I have already tried various startup scripts, but i'm not sure which user to put into commands.
I need to run this on startup:
takeown /F C:\Windows\diagnostics\scheduled\Maintenance\TS_BrokenShortcuts.ps1
icacls c:\windows\diagnostics\scheduled\maintenance\TS_BrokenShortcuts.ps1 /grant "some user":F
copy \\share\folder$\TS_BrokenShortcuts.ps1 C:\Windows\diagnostics\scheduled\Maintenance\ /YYou need to take time to study how Windows does these things. You can control them with GP which is what you asked. The article shows you how to disable elements of the tasks. Each task controls a script. If you disable the task the
script that deletes shortcuts will be stopped. Other maintenance tasks will continue to run.
Most of your problem is that you seem to want someone to provide a magical solution. In technology it is necessary to fully research your issues until you understand all aspects. After fully studying the issue you should understand the possible
solutions if they exist.
You claim to have deployed the patch that Microsoft released to fix the issue. You claim it didn't work. If that is the case then you need to call MS and \p[en a support incident. If Microsoft determines that you are right about the
patch not working you will not be charged for the call.
I know that learning how to support technology is hard and frustrating for newcomers. In time, by using these incidents to learn, you will become a seasoned technician and all of this will seem trivial. Until then we can only suggest that you
do things that most of us are familiar with. We cannot fix your network for you.
I think you haven't really posted in the GP forum but posted a question about GP in the server forum. Try posting in the GP forum.
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP
Here is one answer from the GP forum:
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverGP
http://social.technet.microsoft.com/Forums/windowsserver/en-US/600ca14f-8b1b-400c-b27f-a7f5733407ac/windows-scheduled-maintenance-task?forum=winserverGP
¯\_(ツ)_/¯ -
How does execute PHP Script from SAP?
I've already installed SAPRFC and run SAP Function from PHP successfully. But failed when tried execute PHP script from SAP (SM59). Anyone can help me for a clear instruction for this problem?
ThanksHi Max,
here is the Source:
[code]
#!/usr/bin/php -q
<?php
// SAPRFC - Server example
// PHP server function RFC_READ_REPORT
// Require: CGI version PHP, RFC destination defined in SAP R/3 (SM59)
// http://saprfc.sourceforge.net
// Interface definiton for RFC_READ_REPORT
// (generated by saprfc.php - option Generate PHP)
$DEF_RFC_READ_REPORT = array (
array (
"name"=>"SYSTEM",
"type"=>"EXPORT",
"optional"=>"0",
"def"=> array (
array ("name"=>"","abap"=>"C","len"=>8,"dec"=>0)
array (
"name"=>"TRDIR",
"type"=>"EXPORT",
"optional"=>"0",
"def"=> array (
array ("name"=>"NAME","abap"=>"C","len"=>40,"dec"=>0),
array ("name"=>"SQLX","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"EDTX","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"VARCL","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"DBAPL","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"DBNA","abap"=>"C","len"=>2,"dec"=>0),
array ("name"=>"CLAS","abap"=>"C","len"=>4,"dec"=>0),
array ("name"=>"TYPE","abap"=>"C","len"=>3,"dec"=>0),
array ("name"=>"OCCURS","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"SUBC","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"APPL","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"SECU","abap"=>"C","len"=>8,"dec"=>0),
array ("name"=>"CNAM","abap"=>"C","len"=>12,"dec"=>0),
array ("name"=>"CDAT","abap"=>"D","len"=>8,"dec"=>0),
array ("name"=>"UNAM","abap"=>"C","len"=>12,"dec"=>0),
array ("name"=>"UDAT","abap"=>"D","len"=>8,"dec"=>0),
array ("name"=>"VERN","abap"=>"C","len"=>6,"dec"=>0),
array ("name"=>"LEVL","abap"=>"C","len"=>4,"dec"=>0),
array ("name"=>"RSTAT","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"RMAND","abap"=>"C","len"=>3,"dec"=>0),
array ("name"=>"RLOAD","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"FIXPT","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"SSET","abap"=>"C","len"=>1,"dec"=>0),
array ("name"=>"SDATE","abap"=>"D","len"=>8,"dec"=>0),
array ("name"=>"STIME","abap"=>"C","len"=>6,"dec"=>0),
array ("name"=>"IDATE","abap"=>"D","len"=>8,"dec"=>0),
array ("name"=>"ITIME","abap"=>"C","len"=>6,"dec"=>0),
array ("name"=>"LDBNAME","abap"=>"C","len"=>20,"dec"=>0)
array (
"name"=>"PROGRAM",
"type"=>"IMPORT",
"optional"=>"0",
"def"=> array (
array ("name"=>"","abap"=>"C","len"=>40,"dec"=>0)
array (
"name"=>"QTAB",
"type"=>"TABLE",
"optional"=>"0",
"def"=> array (
array ("name"=>"LINE","abap"=>"C","len"=>72,"dec"=>0)
// Create list of PHP server functions
$GLOBAL_FCE_LIST[RFC_READ_REPORT] = saprfc_function_define(0,"RFC_READ_REPORT",$DEF_RFC_READ_REPORT);
// PHP server function
function RFC_READ_REPORT ($fce)
$REPORT = saprfc_server_import ($fce,"PROGRAM");
saprfc_table_init ($fce,"QTAB");
$fd = fopen ($REPORT,"r");
if (!$fd)
return ("NOTFOUND"); // raise exception "NOTFOUND"
while (!feof($fd))
$LINE = fgets ($fd,73);
saprfc_table_append ($fce,"QTAB",array("LINE"=>$LINE));
fclose ($fd);
saprfc_server_export ($fce,"SYSTEM","PHP");
return (true);
// Call script with: ./server.php -a phpgw -g hostname -x sapgw00
$rfc = saprfc_server_accept ($argv);
// Dispatch one function call
$rc = saprfc_server_dispatch ($rfc,$GLOBAL_FCE_LIST);
saprfc_close ($rfc);
?>
[/code]
Regards
Gregor
Message was edited by: Gregor Wolf -
Execute powershell script in OIM task
Hi everyone,
I have a powershell script.
I want to execute this script on exchange machine.
How can I do this?
Can you send a code blok that executes powershell script if you have?
Thanks.
Best regards.Hi FXE,
first of all, to protocol execution you can use the cmdlets Start-Transcript
and Stop-Transcript.
If it doesn't create a transcript at all, your error is with launching the console from task.
If it does create a transcript, you can (hopefully) see what the script wrote.
On general principle I'd recommend trying these things:
Try specifying the full path to powershell.exe
Make sure the user running the task has the necessary permissions
Make sure it's running as local admin (with maximum privileges)
Cheers,
Fred
There's no place like 127.0.0.1 -
Execute photoshop script via illustrator cs5
Hi
Is it possible to execute Photoshop script via illustrator
I have 2 different script
script 1 work in illustrator with eps file and export as jpeg
script 2 where i want to trim the exported jpeg for illustrator in photoshop and save it back
I have 2 differnt script with me
can anyone help me to club both and run at same time..
Thank you
Appuuse BridgeTalk to have Illustrator talk to Photoshop, here's a sample by Mark
Illustrator script to open file in Photoshop
or use inter app communication
open PS, open a document
// start your illustrator script
var Aidoc = app.activeDocument;
continue with your script
// when ready, call your photoshop script
// this sample alerts the active document name and closes it
photoshop.executeScript("alert('document name: ' + app.activeDocument.name); app.activeDocument.close()"); -
EC-CS Reports via SAP NetWeaver Technology
Hi Guys,
I would like to know if its possible report consolidated financials (EC-CS tables) via SAP NetWeaver technology. Can I use web services to fetch data from EC-CS tables (FIMC table, for example).
Please, let me know tips to start that work.
thanks in advance,
LucianoHello Ariel,
EC-CS. Does consolidation of financial data based on group, company code,business area, profit center etc.
SEM BCS Does consolidation of financial data based on consolidation units which can represent, for example, companies, plants, business areas, profit centers, and cost centers.
EC-CS part of ECC 6.0 and SEM BCS 6.0 does the same thing.
EC-CS part of ECC 6.0
Pros:
Consolidated data is on the same system ECC 6.0 ( OLTP)
The reporting part is carried out with report writer.
Drill down and basic reporting.
Cons
Reporting on large amount of data does take a toll on the system
Rolling 12- 24 month report
Comparing actual/prior/budget
Reporting flexibility is limited
SEM BCS 6.0
Pros
The data is extracted into the underlying BW/BI system which operates exclusively for consolidation.
Sky is the limit in terms of customization and delivery of reports with Bex functionalities like Bex Analyzer, Web Application Designer, Report Designer.Reports can also be directly printed in Excel, Pdf format.
Reporting needs wont affect the performance of ECC 6.0.
Cons
SEM Implementation cost
Hope this gives a rough Idea. Let me know if you have any further concerns or comments.
Thanks
Raj
Maybe you are looking for
-
I am about to create a slideshow for my daughters wedding and I would like to be able to have three sections of photos (her, him, and both) in this show as well I would like to have one soundtrack that has parts of three songs - matching up with each
-
Creating a Hierarchy Viewer query
Hello, I'm having huge difficulties creating a Hierarchy Viewer Query. I've looked through the source code contained withing the demo, but it seems to require great knowledge regarding the component. I'm using a three-node model, each node grouped wi
-
Starting up in shared and exclusive mode
pls what is the sql syntax to mount a database exclusively, and also mounting in shared mode.
-
Safari is giving me a plugin error message (Copy of text included) HELP!!
I recently downloaded the OS X 10.4.7. Now, Safari won't play video content from webpages. Usually there's a window and you click "PLAY" and the video starts playing within that window, but now I'm getting this error message. "Some content on this pa
-
WRT54GL causing bsod only when an Mac ibook g4 connects wirelessly.
Hello all you tech gurus! I consider myself a pretty adept pc user. I've built systems, installed wired and wireless networks, many kinds of peripherals, and so far, have not run into any problems I have not been able to figure out. Here is the situa