Getting Lync enable users who are modified after specified time

Getting Lync enable users who are modified after specified time
Hi,
I need to get all the Lync enabled users from Lync 2010 server who are modified after specified time.
I have written a client with this below code for my purpose
string
dateString = "11/4/2014 11:19:10 PM";
DateTime
lastModifiedTime = DateTime.Parse(dateString, System.Globalization.CultureInfo.InvariantCulture);
PSCommand command = new PSCommand();
command.AddCommand("Get-CsUser");
command.AddParameter("Filter",
"WhenChanged -gt " + lastModifiedTime.ToString());
powershell.Commands
= command;
Collection<PSObject> outPut = powershell.Invoke();
But on calling Invoke method I am getting the below exception,
Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "Invalid cast problem for value: "11" type: "System.Nullable`1[System.DateTime]" query: "WhenChanged -gt 11/4/2014 11:19:10 PM" "17""
Can anyone please point me what am I doing wrong.
This command
Get-CsUser -filter {whenchanged -gt
"11/4/2014 11:19:10 PM"}
when run directly on Windows Powershell works fine.
Thanks in advance.
Sandeep

It appears you may be casting the date variable wrong. 
If you have
command.AddParameter("Filter",
"WhenChanged -gt 11/4/2014 11:19:10 PM"
And avoid the lastModifiedTime.ToString() addition, does it work?
If so, it's just the way you're doing your date manipulation.
Also, why convert from a string to a datetype and back for the datestring?  Are you trying to correct a timezone issue?
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".
SWC Unified Communications
This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Similar Messages

  • How to get the online user  who are browse some view?

    i want to get the current users who are browsing some view in EP6.additonal:which is developed as web dynpro project.

    Hi,
    Per my knowledge, we cannot get the SharePoint user context available in custom federated search connector with other methods.
    Here is a similar thread for your reference:
    https://answers.atlassian.com/questions/263735/atlassian-sharepoint-connector-federated-search-authentication-and-authorization
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Steps to deploy Lync for users who own Office 365 E1/E2 licenses, but don't have Office 365 E3, using Office Deployment tool.

    After many hours of debugging with Microsoft support the system to install the Lync Client silently can be done with a SINGLE LINE command.  The steps to take are below. It should be an easy next step to put this as GPO installation since
    it is a simple command.
    Comments appreciated. 
    side question: Why is there no Lync 2013 or Lync Office 365 forum?
    Basic steps to deploy Lync for users who own Office 365 E2 licenses, but don’t have Office 365 E3, using Office Deployment tool.
    This also applies for other Office 365 service types where the full office suite download is not included.  In April 2015 This was impossible to find online and not know by the Lync support team.
    Steps are:
    Download the Office deployment tool from
    http://www.microsoft.com/en-in/download/details.aspx?id=36778 and extract it to a folder. For this
    example we will use the \\server\sharename
    location.
    Extracting it creates a setup.exe file and it show a sample XML file.
    2. Create XML file and give it a name such as LyncEntryRetail.xml
    Note: The key is the productID that has to be the “LyncEntryRetail”. Other product IDs will download a version that needs another office 365 license. The productID “LyncRetail” needs an E3 license of Office 365.
    <Configuration>
      <Add SourcePath="\\server\sharename" OfficeClientEdition="32" >
        <Product ID="LyncEntryRetail">
          <Language ID="en-us" />
        </Product>
      </Add> 
    </Configuration>
    3. From the folder where you extracted the Office deployment tool, run the following command on the command prompt to download the source files and store them on the shared drive:
     (on single line)
    Setup.exe /download LyncEntryRetail.xml  
    (This is the name of the XML file created above)
    One can also run the same on a server share by using UNC path names such as  (on single line)
    \\servername\sharename\Setup.exe /download
    \\servername\sharename\LyncEntryRetail.xml  
    (This is the name of the XML file created above)
    4. Run the following command on the command prompt on a machine where you want to install the software: (on single line)
    \\servername\sharename\Setup.exe /configure
    \\servername\sharename\LyncEntryRetail.xml  
    (This is the name of the XML file created above)
    Once you are comfortable that it all works, you may want to edit the XML file if you want to have silent installation and add the following lines.
      <Display Level="None" AcceptEULA="TRUE" /> 
      <Property Name="AUTOACTIVATE" Value="1" /> 
    Regards
    Bart
    Bart Louwagie

    Hi Chudly,
    For the office365 issue, I also recommend you can post in dedicated forum for more efficient support:
    http://community.office365.com/en-us/f/166.aspx
    If you want to modify the powershell script, please post the current script and the issue, we will notice and continue to follow up.
    If there is anything else regarding this issue, please feel free to post back.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Message tracking log of internal users who are all sent the mails to external domain

    Hi ,
    How can i get the message tracking log from internal users to external users?
    We need the report of internal users who are all sent the mails to the external domain
    Regards,
    Sankar M
    Sankar M http://messagingdevelopment.blogspot.in/

    Sankar, your outbound send connector has an address space of *. So when you run "Get-SendConnector", you will see something like the following:
    Identity                                AddressSpaces                          
    Enabled
    Unix System Connection                  {SMTP:*.domfreebusy.contractor.hunti... True
    Outgoing SMTP Connector                
    {SMTP:*;10}                             True
    Mailbox Journaling Connector            {SMTP:pdwastap01.huntington.com;1}      True
    The middle one with the {SMTP:*;10} in my case (you may have a different number than 10 in yours) is my outbound connector. So yours will show an address space of {SMTP:*;<some number, 10 is the default>}. HTH ...

  • Adobe acrobat 8 install affects all users who are opening PDF files

    I am trying to understand how "Installing Adobe Acrobat on Citrix server" can affect users who are opening PDF files? Users who are trying to open PDF files are having problems opening it after I installed Adobe Acrobat 8.
    I appreciate your advice.
    Citrix Xenapp 4.5
    WYSE clients accessing PDF files on our intranet
    Installed Adobe Acrobat 8

    I have not restarted the Citrix server. I installed it and executed the application and published it.
    If restarting resolves it then it is good.
    After I installed Adobe Acrobat 8 last night, this morning users who were accessing PDF files from our intranet are not able to access it I am trying to understand what kind of error that they are getting. So, far 2 users have complained that they are not able to open the PDF files.
    One user's comment was this
    I can't edit an application in Power Site Pro through Mortgagebot.  Mortgagebot tech support told me it has to do with Adobe Flash Player.
    Appreciate your reply.
    thanks
    Ifs

  • Deactivate users who are no longer exist in AD but were added into resource pool

    Hello forum members,
    does anyone know how to deactivate users who are no longer exist in AD , but were added into resource pool?
    I an trying to write some code that would update a custom value for each resource, but my code breaks whenever it encounters a resource that is not longer exists in AD. Any suggestions are appreciated.
      // Modify the resources, code was taken from http://msdn.microsoft.com/en-us/library/websvcresource.resource.updateresources(v=office.12).ASPX
                    foreach (SvcResource.ResourceDataSet.ResourcesRow resourceRow in resourceDs.Resources)
                        Console.WriteLine("Check out " + resourceRow.RES_NAME);
                        if (resourceRow.IsRES_CHECKOUTBYNull())
                            resourceSvc.CheckOutResources(new Guid[] { resourceRow.RES_UID });
                            checkedOut = true;
                        else
                            if (resourceRow.RES_CHECKOUTBY == me)
                                checkedOut = true;
                            else
                                checkedOut = false;
                                Console.WriteLine("\tCan't check out this resource, skip updating this one.");
                        if (checkedOut)
                            SvcResource.ResourceDataSet updateDs = resourceSvc.ReadResource(resourceRow.RES_UID);
                                if (resourceRow.RES_TYPE <= (int)PSLibrary.Resource.Type.INACTIVATED_OFFSET)
                                    updateDs.Resources[0].RES_CODE = "A" + rand.Next(1000, 9999);
                                    Console.WriteLine("Update RES_CODE to " + updateDs.Resources[0].RES_CODE);
                                    resourceSvc.UpdateResources(updateDs, false, false);
                                    Console.WriteLine("Check in " + resourceRow.RES_NAME);
                                    resourceSvc.CheckInResources(new Guid[] { resourceRow.RES_UID }, false);
                        Console.ForegroundColor = ConsoleColor.Yellow;
                        Console.WriteLine("".PadRight(30, '-'));
                        Console.ResetColor();
    tatiana

    This is the logic I used:
    1) Try to inactivate the user
    2) If it fails with "AdminNTAccountNotFound" then delete
    try {
    using( OperationContextScope ocs = new OperationContextScope( resourceClient.InnerChannel ) ) {
    resourceClient.CheckOutResources( new Guid[] { resourceUID } );
    // Perform the update
    rsDS = ( SvcResource.ResourceDataSet ) rsDS.GetChanges();
    resourceClient.UpdateResources( rsDS, false, true );
    catch( Exception ex ) {
    if( ex.Message.Contains( "AdminNTAccountNotFound" ) ) {
    try {
    resourceClient.CheckInResources( new Guid[] { resourceUID }, true );
    catch {
    //The resource does not have a valid account, deleting...
    using( OperationContextScope ocs = new OperationContextScope( resourceClient.InnerChannel ) ) {
    resourceClient.CheckOutResources( new Guid[] { resourceUID } );
    resourceClient.DeleteResources( new Guid[] { resourceUID }, "No longer in RBS structure and/or AD" );
    120811049008

  • How to list of Users who are using Crystal XI application?

    Hi all,
    Thanks for your support provided so far.
    I need to get the list of users who are all using the Crystal XI application. I tried to get this info from the Business Objects Enterprise Applications in CMC but it was not there. Where can I find this information?
    kindly help me.
    Thanks,
    Bhuvan R

    There is not such a portlet available out of the box...
    Have you looked at the code share section?
    If you want to develop yourself, I don't think this is achievable using the IDK (remote interface)
    But It is definitely possible to create such a portlet using the server API (drawback: the portlet has to live where a portal component is installed - WS, automation or Portal)

  • Retrieve users who are not added to any group in site permissions page

    Hi,
    In the OOB (Site Permissions) "user.aspx" page, I have some users who are directly added to the site and not part of any OOB or custom group.
    Is it possible to retrieve only those users who are directly added to site permissions page programmatically  ( Using C# ) ?
    Thanks

    Hi,
    You can use the
    SPWeb.Users property which “Gets the collection of user objects that are explicitly assigned permissions in the website”.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • How to get list of users who reset password using FIM portal

    How to get list of users who reset password using FIM portal
    -Thanks Rakesh Sawant

    Hi Rakesh,
    I think you are looking for something like this:
    Using Powershell to list all users that had completed
    a password reset within the last 30 days
    If you found my post helpful, please give it a Helpful vote. If it answered your question, remember to mark it as an Answer.

  • How to skip approving steps for users who are also approvers?

    We have a business need to be able to skip the approving steps for the users who are also approvers.
    For this following steps were followed :-
    1) Open .task file and go into the Assignment tab. Double click on the performer box within the routing slip, this should open the "Edit Participant Type" editor. Expand the "Advanced" section and place a check next to "specify skip rule", then click the edit icon to the right. Now enter an XPath expression that will test whether the current user is equal to the task creator.
    2) We used - isUserInRole XPath function in the "Identify Service Functions" dropdown - first param to function is the userID, the 2nd is the role name.
    We tried with hardcoded userID as well as by using
    ids:isUserInRole(/task:task/task:systemAttributes/task:updatedBy/task:id,'California')
    where 'California' is the group name (as one of the forum threads told this function works with groups).
    We also tried with swimlane roles(using bpm.getPerformer() function) but it does not work either.
    Please let me know if any one has any solution to this problem.

    session as DirectorySession = DirectorySession.currentEngineSession
    dirHum as Fuego.Fdi.DirHumanParticipant = DirHumanParticipant.fetch(session : session, id : "myUserId")
    result = hasRoleAssigned(dirHum, role : "Approver")Give that a try...
    HTH,
    -Kevin

  • Using imessenger is it free to chat with iphone users who are in another country?

    Using imessenger is it free to chat with iphone users who are in another country?

    my understanding is yes because it worked with ipod touches via your Apple ID and there is no payment process agreement when setting up iMessage.

  • How to keep track of the users who are all currently logged in

    Hi All,
    I have basic knowledge of Session and Servlets. I am wondering how to keep track of the users who are all currently logged in. There should be some way of achieving it.
    I thought of it and come up with having an Application variable that hold it when ever a user successfully logged in.
    Thanks in advance for any reply.

    You can do this by keeping data in a static veriable in a some class of yours. The variable will need to be a collection.
    Whenever a user loogs in to the site a servlet/jsp should put the users information in to the collection and when logs off or when the session expires the entry should be take off.
    You can achive this by storing the velues in a some sort of a week collection where the entries are automaticaly removed when all the other refferences to the entry goes out of scope.
    You might need to read bit about java.lang.ref package and WeekReference
    Or you can make the entry in the collection contain the last time that the user visited any of the pages and a thread can run time to time and clean up the older entries which have timed out

  • IAC 3.1.1 users who are member of more than one OrgUnit are not able to order services?

    Hi,
    Power Down, Power Cycle, Take Snapshot and Decommission services are not working for users who are member of more than one organization!!
    Error Message:
    The service form could not be submitted because of following error: [newscale][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value '1,2' to data type int.
    Thanks,
    Maz

    Hi,
    Power Down, Power Cycle, Take Snapshot and Decommission services are not working for users who are member of more than one organization!!
    Error Message:
    The service form could not be submitted because of following error: [newscale][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value '1,2' to data type int.
    Thanks,
    Maz

  • I had to replace the hard drive on my computer.  I am now trying to download Adobe Photoshop CS6, previously purchased.  I get an error that files are missing after waiting for the whole download.  I have Windows7

    I had to replace the hard drive on my computer.  I am now trying to download Adobe Photoshop CS6, previously purchased.  I get an error that files are missing after waiting for the whole download.  I have Windows7

    The error msg said that the file archive part of Adobe photoshop CS6 is missing and that I need all parts in the same folder.

  • Can it be possible to disable outlook anywhere for some few users who are working from home ?

    One of my customer wants to disable outlook anywhere for some of the users who are working from home.They have exchange server 2013 in their premises and also have outlook 2010/2013 on their clients machine.Please advice?

    Hi,
    In Exchange 2013, all Outlook connectivity (Internal and External) are using Outlook Anywhere anyways. It is not recommended to use the following command to disable Outlook Anywhere for a specific user:
    Set-CASMailbox UserA -MAPIBlockOutlookRpcHttp $True
    If you disable it, the UserA would not be able to access the mailbox from both Internal Outlook client (Office) and external Outlook client (Home).
    For your requirement about disable Outlook anywhere for some few users instead of all external users, there seems to be no method to achieve it directly in Exchange server. Sorry for any inconvenience.
    Regards,
    Winnie Liang
    TechNet Community Support

Maybe you are looking for

  • Password self-service errors -  Password can be changed only once in a day

    Hi experts, We've been using password resets without issues for several months. Recently we upgraded from version 5.3 SP12 to SP14. I've read the CUP release note that explains that how password resets now validates against the ABAP system parameter

  • SELECT...INTO, or similar, is it possible?

    In Oracle Reports 10g I have a repeating frame to display the results of a query. Within that frame I would like to create a graph populated by a new query which uses a value from the parent query. Does Oracle Reports support anything similar to a SE

  • Create a Production order for rework

    Hi, I would like to create a Production order for rework. But I don't want to do it in the master PO with trigger point. I would like to create a new PO for rework and asign to account to the old or master PO. I've tried to do it but I want to know i

  • Iphone 4s stolen. not registered with my apple id anymore?

    my iphone was stolen two days ago. and i can't find it anymore in my apple id profile. i wanted to register it again but it failed. it says that this device is connected to another apple id.

  • Pages are blank in next seesion

    I paste and edit text. I save and quit In Design. I open In Design. The relevant pages are blank. Where do I start troubleshooting?