Creating user in AD using powershell

Hi,
How to create ad user in opalis using powershell?

Hi,
best will be, you take the "Run .Net Activity" and put your PowerShell Script in there.
Example Script
new-aduser $LoginName -GivenName $FirstNameField -Surname $LastnameField -DisplayName $Displayname -UserPrincipalName "$[email protected]" -ChangePasswordAtLogon $true -AccountPassword (ConvertTo-SecureString –AsPlainText “password1password_1” -Force) -Path "OU=$OU,OU=User,OU=Company,DC=domain,DC=com" -Company $Company -Department $Department -enabled $true -EmployeeNumber $EmployeeNumber -Description $EmployeeNumber -EmailAddress $SMTPAdresse -Division $Division
Seidl Michael | http://www.techguy.at |
twitter.com/techguyat | facebook.com/techguyat

Similar Messages

  • Creating a Scheduled Task using PowerShell v4

    So here is my question.  I'm trying/wanting to create a scheduled task using PowerShell v4 on Server 2012R2.  I want to task to run on the 1st day of every month.  The parameter for -Monthly -Day is not available.  I need to use PowerShell
    to create the Scheduled Task because the Task will be running with a group Managed Service Account credentials so the Scheduled Task can not be created via the Task Scheduler GUI.
    Thanks in Advance

    Here is a functioning task It can be easily edited in PowerShell or in notepad to alter the timing
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.1" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
    <RegistrationInfo>
    <Author>W8TEST\user01</Author>
    </RegistrationInfo>
    <Triggers>
    <CalendarTrigger>
    <StartBoundary>2014-06-04T21:31:32.0459499</StartBoundary>
    <Enabled>true</Enabled>
    <ScheduleByMonth>
    <DaysOfMonth>
    <Day>1</Day>
    <Day>12</Day>
    <Day>24</Day>
    </DaysOfMonth>
    <Months>
    <January />
    <February />
    <March />
    <April />
    <May />
    <June />
    <July />
    <August /
    <September />
    <October />
    <November />
    <December />
    </Months>
    </ScheduleByMonth>
    </CalendarTrigger>
    </Triggers>
    <Principals>
    <Principal id="Author">
    <RunLevel>LeastPrivilege</RunLevel>
    <UserId>W8TEST\jvierra</UserId>
    <LogonType>InteractiveToken</LogonType>
    </Principal>
    </Principals>
    <Settings>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <IdleSettings>
    <StopOnIdleEnd>true</StopOnIdleEnd>
    <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
    </Settings>
    <Actions Context="Author">
    <Exec>
    <Command>notepad.exe</Command>
    <Arguments>test.txt</Arguments>
    <WorkingDirectory>c:\temp</WorkingDirectory>
    </Exec>
    </Actions>
    </Task>
    I have edited and reloaded the XML many, many times.  It works very nicely.
    ¯\_(ツ)_/¯

  • How to create users and groups using WLST Offline with Weblogic 8.1.4

    How to create users and groups using WLST Offline with Weblogic 8.1.4?
    Any ideas?

    Hi this is how i created a user using WLST Offline?
    cd('/Security/' + domainName)
    # Delete the default user name weblogic
    # incase you want to remove the defualt user weblogic
    delete('weblogic','User')
    # Creating a new user defined
    create(userName, 'User')
    # Setting the password of the user you created.
    cd ('/Security/' + domainName + '/User/' + userName)
    cmo.setPassword(password)
    Regards
    Makenzo

  • Create user fails when used from SOAP UI

    Hello,
    I am using SOAP UI to create users using the Web services available in EBS.
    I am using the following URL: http://<server>:<port>/webservices/SOAProvider/plsql/fnd_user_pkg/
    I am able to create user when I use <load:X_UNENCRYPTED_USER_PASSWORD>pa55w0rd</load:X_UNENCRYPTED_USER_PASSWORD> in the SOAP Request.
    However, when I use <load:X_ENCRYPTED_USER_PASSWORD>pa55w0rd</load:X_ENCRYPTED_USER_PASSWORD>, the user creation fails with the following error:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>ServiceExecutionError : Error occured while executing the service.:oracle.apps.fnd.soa.util.SOAException: ServiceExecutionError: Exception returned from JCA Service Runtime. file:/c:/EBS/VIS/inst/apps/VIS_vm-oebs/soa/PLSQL/1495/LOAD_ROW.wsdl [ LOAD_ROW_ptt::LOAD_ROW(InputParameters) ] - WSIF JCA Execute of operation 'LOAD_ROW' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.handleRequest(JCAHandler.java:158)
         at oracle.apps.fnd.soa.provider.SOAProvider.processMessage(SOAProvider.java:272)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor$1.run(WebServiceProcessor.java:358)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:355)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    org.collaxa.thirdparty.apache.wsif.WSIFException: file:/c:/EBS/VIS/inst/apps/VIS_vm-oebs/soa/PLSQL/1495/LOAD_ROW.wsdl [ LOAD_ROW_ptt::LOAD_ROW(InputParameters) ] - WSIF JCA Execute of operation 'LOAD_ROW' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:620)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:723)
         at oracle.tip.adapter.client.JCABindingOperation.invokeWsifProvider(JCABindingOperation.java:259)
         at oracle.tip.adapter.client.JCABindingOperation.executeInputOnlyOperation(JCABindingOperation.java:152)
         at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.invoke(JCAHandler.java:256)
         at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.handleRequest(JCAHandler.java:149)
         at oracle.apps.fnd.soa.provider.SOAProvider.processMessage(SOAProvider.java:272)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor$1.run(WebServiceProcessor.java:358)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:355)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:469)
         at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:172)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:116)
         at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:134)
         at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1014)
         at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:232)
         at oracle.tip.adapter.apps.AppsInteraction.execute(AppsInteraction.java:176)
         at oracle_tip_adapter_apps_AppsInteraction_Proxy.execute()
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:472)
         ... 26 more
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Error Code: 6510
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:162)
         ... 33 more
    Caused by: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:184)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:873)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3093)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4286)
         at oracle.oc4j.sql.proxy.PreparedStatementBCELProxy.execute(PreparedStatementBCELProxy.java:333)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:108)
         ... 32 more</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>

    Hello,
    I am using SOAP UI to create users using the Web services available in EBS.
    I am using the following URL: http://<server>:<port>/webservices/SOAProvider/plsql/fnd_user_pkg/
    I am able to create user when I use <load:X_UNENCRYPTED_USER_PASSWORD>pa55w0rd</load:X_UNENCRYPTED_USER_PASSWORD> in the SOAP Request.
    However, when I use <load:X_ENCRYPTED_USER_PASSWORD>pa55w0rd</load:X_ENCRYPTED_USER_PASSWORD>, the user creation fails with the following error:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring>ServiceExecutionError : Error occured while executing the service.:oracle.apps.fnd.soa.util.SOAException: ServiceExecutionError: Exception returned from JCA Service Runtime. file:/c:/EBS/VIS/inst/apps/VIS_vm-oebs/soa/PLSQL/1495/LOAD_ROW.wsdl [ LOAD_ROW_ptt::LOAD_ROW(InputParameters) ] - WSIF JCA Execute of operation 'LOAD_ROW' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.handleRequest(JCAHandler.java:158)
         at oracle.apps.fnd.soa.provider.SOAProvider.processMessage(SOAProvider.java:272)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor$1.run(WebServiceProcessor.java:358)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:355)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    org.collaxa.thirdparty.apache.wsif.WSIFException: file:/c:/EBS/VIS/inst/apps/VIS_vm-oebs/soa/PLSQL/1495/LOAD_ROW.wsdl [ LOAD_ROW_ptt::LOAD_ROW(InputParameters) ] - WSIF JCA Execute of operation 'LOAD_ROW' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:620)
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:723)
         at oracle.tip.adapter.client.JCABindingOperation.invokeWsifProvider(JCABindingOperation.java:259)
         at oracle.tip.adapter.client.JCABindingOperation.executeInputOnlyOperation(JCABindingOperation.java:152)
         at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.invoke(JCAHandler.java:256)
         at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.handleRequest(JCAHandler.java:149)
         at oracle.apps.fnd.soa.provider.SOAProvider.processMessage(SOAProvider.java:272)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
         at oracle.j2ee.ws.server.WebServiceProcessor$1.run(WebServiceProcessor.java:358)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:355)
         at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
         at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    [Caused by: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:469)
         at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:172)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:116)
         at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:134)
         at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1014)
         at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:232)
         at oracle.tip.adapter.apps.AppsInteraction.execute(AppsInteraction.java:176)
         at oracle_tip_adapter_apps_AppsInteraction_Proxy.execute()
         at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:472)
         ... 26 more
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
    Error Code: 6510
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:162)
         ... 33 more
    Caused by: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "APPS.FND_SSO_MANAGER", line 248
    ORA-01403: no data found
    ORA-06512: at "APPS.FND_USER_PKG", line 525
    ORA-06512: at "APPS.FND_USER_PKG", line 663
    ORA-06512: at line 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:184)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:873)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3093)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4286)
         at oracle.oc4j.sql.proxy.PreparedStatementBCELProxy.execute(PreparedStatementBCELProxy.java:333)
         at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:108)
         ... 32 more</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>

  • How to add calendar enries to all users in organization using powershell and EWS.

    I am one of the exchange admins for our organization.  Every year, we publish academic calendar data to all faculty and staff calendars.  We recently updated and migrated from Exchange 2003 to Exchange 2010 which, of course, desupported MAPI and
    ADO.  The processes we previously used had to be re-written using Exchange Web Services API (EWS).  Because I find that powershell is easy to work with, I wanted to integrate the calendar dispersal using powershell.
    Having not found much help online using the EWS .NET library in powershell for this purpose, I decided to share my code:
    # Bulk load calendar entries script
    # Description:
    # Script used to deploy Academic Calendar entries to all Exchange account calendars
    # Prerequisites:
    # Service account must have ApplicationImpersonation ManagementRoleAddisgnment
    # New-ManagementRoleAssignment -Name:impersonationRole -Role:ApplicationImpersonation -User:<srv_account>
    # Usage:
    # .\academicCalendar.ps1 calEntries.csv
    # Where calEntries.csv = list of calendar entries to add
    Param ([string]$calInputFile = $(throw "Please provide calendar input file parameter..."))
    $startTime = Get-Date
    $strFileName = "<path to log file>"
    if(Test-Path $strFileName)
    $logOutFile = Get-Item -path $strFileName
    else
    $logOutFile = New-Item -type file $strFileName
    # Load EWS Managed API library
    Import-Module -Name "C:\Program Files\Microsoft\Exchange\Web Services\1.0\Microsoft.Exchange.WebServices.dll"
    # Load all Mailboxes
    $exchangeUsers = Get-Mailbox -ResultSize Unlimited | Select PrimarySmtpAddress
    # Load all calendar Entries
    # Input file is in the following format
    # StartDate,EndDate,Subject
    # 8/29/2011,8/30/2011,First Day of Fall Classes
    $calEntries = Import-Csv $calInputFile
    # Setup the service for connection
    $service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010)
    $service.Url = new-object System.Uri("https://<CAS_server_URL>/ews/exchange.asmx")
    $service.Credentials = new-object Microsoft.Exchange.WebServices.Data.WebCredentials("<service_account>","<password>","<domain>")
    $totalCount = $exchangeUsers.Count
    $currentCount = 0
    Write-Output "Exchange Version: $service.RequestedServerVersion"
    Write-Output "Mailbox Count: $totalCount"
    # Add message to log file
    $timeStamp = Get-Date -Format "MM/dd/yyyy hh:mm:ss"
    $message = "$timeStamp -- Begin Calendar Deployment `n"
    $message += "Total Exchange Accounts: $totalCount"
    Add-Content $logOutFile $message
    # Perform for each Mailbox
    $error.clear()
    foreach($mailbox in $exchangeUsers)
    $currentCount++
    if($mailbox.PrimarySmtpAddress -ne "")
    # Output update to screen
    $percentComplete = $currentCount/$totalCount
    Write-Output $mailbox.PrimarySmtpAddress
    "{0:P0}" -f $percentComplete
    # Setup mailbox parameters for impersonation
    $MailboxName = $mailbox.PrimarySmtpAddress
    $iUserID = new-object Microsoft.Exchange.WebServices.Data.ImpersonatedUserId([Microsoft.Exchange.WebServices.Data.ConnectingIdType]::SmtpAddress,$MailboxName)
    $service.ImpersonatedUserId = $iUserID
    # Indicate which folder to work with
    $folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Calendar)
    $CalendarFolder = [Microsoft.Exchange.WebServices.Data.CalendarFolder]::Bind($service,$folderid)
    # For each entry in the input file
    $error.clear()
    foreach($entry in $calEntries)
    # First check to make sure the entry is not already in the calendar
    # use a calendarview object to pull the entries for the given date and make sure an entry with the same subject line doesnt already exist
    $cvCalendarview = new-object Microsoft.Exchange.WebServices.Data.CalendarView([System.DateTime]($entry.StartDate),[System.DateTime]($entry.EndDate))
    $cvCalendarview.PropertySet = new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)
    $frCalendarResult = $CalendarFolder.FindAppointments($cvCalendarview)
    $entryFound = $False
    foreach ($appointment in $frCalendarResult.Items)
    if($appointment.Subject -eq $entry.Subject)
    $entryFound = $True
    # If entry was found, then skip this entry
    if($entryFound)
    $entryFound = $False
    else # Create the appointment object and save it to the users calendar
    $appt = New-Object Microsoft.Exchange.WebServices.Data.Appointment($service)
    $appt.Subject = $entry.Subject
    $appt.Start = [System.DateTime]($entry.StartDate)
    $appt.End = [System.DateTime]($entry.EndDate) #For AllDayEvent, end date must be after start date
    $appt.IsAllDayEvent = $True #Set event as "All Day Event"
    $appt.LegacyFreeBusyStatus = "Free" #Make sure free/busy info shows user as "free" rather than "busy"
    $appt.IsReminderSet = $False #Make sure reminder is not set to remind the user of the event
    $appt.Save([Microsoft.Exchange.WebServices.Data.SendInvitationsMode]::SendToNone)
    if($error)
    $timeStamp = Get-Date -Format "MM/dd/yyyy hh:mm:ss"
    $message = $timeStamp + "...Exception Occurred while processing Save for: `n"
    $message += " Account: " + $MailboxName + "`n"
    $message += " Subject: " + $entry.Subject + "`n"
    $message += " Exception: " + $error[0].Exception + "`n"
    Add-Content $logOutFile $message
    $error.clear()
    if($error)
    $error.clear()
    else
    $message = "" + $MailboxName + "`t Success! `n"
    Add-Content $logOutFile $message
    Write-Output $currentCount
    $endTime = Get-Date
    $duration = New-TimeSpan $startTime $endTime
    $totalMin = $duration.TotalMinutes
    # Build and send email notification upon completion
    $body = "The Calendar deployment has completed. `n `n "
    $body += "Start Timestamp: $startTime `n "
    $body += "End Timestamp: $endTime `n "
    $body += "Duration: $totalMin min `n "
    $body += "Exchange accounts affected: $currentCount `n"
    $smtpServer = "<mysmtpserver>"
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg = new-object Net.Mail.MailMessage
    $msg.From = "<from_email_address>"
    $msg.To.Add("<to_email_address>")
    $msg.Subject = "Calendar Deployment"
    $msg.Body = $body
    $smtp.Send($msg)
    # Add closing message to log file
    $timeStamp = Get-Date -Format "MM/dd/yyyy hh:mm:ss"
    $message = "Accounts affected: $currentCount"
    Add-Content $logOutFile $message
    $message = "$timeStamp -- Completed in $totalMin min."
    Add-Content $logOutFile $message
    Please let me know if you think I can make any performance modifications.
    Daniel
    --Edit-- I have updated the script for Exchange 2010 SP1, also added logging, error checking and email notifications.  This new script also checks first to make sure the appointment doesn't already exist before adding it.  (To prevent multiple
    entries of the same event... Note: This check, although necessary in my opinion, is very time consuming.)

    Hi Daniel
    I am trying to add addition propertires like TV, Copier etc. to Room Mailbox in Exchange 2010 using following commands:-
    [PS] C:\Windows\system32>$ResourceConfiguration = Get-ResourceConfig
    [PS] C:\Windows\system32>$ResourceConfiguration.ResourcePropertySchema+=("Room/Whiteboard")
    Upper two commands run fine but following command gives error:-
    [PS] C:\Windows\system32>Set-ResourceConfig -ResourcePropertySchema $ResourceConfiguration.ResourcePropertySchema
    The term 'Set-ResourceConfig' is not recognized as the name of a cmdlet, function, script file, or operable program. Ch
    eck the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:19
    + Set-ResourceConfig <<<<  -ResourcePropertySchema $ResourceConfiguration.ResourcePropertySchema
        + CategoryInfo          : ObjectNotFound: (Set-ResourceConfig:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    I also tried with space after set but still getting error:
    [PS] C:\Windows\system32>Set -ResourceConfig -ResourcePropertySchema $ResourceConfiguration.ResourcePropertySchema
    Set-Variable : A parameter cannot be found that matches parameter name 'ResourceConfig'.
    At line:1 char:20
    + Set -ResourceConfig <<<<  -ResourcePropertySchema $ResourceConfiguration.ResourcePropertySchema
        + CategoryInfo          : InvalidArgument: (:) [Set-Variable], ParameterBindingException
        + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SetVariableCommand
    Pl advise the solution at [email protected] . I got this help from
    http://zbutler.wordpress.com/2010/03/17/adding-additional-properties-to-resource-mailboxes-exchange-2010/

  • Error while creating user in OIM using Create User API

    Hi All,
    My Setup:
    OIM running on Jboss Server where as my custom application to create user using CreateUser API in Tomcat Server.
    Below is the code that im trying to run.
    try
              System.out.println("Started ---");
                   ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                   System.out.println("Login ---");
                   Hashtable env = config.getAllSettings();
                   tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
                   System.out.println("Authenticated");
                   if (ioUtilityFactory!=null)
                        System.out.println("Login OK ---");
                   System.out.println("Getting utility interfaces...");
                   tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
                   System.out.println("Starting processing...");
                   Map attrs = new Hashtable();
                   attrs.put("Users.User ID",request.getParameter("userid"));
                   attrs.put("Users.Last Name",request.getParameter("lname"));
                   attrs.put("Users.First Name",request.getParameter("fname"));
                   attrs.put("Organizations.Key","1");
                   attrs.put("Users.Role","Full-Time");
                   attrs.put("Users.Xellerate Type","End-User");
                   attrs.put("Users.Password",request.getParameter("password"));
                   long key = moUserUtility.createUser(attrs);
                   System.out.println("Processing DONE...");
                   ioUtilityFactory.close();
         catch(Exception e )
         System.out.println("---" + e.getMessage());
         e.printStackTrace();
    When i am trying to create user it's throwing the below error message.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: Could not initialize class com.thortech.xl.util.config.ConfigurationClient
         com.emulex.productsellers.CreateUser.doPost(CreateUser.java:33)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    Apache Tomcat/5.0.28
    And one more thing is if i place this code in jboss and it was working there with out any issues.
    Please let me know if i am missing anything.
    It's bit urgent.
    Thanks in Advance.
    Siva Pokuri.

    URGENT** How to change  OIM user password from outside OIM

  • How to create users in Weblogic using an API

    Hi All,
    I have a requirement where i need to add the users in security realm without using Weblogic Console.Is there any API or program which lets us to create the users and set it in realm.
    Please suggest!!
    Thanks.

    Hi,
    You can follow the blog written by Middleware magic team
    Creating Users And Groups
    http://middlewaremagic.com/weblogic/?p=4981
    Deleting Users And Groups
    http://middlewaremagic.com/weblogic/?p=5234
    Users List from Security Realm
    http://middlewaremagic.com/weblogic/?p=6678
    Hope this will be helpful
    Regards
    FAbian

  • Creating Windows Basic Task using powershell

    Hello Everyone,
    Please help me out in the below situation:
    I have to create a basic windows task using powershell to run a script on a specific date and time.
    Let me make it even clear :
    I have a csv say,
    D:\xyz.csv
    ServerName ,  Date  , Time
    Random1,   11/15/2014,01:00:00PM
    Random2,   12/01/2015,03:00:00PM
    ...and so on
    I also have a script at E:\TestingServer.ps1
    I need to create list of windows tasks to invoke TestingServer.ps1 with parameters as servername and Time of task as given date and time in csv.
    Task1- with input as ServerName at Date and time from CSV
    Task2-with input as ServerName at Date and time from CSV

    Well here is a good article showing howto do this:
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/09/18/create-a-powershell-scheduled-job.aspx
    ¯\_(ツ)_/¯

  • How to create a context menu using powershell

    Hi 
    i would like to create a context menu for powershell but i am getting an error after powershell menu is created
    "This file does not have a program associated to it. i am using this script . I am trying to create a powershell shortcut on folders."
    also once it gets created i would like to open powershell as admin always
    New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
    Test-Path HKCR:\Directory\shell\Powershell
    New-Item -Path HKCR:\Directory\shell -Name Powershell
    Set-Item -Path HKCR:\Directory\shell\Powershell -Value "Open Powershell Here" 
    New-Item -Path HKCR:\Directory\shell\Powershell\key -Value "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command ""Set-Location -LiteralPath '%L'"""

    You need to put forth the effort to ask a good, clear, and meaningful question.
    As it stands, you seem to have a record of asking nearly unintelligible questions that take a great amount of effort for others to guess what you are asking. This is bad because it wastes everyone's time.
    Read these for some good information on how to ask good questions:
    Posting guidelines
    Handy tips for posting to this forum
    How to ask questions in a technical forum
    Rubber duck problem solving
    How to write a bad forum post
    -- Bill Stewart [Bill_Stewart]

  • Create User in OID using Java API

    I read the documentation, read javadoc for Java API for OID, but still am not clear "how can I create a user in OID using Java API for OID."
    It tells us how to create a java object User, but then how do we write this object to OID ?
    I searched every where, metalink, forums, google...and am still looking for answere...
    Thanks in Advance
    Cheers
    Puneet

    I did it using the Novell LDAP java api:
    import com.novell.ldap.*;
    public class LdapAdmin {
    public static final String ldap_base = "dc=your,dc=company,dc=com";
    public static final String ldap_user_base = "cn=Users," + ldap_base;
    public static final String ldap_portal_base = "cn=PORTAL_GROUPS,cn=Groups," + ldap_base;
    public static final String ldap_extended_base = "cn=Extended Properties,cn=OracleContext," + ldap_base;
    public static final String ldap_dbdomain_base = "cn=OracleDefaultDomain,cn=OracleDBSecurity,cn=Products,cn=OracleContext," + ldap_base;
    public static final String ldap_context_base = "cn=COMMON,cn=OracleDBAppContext," + ldap_dbdomain_base;
    private static final String default_ldap_host = "infrastructure.your.company.com";
    private static final int default_ldap_port = 4032;
    private static final String default_ldap_login = "cn=orcladmin," + ldap_user_base;
    private static final String default_ldap_pwd = "welcome1";
    private static final String default_user_pwd = "secret";
    private static final String[] personclass_values = { "top", "person", "organizationalPerson", "inetOrgPerson", "orcluser", "orcluserv2" };
    public static LDAPConnection getConnection (String host, int port, String user, String pwd) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(host,port);
    lc.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: "+lex.getResultCode()+"-"+lex.getLDAPErrorMessage());
         return lc;
    public static LDAPConnection getConnection (String host, int port) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(host,port);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: "+lex.getResultCode()+"-"+lex.getLDAPErrorMessage());
         return lc;
    public static LDAPConnection getConnection (String user, String pwd) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(default_ldap_host,default_ldap_port);
    lc.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    lex.printStackTrace();
         return lc;
    public static LDAPConnection getConnection () {
    return getConnection(default_ldap_host,default_ldap_port);
    public static void bind (LDAPConnection conn, String user, String pwd) {
    try {
    conn.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in bind: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    lex.printStackTrace();
    private static void bind (LDAPConnection conn) {
    bind(conn,default_ldap_login,default_user_pwd);
    public static void modifyAttribute (LDAPConnection conn, String dn, String attr, String val, int mod) {
    LDAPAttribute attribute = new LDAPAttribute(attr,val);
    LDAPModification[] modification = new LDAPModification[] { new LDAPModification(mod,attribute) };
    try {
    conn.modify(dn,modification);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in modifyAttribute: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void modifyAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.REPLACE);
    public static void addAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.ADD);
    public static void deleteAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.DELETE);
    public static void deleteEntry (LDAPConnection conn, String dn) {
    try {
    conn.delete(dn);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in deleteEntry: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static boolean isValidDn(LDAPConnection conn, String dn) {
    try {
    LDAPSearchResults res = conn.search(dn);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in deleteEntry: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    return false;
    public static void createPerson (LDAPConnection conn, String net_id, String lname, String fname, String office, String email, String id, String fullname) {
         LDAPAttributeSet attributeSet = new LDAPAttributeSet();
    attributeSet.add(new LDAPAttribute("cn", net_id));
    attributeSet.add(new LDAPAttribute("sn", lname));
    attributeSet.add(new LDAPAttribute("objectclass", personclass_values));
    attributeSet.add(new LDAPAttribute("l", office));
    attributeSet.add(new LDAPAttribute("mail", email));
    attributeSet.add(new LDAPAttribute("employeeNumber", id));
    attributeSet.add(new LDAPAttribute("givenName", fname));
    attributeSet.add(new LDAPAttribute("uid", net_id));
    // attributeSet.add(new LDAPAttribute("fullName", fullname));
    attributeSet.add(new LDAPAttribute("orclpkcs12hint", default_user_pwd));
    attributeSet.add(new LDAPAttribute("orclpassword", VerifyPassword.getHash(net_id,default_user_pwd)));
    attributeSet.add(new LDAPAttribute("userpassword", default_user_pwd));
    attributeSet.add(new LDAPAttribute("orcldefaultprofilegroup", "cn=DEFAULT,"+ldap_portal_base));
    LDAPEntry entry = new LDAPEntry("cn="+net_id+","+ldap_user_base,attributeSet);
    try {
    conn.add(entry);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in createPerson: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void updatePerson (LDAPConnection conn, String net_id, String lname, String fname, String office, String email, String id, String fullname) {
    LDAPModification[] mod = new LDAPModification[8];
    mod[0] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("cn", net_id));
    mod[1] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("sn", lname));
    mod[2] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("l", office));
    mod[3] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("mail", email));
    mod[4] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("employeeNumber", id));
    mod[5] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("givenname", fname));
    mod[6] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("fullName", fullname));
    mod[7] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("uid", net_id));
    try {
    conn.modify("cn="+net_id+","+ldap_user_base,mod);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in updatePerson: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void main (String[] args) {
    try {
    LDAPConnection conn = getConnection(default_ldap_login,default_ldap_pwd);
    // updatePerson(conn,"ID1","Somebody","Joe","CLE","[email protected]","1","Joe Somebody 2");
    // modifyAttribute(conn,"cn=ID1,"+ldap_user_base,"fullName","Joe Somebody",LDAPModification.REPLACE);
    // modifyAttribute(conn,"cn=ID1,"+ldap_user_base,"displayName","Joe Somebody");
    createPerson(conn,"ID1","Somebody","Joe","CLE","[email protected]","1","Joe Somebody");
    // deleteEntry(conn,"cn=ID1,"+ldap_user_base);
    conn.disconnect();
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in main: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    }

  • Creating user in LDAP using Oracle Identity Store API

    We are trying to create users in LDAP (open LDAP) using Oracle's Fusion Middleware's Oracle Identity Service API. Here is my code snippet to create user,
              final IdentityStoreService identityStoreService = jpsContextFactory
                        .getContext().getServiceInstance(IdentityStoreService.class);
              IdentityStore idmStore = identityStoreService.getIdmStore();
              final Property statusProperty = new Property("status", Arrays.asList("active"));
              final PropertySet propertySet = new PropertySet();
              propertySet.put(statusProperty);
              idmStore.getUserManager().createUser("userid", new char[0], propertySet);
    but I am getting this error
    Caused by: oracle.security.idm.IMException: Mandatory attribute missing :status
         at oracle.security.idm.providers.stdldap.util.LDAPRealm.createUser(LDAPRealm.java:139)
    even though I am clearly adding the attribute as mentioned above, am I missing any thing?
    Thanks for your help :)
    Full stack trace:
    oracle.security.idm.OperationFailureException: oracle.security.idm.IMException: Mandatory attribute missing : status
         at oracle.security.idm.providers.stdldap.util.LDAPRealm.throwException(LDAPRealm.java:785)
         at oracle.security.idm.providers.stdldap.util.LDAPRealm.createUser(LDAPRealm.java:153)
         at oracle.security.idm.providers.stdldap.LDUserManager.createUser(LDUserManager.java:170)
         at oracle.security.idm.providers.stdldap.LDUserManager.createUser(LDUserManager.java:121)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
         at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)
         at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
         at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
         at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:205)
         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.security.idm.IMException: Mandatory attribute missing :status
         at oracle.security.idm.providers.stdldap.util.LDAPRealm.createUser(LDAPRealm.java:139)
         ... 52 more
    Edited by: 940837 on Jun 14, 2012 5:00 PM

    URGENT** How to change  OIM user password from outside OIM

  • How to create user in workspace using command line with Internal APEX

    Hi fellows,
    I'm newbie with APEX and my i try doing something different. I need to build one application in Internal for create users in another workspaces. So, for do this, need use command line and PL/SQL code.
    I know exists a CREATE_USER procedure. But, this procedure just create a user in Internal, not in workspace, like i want.
    Its possible? Someone can help me?
    Example of create_user procedure:
    BEGIN
      APEX_UTIL.CREATE_USER(
         p_user_name => 'NEWUSER2',
         p_first_name => 'FRANK',
         p_last_name => 'SMITH',
         p_description => 'Description...',
         p_email_address => '[email protected]',
         p_web_password => 'password',
         p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
         p_default_schema => 'MY_SCHEMA',
         p_allow_access_to_schemas => 'MY_SCHEMA2',
         p_change_password_on_first_use => 'N',
         p_attribute_01 => '123 456 7890');
    END;
    Thank you.

    Did you try it like this?
    DECLARE
       l_workspace_id      number;
    BEGIN
        l_workspace_id := apex_util.find_security_group_id (p_workspace => 'MY_WORKSPACE_NAME');
        apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
      APEX_UTIL.CREATE_USER(
         p_user_name => 'NEWUSER2',
         p_first_name => 'FRANK',
         p_last_name => 'SMITH',
         p_description => 'Description...',
         p_email_address => '[email protected]',
         p_web_password => 'password',
         p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL',
         p_default_schema => 'MY_SCHEMA',
         p_allow_access_to_schemas => 'MY_SCHEMA2',
         p_change_password_on_first_use => 'N',
         p_attribute_01 => '123 456 7890');
    END;

  • Create Offline Address Book using powershell - PublicFolderDistributionEnabled not found

    We are using the following commands to create a new Offline Address book using powershell. The command New-OfflineAddressBook runs successfully and creates an Offline Address Book. However when we try to set the value of PublicFolderDistributionEnabled property
    using Set-OfflineAddressBook we get the following exception
    Remote Exception: A parameter cannot be found that matches parameter name 'PublicFolderDistributionEnabled'
                try
                    using (Runspace runSpace = OpenRunspace())
                        // Create offline address book command
                        var command = new Command("New-OfflineAddressBook");
                        command.Parameters.Add("Name", name);
                        command.Parameters.Add("AddressLists", addressListName);
                        command.Parameters.Add("VirtualDirectories", OABServer);
                        // Execute command
                        if ((res = ExecuteShellCommand(runSpace, command)) == false)
                            return false;
                        // Set offline address book command
                        var command1 = new Command("Set-OfflineAddressBook");
                        command1.Parameters.Add("Identity", name);
                        command1.Parameters.Add("PublicFolderDistributionEnabled", publicFolderEnabled);
                        command1.Parameters.Add("Confirm", new SwitchParameter(false));
                        // Execute command
                        if ((res = ExecuteShellCommand(runSpace, command1)) == false)
                            DeleteOfflineAddressBook(name);
                            return false;
                catch (Exception ex)
                    DeleteOfflineAddressBook(name);
                    throw;

    If your Exchange version is 2013 it supports only the web distribution method.
    Please follow this to create OAB in Exchange2013 
    http://blogs.technet.com/b/exchange/archive/2013/01/14/managing-oab-in-exchange-server-2013.aspx
    Please check this for the details of OAB in Exchange2013
    http://blogs.technet.com/b/exchange/archive/2012/10/26/oab-in-exchange-server-2013.aspx
    If it Exchange2010 please check
    this
    Thanks, MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • How do I enable "Audit user account logons" using PowerShell, to improve security?

    With successful hacking attacks more often employing valid Active Directory user credentials, it is quite helpful when administrators can
    easily poll user logon events. Rather than query
    every domain computer for its logon events, one can alter the Default Domain Controller Policy GPO to enable "Audit user account logons" (Success and Failure) then merely poll
    only the domain controller -- quite efficient. PowerShell helpfully has its Group Policy Module, including the following two cmdlets.
    1) Get-GPO "Default Domain Controllers Policy" will retrieve the top-level GPO object, but how do I enable that specific setting?
    2) Set-GPRegistryValue might be the right tool, but I cannot find any documentation on the values I need to supply to its parameters (-Name -Key -ValueName -Type -Value) to enable "Audit user account logons" -- both Successes and Failures.
    One can manually modify this setting using the Group Policy Management console GUI on the domain controller, but I am trying to upgrade my professional work habits to use stored scripts, rather than unrecorded point & clicks, so that my actions are repeatable
    and documented.
    Any pointers to documentation or an example would be welcome. I originally posted this question in the TechNet PowerShell Forum this afternoon, but someone recommended I copy it to the TechNet Group Policy Forum.
    Jeffrey - New Orleans MCITP Enterprise Administrator, Virtualization Administrator

    Hi Jeffrey,
    >>One can manually modify this setting using the Group Policy Management console GUI on the domain controller, but I am trying to upgrade my professional work habits to use stored scripts, rather than unrecorded point & clicks, so that my actions
    are repeatable and documented.
    Before going further, although you have expressed that you don't want to use GPMC GUI to configure the audit setting, in fact, it's an easy and comparatively handy method to set the setting. Besides, based on the description, you
    want to use PowerShell to do this. However, as far as I know, PowerShell can configure registry-based policy settings and Group Policy Preferences Registry settings, but audit policy security settings are not registry keys.
    Nonetheless, if we really don't want to use GPMC console to do this, we can use Auditpol.exe to set the audit setting.
    Regarding this point, the following article can be referred to for more information.
    Auditpol
    https://technet.microsoft.com/en-in/library/cc731451.aspx
    Auditpol set
    https://technet.microsoft.com/en-in/library/cc755264.aspx
    In addition, regarding Group Policy Cmdlets in Windows PowerShell, the following article can be referred to for more information.
    Group Policy Cmdlets in Windows PowerShell
    https://technet.microsoft.com/en-us/library/ee461027.aspx
    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.
    Best regards,
    Frank Shen

  • Creating look up column using powershell.

    I have a Sharepoint list "Studentparent" in my website. I am trying to create a custom list "studentchild" list using powershell code and this studentchild list will be having a look up column getting ID column from "StudentParent"
    list - So the code is 
    #To which site u want to create the list 
    $spWeb=Get-SPWeb -Identity http://XYZ
    #List type or template 
    $spTemplate = $spWeb.ListTemplates["Custom List"]
    #Get all the lists to the listcollection
    $spListCollection=$spWeb.Lists
    #adding the new list to the list collection
    $spListCollection.Add("StudentChild","StudentChild",$spTemplate)
    #get the path of subsite and sitecollecion 
    $path = $spWeb.url.trim()
    #get the list to the list object
    $spList = $spWeb.GetList("$path/Lists/StudentChild")
    $ParentList = $spWeb.Lists.item("StudentParent")
    $spList = $WebObj.Lists["StudentChild"]
    $spList.Fields.AddLookup("ChildLookupField",$ParentList.id,$false)
    $spChildListLookupField = $spList.Fields["ChildLookupField"]
    $spChildListLookupField.LookupField = $ParentList.Fields["ID"]
    $spChildListLookupField.RelationshipDeleteBehavior = [Microsoft.SharePoint.SPRelationshipDeleteBehavior]::Restrict
    $spChildListLookupField.Update()
    $Views = $spList.Views["All Items"]
    $Views.ViewFields.Add("ChildLookupField")
    $Views.Update()
    but when i run this code - I am getting error
    Cannot index into a null array.
    + $spList = $WebObj.Lists["StudentChild"]

    Hi Mahesh,
    The object "$WebObj" is not instantiated in your code. You have already assigned the value to $splist in following line.
    $spList = $spWeb.GetList("$path/Lists/StudentChild")
    and once again you are assigning value
    $spList = $WebObj.Lists["StudentChild"] // redundant and it should be $spWeb.Lists["StudentChild"]
    Please let us know if this fixes your issue.
    Thanks,
    M. Gubendra Raj

Maybe you are looking for

  • I get the following message whenever I try to open FireFox

    "microsoft (C) Register Server has stopped working" Hi there. Out of nothing I get the following message whenever I try to open FireFox : "'''microsoft (C) Register Server has stopped working'''" Internet Explorer won't open either, but it doesn't gi

  • Safari won't load pages with pictures after installing Maverick

    I have an older iMac (2008), but it runs great and I have no problems with it.  Except now that i installed Maverick, now Safari doesn't work properly.  For most things, it works fine, then It will quit in the middle of a page.  Or, I have uploaded p

  • Data flow from E-commerce to SAP CRM 7.0 , ECC and third party system

    Hi, I have a requirement like the customers are created in E-commerce website of the company. When a customer is created the data should be synch to CRM , ECC and thrid party system ( price data from CRM  for the customer ). How do we transfer the da

  • Hardware Migration

    Dear All, We are in progressing of Hardware Migration for All prod servers. Below is the ECC system detail . CI and DB are separate nodes and 4 App servers were installed. ECC EHP5 6.0 , AIX , DB2 Active and Active cluster setup. Now can you suggest

  • Will BC eventually include Coldfusion and/or Flex?

    My understanding is that BC web sites are .NET based. Will BC sites eventually include Coldfusion and/or Flex servers? Having spent many hours learning and building rich Internet applications using Coldfusion and Flex, hard to believe an Adobe-hosted