Exception when remotely executing Export-CsArchivingData cmdlet from C# managed code

Hi,
Hopefully this is the right forum.
The issue is specifically about remotely executing Export-CsArchivingData cmdlet from C# managed code.
I use RunspacePool to connect to remote Lync server as described here:
http://msdn.microsoft.com/en-us/library/ee706598(v=vs.85).aspx
I can connect to remote Lync server and execute many Lync cmdlets (e.g. Get-CsUser, Get-CsSite, Get-CsPool, etc) and get the results just fine.
However, when it tries to execute Export-CsArchivingData cmdlet remotely, it throws the following exception:
System.AggregateException: One or more errors occurred. ---> System.Management.Automation.RemoteException: The term 'Export-CsArchivingData' 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.
   at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
   at System.Management.Automation.PowerShell.EndInvoke(IAsyncResult asyncResult)
Additional info:
1. I created a custom RBAC role and added Export-CsArchivingData to it. Then, assign this new role to the account that runs the application.
2. Using regular powershell (not Lync powershell) from the machine (that I run my app from) with Lync admin tool installed and ran with the account that has the custom RBAC role assigned, I can connect to remote Lync server and execute Export-CsArchivingData
just fine.
3. Execute the app using the same above account (that has custom RBAC role) on two machines (one with Lync admin tool installed, one without) and connect to remote Lync server.
   Same behavior on both machine, I got the above the exception when executing Export-CsArchivingData and no problem when executing other Lync cmdlets mentioned above.
   Yes, even from a machine without Lync admin tool installed, I can execute other Lync cmdlets mentioned above.
At this point, I am not sure why I get the above exception when Export-CsArchivingData is executed from my app while I can connect to remote Lync server and call Export-CsArchivingData just fine via regular Powershell, both on the same machine.
Note: I do not call Import-Module Lync in C# managed code since it is not necessary so far for executing other Lync cmdlets remotely.
Any idea on what to look for?
Thanks in advance.

I would recommend you call Import-Module Lync first, the command is not recognized.
Lisa Zheng
TechNet Community Support

Similar Messages

  • Can Export-CsArchivingData cmdlet can take time(with date) as a parameter.

    Hello  Experts
    In lync 2013
    Can Export-CsArchivingData cmdlet can take time as a parameter ???
    Export-CsArchivingData -Identity "ArchivingDatabase:LYNC2013.xxxxx.com" -StartDate "9/13/2013" -EndDate "9/13/2013" -OutputFolder "C:\IMBackup"
    -IT WORKS
    Export-CsArchivingData -Identity "ArchivingDatabase:LYNC2013.xxxxx.com" -StartDate "9/13/2013 08:52:00" -EndDate "9/13/2013 08:52:20" -OutputFolder "C:\IMBackup" -IT Doesn't 
    Please help
    Thanks In Advacnce.
    Arvind

    No, you cannot specify a date-time value such as 6/1/2010 11:00 AM.
    You can specify date only.
    Also you can refer below links
    http://unifiedpeople.ru/rtccmdlets.en/html/644bf86e-0e7e-4607-bedf-d491b1c16745.htm
    http://technet.microsoft.com/en-us/library/gg398452.aspx
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

  • Why authorization needed when accesing an export in excel from Bex

    Hi Experts,
    Before upgrade to version 7.0 when our user export a report to excel is
    neccessary enter user and password, the issue is that not everybody
    have a user therefore so they cannot see the excel.
    This problem is due to the icons are in the server and in the excel
    there are links to these icons of the server.(for example the icon of the hierarchy node)
    If you configurate the excel to not load the icons the issue disappears
    In Microsoft Excel
    Select tools->Options->General->Web Options->General tab
    and unmark the flag "Load pictures from Web pages"
    But this solution is not always available for all users due to different excel plug-ins installed in their local computers.
    Our questions are:
    1.- How can we avoid these icons in the future?
    2.- Why these problems occurs since the upgrade to SAP BW 7.0?
    3.- Is there any option to insert the icons instead of having links?
    Thanks in advance

    Hi Reddy,
    it has been some time ago you have posted this issue so I'm not sure if you still need a solution for this issue.
    Anyway, I assume you have found the manual regarding the export to excel, csv and pdf for Visual Composer (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8ecb479123)
    We also had issues with the export funcationality described in the document. I don't recall the exact error message.
    Just some advice:
    Copy the code from the document into Notepad. Then, make sure you re-arrange the code into 1 single line (remove all enters). Then, copy the code into the formula editor of the hyperlink action. Don't forget to define a store (e.g. reptname) but that is explained in the document as well.
    Regards,
    Sven

  • Error ORA-04031 while executing a stored procedure from Pro C++ code

    I am getting the error ORA-04031(Unable to allocate 4096 bytes of shared memory("Shared Pool",.....)) while trying to execute a stored procedure from my pro*C application. This happens only after a few hours since the application has been running. I am closing the cursor after every database call.
    Does anyone know why it is happening and any possible solutions?
    TIA
    Srithaj.

    One thing that can be done is to flush the shared pool before starting the application.
    alter system flush shared pool;
    Another is to increase the shared pool size by setting the parameter shared_pool_size in init_sid.ora file.
    null

  • Permission denied when I execute a unix command from within my java applet.

    Hi Gang,
    Forgive me if this is not the appropriate forum for this problem. I'm posting this problem on this forum since I got no answers on the other forum I posted on.
    I've written a simple java applet that runs a unix command and then displays some information. The applet compiles fine, and runs perfectly from the command line on my unix system.
    However, when I point a browser at the applet from my desktop PC I get the following error as taken from the java console:
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    This is of course the first line in a long line of error messages. It appears that I am not able to execute a command on the unix system through my applet. I know the problem is with trying to execute a unix command since commenting it causes no error in the web browser. This is the command I'm using in java to execute the unix command:
    p = Runtime.getRuntime().exec("ps");
    Here's the html file on the unix system:
    <html>
    <head></head>
    <body>
    <appletcode=G.class height="250" width="400">
    Your browser does not support the applet tag.
    </applet>
    </body>
    </html>
    I won't list the java code since it is compiling and working on the command line. But, if you want to see it I'll provide it.
    I've done quite a bit of research on this and it seems that a great number of people have similar problems reading or executing files through java. I have yet to find a solution to this problem.
    Here are some details about my setup:
    Server:
    HP9000 running HP/UX 11.23
    Apache Web Server 2.0.35
    Java 1.5
    Desktop PC:
    Win2K Pro
    Internet Explorer 6
    Java 1.6
    If you have a solution I would be very grateful! This problem is keeping me from writing my application!
    thanks!
    kev

    Multi-posted.
    Already answered here http://forum.java.sun.com/thread.jspa?threadID=5225314&messageID=9916327#9916327

  • Permission denied when I execute a unix command from inside my Java applet.

    Hi Gang,
    Forgive me if I'm posting this to the wrong forum! I didn't get any answers on the previous forum that I posted this to.
    I've written a simple java applet that runs a unix command and then displays some information. The applet compiles fine, and runs perfectly from the command line on my unix system.
    However, when I point a browser at the applet from my desktop PC I get the following error as taken from the java console:
    Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    This is of course the first line in a long line of error messages. It appears that I am not able to execute a command on the unix system through my applet. I know the problem is with trying to execute a unix command since commenting it causes no error in the web browser. This is the command I'm using in java to execute the unix command:
    p = Runtime.getRuntime().exec("ps");
    Here's the html file on the unix system:
    <html>
    <head></head>
    <body>
    <appletcode=G.class height="250" width="400">
    Your browser does not support the applet tag.
    </applet>
    </body>
    </html>
    I won't list the java code since it is compiling and working on the command line. But, if you want to see it I'll provide it.
    I've done quite a bit of research on this and it seems that a great number of people have similar problems reading or executing files through java. I have yet to find a solution to this problem.
    Here are some details about my setup:
    Server:
    HP9000 running HP/UX 11.23
    Apache Web Server 2.0.35
    Java 1.5
    Desktop PC:
    Win2K Pro
    Internet Explorer 6
    Java 1.6
    If you have a solution I would be very grateful! This problem is keeping me from writing my application!
    thanks!
    kev

    Multi-posted.
    Already answered here http://forum.java.sun.com/thread.jspa?threadID=5225314&messageID=9916327#9916327

  • Internal error exception when try to export Crystal Report using V2008 C#

    Hello
    Im working in an application that should send a parameter to a crystal report. Everything works fine when i test the report in the CR 2008 and shows the information correctly
    After has the report working, i design a Visual C# application using forms and loading and exporting the report, which still works ok (generates the pdf file with the information)
    Then i convert this application as a console application. The point is i need the report working as a windows service, to generate it every 15 minutes without user intervention (but try it as a console application first to be sure it will work ok before creating as a service)
    Then i started the service. But when i call the report it sends an exception that i cannot understand:
    Internal exception No se pudo abrir la conexion.
    No se pudo abrir la conexion.
    Prueba {DDE88B40-8A22-4EDB-9DEE-A5033DAA0140}.rpt
    This is my code for the report that works fine as long as i don´t put any parameter into the sql command:
    ReportDocument cryRpt = new ReportDocument();
    cryRpt.Load(nomRepU);
    cryRpt.Refresh();
    cryRpt.SetParameterValue("EVAId", evaID);
    ExportOptions CrExportOptions = new ExportOptions();
    DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
    PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
    CrDiskFileDestinationOptions.DiskFileName = @"" + path + "
    " + nomRepPDF_Exp;
    CrExportOptions = cryRpt.ExportOptions;
    CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
    CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
    CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
    CrExportOptions.FormatOptions = CrFormatTypeOptions;
    cryRpt.Export(); -
    here i get the exception
    I checked that the parameter is being read correctly in the crystal report as i remove all the sql commands and just put the parameter in the heading of the report, and is show as supposed and generates the pdf file automatically, but when i assign the parameter to the sql command (select * from myTable where idTable = {?EVAId}  ) the crystal report send the exception i mentioned above
    I don't know what to do, i don't know if i configuring correctly the report or something is missing. I would appreciate any help. If need more information please let me know. This is making me crazy
    Thanks in advance
    Veronica Estrada

    Hello all
    I just fixed my issue, i made some changes in the code as well as in the crystal report:
    *Crystal report changes*
    I removed the parameter that i have to filter the information, instead i in the C# code i let the crystal report which records to show
    Note: in the preview of the report all information will be shown, however i won´t use it this way so is not a problem
    *Visual C# changes*
    // Load the crystal report
    cryRpt.Load(nomRepU);
    // Establish SQL conection parameters - below the code for the function
    SetTableLocation(cryRpt.Database.Tables);
    //This is really the main change, because if i use "setParameter" function still generates "Internal exception"
    cryRpt.DataDefinition.RecordSelectionFormula = "{EVAPrincipal.EVAId} = " + evaId;  // ---> Should be the same name of the table and the recordID i want to show
    // Export function
    cryRpt.Export();
    private void SetTableLocation(Tables tables)
                ConnectionInfo connectionInfo = new ConnectionInfo();
                connectionInfo.ServerName = @"" + server;  // ODBC
                connectionInfo.DatabaseName = @"" + initialCatalog;  // data base name
                connectionInfo.UserID = @"" + user;
                connectionInfo.Password = @"" + password;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    TableLogOnInfo tableLogOnInfo = table.LogOnInfo;
                    tableLogOnInfo.ConnectionInfo = connectionInfo;
                    table.ApplyLogOnInfo(tableLogOnInfo);
    My notes:
    I guess i had two problems: the first with the SQL connection, in connectionInfo.ServerName i was using the name of the instance instead of the ODBC name. The second is the way the parameter is received in the crystal report as it works as windows service (this is my guess) then if i control everything through the C# code it runs perfect!
    Hope this helps if anyone has a similar problem
    Regards
    Veronica Estrada

  • Tomcat shutdowing when remote object is calling secondtime from flex to blazeds

    Hi All,
    I am new to flex and started working on that.now i called one remote object from flex through blazeds.its working fine but when i call second time tomcat is  shutdowing .again if i start tomcat it is working fine.
    what is the problem does any one helps?
    sudheer

    Thanks for the tip Joe.
    It's not quite what I was looking for, but it gave me some ideas.
    The blog post describes how to create your own server to handle the file stream. With BlazeDS & Java EE app server there's no need to implement the low level stuff.
    One option would be to read the data on Flex side in chunks and make a request to send each chunk at a time, but I don't know whether this helps at all. Might just slow down the network.
    Another option is to write a custom adapter for BlazeDS endpoint, but I don't know enough details on this to say is it possible or not.
    Third option is to use regular servlet code and Apache Commons FileUpload module.
    Still interested hearing opinions from people working with BlazeDS.

  • Security exception when trying to call a DLL from an applet

    Hi all,
    I really hope someone out there can help me. I'm trying to call a windows DLL from an applet but always get some error when the call to the DLL comes. If I run it on the command line (calling a dummy main function that only calls the dll) I don't get any error. However, with the -Djava.security.manager, I get an ExceptionInitialiserError. When running it in a browser, I seem to get any of three errors, the above, securityAccessControlException (as I was expecting) and even NoClassDefFoundError.
    I realise of course that this has to do with the permissions in effect but nothing seems to happen when I change the policy file, so I have to feeling that I'm chaning the wrong file. The one I'm using is the one the JRE entry in the registry is pointing to, Java Runtime Environment->CurrentVersion...
    I even tried giving everything in the applet's directory AllPermission.
    So what I'm wondering is this. Is there any way to check if your policies are actually working and when you update the files, what do you need to do to make the changes take effect?
    Best regards,
    G�sli

    I have the same problem. Have you solved your problem, if so please let me know what the solution is.
    Einar �rn

  • SSMS is not listing table and views objects though the objects are listed when I execute TSql string "SELECT * FROM sys.Tables"

    I have a db, call it xyz.mdb
    It suddenly is that SSMS is not listing the table objects nor the Views.  SELECT * FROM sys.Tables and SELECT * FROM sys.Views work very fine.  But when I click on the tables node, on Objects Explorer, Only the Systems Tables and File Tables folders
    show. 
    Other DBs on same SQL instance do not show same problem.  They are all working very fine.
    I have backed up and restored this db on other computers and the behaviour is the same.  Incidentally right-clicking the db and clicking Properties throws up this error message.
    -------------------------------------------------------------------------Error!
    Cannot show requested dialog.
    Property Size is not available for Database '[Pliny E DB - NOA 2014]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).121019-1325+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=Size&LinkId=20476
    --------------------------------------------------------------------------------End>
    When I try to Refrresh the Tables node on Object Explorer, I get this other:
    ------------------------------Error!
    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x9090d9b7; actual: 0x909001b4). It occurred during a read of page (1:1173) in database ID 21 at offset 0x0000000092a000 in file 'c:\Databases\Clients\NOA\Pliny E DB -
    NOA 2014.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check
    (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online. (Microsoft SQL Server, Error: 824)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476
    ------------------------------End>
    The Help link of course is not valid any more.
    Many thanks
    Vie
    @Abuja
    Vie

    Your database is corrupted and you need to run.
    DBCC CHECKDB
    You already have a backup so do it...
    This link will provide you with more information:
    http://msdn.microsoft.com/en-us/library/ms176064.aspx

  • I get this warning when trying to export a project from iMovie.

    The project could not be prepared for publishing because an error occurred. (-50).
    Does anyone know why?
    Thanks

    Hi
    Error -50 paramErr  Error in user parameter list
    Can there be any external hard disks - if so How is/are it/they formatted ? Must be Mac OS Extended (hfs) if used for Video.
    UNIX/DOS/FAT32/Mac OS Exchange - works for most but not for VIDEO.
    What this means in Your situation is above me.
    • free space on internal boot hard disk? How much ?
    Video codec
    • streamingDV, AIC etc. (not .avi, .mp4, .m4v, .wmv etc as they are containers not codecs)
    Pictures
    • in what format ? .jpg, .bmp, .tif, else ?
    Audio
    • from where/what format ? iTunes, .avi, .mp3, .aiff, else ?
    The "com.apple.iMovie.plist" file
    Many users has not observed that there are TWO libraries.
    • Library - at root level
    • Library - in user/account folder - THIS IS THE ONE to look into
    from Luke Burns
    I fixed the problem.. but it was very, very strange. I had a very long section for credits and set the line spacing to 1.0.. for some reason this caused it. I removed it, and it worked fine. I put it back, and I couldn't preview or play the video.
    I don't know why that could cause that big of a problem, but it did..
    Klaus1
    You need more free space on your hard drive.
    jonorparkerjon
    After phone support from apple I ended up creating a new project and adding all 117 clips back in individually till I found out what clips flagged and would not allow me to export. I had 3 I deleted and replaced and everything works now 1hr after tedious work....
    Where do Your material come from
    • Camera
    • External hard disk
    • USB-memory
    And all are connected so that iMovie can find it ?
    Yours Bengt W

  • Exception when trying to save portal favorites from BEx webreport

    Hello everybody!
    Since last week before christmas we have a problem regarding our portal favorites. When you try to save a individual BEx webreport the following exception is thrown:
    Exception caught: java.lang.NoSuchMethodError: com.sap.ip.bi.base.application.message.MessageException.<init>(ZZLcom/sap/ip/bi/base/exception/BIBaseRuntimeException;[Lcom/sap/ip/bi/base/application/message/IMessage;Ljava/util/Properties;Lcom/sap/security/api/IUser;Ljava/util/Locale;)V
    When looking into the netweaver administration the first exception which leads to this is:
    Exception caught: java.lang.NoSuchFieldError: BI_SHOW_TYPE
    java.lang.NoSuchFieldError: BI_SHOW_TYPE
    at com.sap.ip.bi.webapplications.dataproviders.queryview.impl.WdpQueryView.saveAs(WdpQueryView.java:340)
    at com.sap.ip.bi.webapplications.ui.dialogs.opensave.save.DlgStateSave.doOkCommand(DlgStateSave.java:129)
    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:324)
    at com.sap.ip.bi.util.MethodInvoker.callMethod(MethodInvoker.java:101)
    Thanks & Best regards
    Georg

    Hi Georg,
    So, at least we know the cause and why / when it appeared.
    Two possibilities:
    1.) Basis has done a clean, complete update. In that case, SAP would have some bug in the code. But I doubt this a bit, as such bugs should occur at compile time.
    2.) The update was done incompletely, so some parts are SP17, some are SP18. I would advise to call http://server:port/sap/monitoring/ComponentInfo (maybe you already have done so, writing "We have checked the versions of the components on AS").
    If there is no hint into direction 2, maybe it is 1. At least, if all components are really SP18, this would be a basis to open an OSS message, for sure.
    Anyhow, you also have tried a complete restart of the cluster?!
    Hope it helps
    Detlev

  • When trying to export a slideshow from iphoto it is freezing at the end. what could be the issue?

    We have a slideshow we created in iphoto. How do I burn it in idvd. I cannot get the export to finish, it stalls towards the end. We have less than 200 photos. We were able to do it once now it will not complete the export process. A ny help would be appreciative.

    Hi barbara10,
    so far I do not know "Live Media Type", I guess Export your slideshow for "HD1080p" or for Codec: H264
    should be OK for iDVD.
    This belongs to German Version of Aperture.
    Did you create the slideshow? Was it a external slideshow?
    Hope this helps
    Uwe

  • Single Sign On is not working when deploying a Wi-Fi profile from Configuration Manager 2012 R2

    Hello,
    Trying to deploy a wireless profile to a user collection everything works except for the single sign on.
    The user will get the wireless profile and be able to connect successfully but when the user signs on again to the same device the Wi-Fi will not connect before the logon process starts. 
    So GPO processing and home drive mappings are not occurring. The Wi-Fi profile is configured for "Single Sign On - Perform immediately before user logon" 
    These same settings can be managed successfully by GPO.  It would be really nice to be able to use ConfigMgr though!
    Thank you.

    Hi,
    Please refer to the links below:
    Single Sign-On Profile Sample
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa369849(v=vs.85).aspx
    Wireless Single Sign-On
    http://technet.microsoft.com/en-us/magazine/2007.11.cableguy.aspx
    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.

  • No action when trying to login a user from Enterprise Manager!

    Hi guyz,
    I have created 10g database on windows server2003, I have configured Enterprise manager but unable to login from EM.
    The EM service running fine, and the login page is also coming, but when I gave the username & password with the connection string and hitting the "Login" button there is no action.
    The database is up and running, listener is also running, I am able to connect from the command prompt, the emctl status dbconsole says EM is running. Initially I thought the EM configuration had some problems then I dropped the EM repository and recreated it, still unable to login from EM. Any suggestions??
    Thanks & Regards.

    No, not even as SYS user, initially the "Login" button was not working, whenever I pressed the login button there was no action, later I changed some of the Internet explorer settings, like changing the ActiveX scripts to enable, etc. Now the "Login" button is working, but even if I give the correct password, it is saying that username or/ and password is wrong.

Maybe you are looking for