How to get a list of Local Users who has not logged in for 3 months or around 90 days

hi
i found this thread to pull out a list of local users
Retrieve all local user accounts information on remote computers (PowerShell)
however, i need to filter out users who has not logged in for 3 months or around 90 days, how can i do further filtering?
i understand dsquery has an -inactive <xweeks> , however i am doing it for local accounts

$ErrorActionPreference = "silentlycontinue"
$([ADSI]"WinNT://$env:COMPUTERNAME").Children | where {$_.SchemaClassName -eq 'user' -and $_.lastLogin -gt (Get-Date).AddDays(-90)} | ft name,lastlogin
using the sample from the link extendend with the 90 days criteria, the erroraction preference surpresses the errors you get for accounts with no lastlogon value (guest being a typical one)

Similar Messages

  • Building a Basic Runbook to disable a Active Directory User who has not logged in for 90 days.

    I am new to Orchestrator.  I am using Orchestrator 2012 R2 on a Hyper-V running Server 2008.  I have been trying to set up a Runbook to sweep AD for user accounts that have not logged in for 90 days and have those accounts automatically disabled
    and moved to another OU.  However, I would be happy just to have the account just be disabled.  If you need any more info or I have posted in the wrong forum, please let me know.  
    Thanks

    Hi,
    there is no SCO Activity to do this.
    Problem with this is, the LastLogedOn Times are not synced between DomainControllers.
    Best will be you take a look at this PowerShell Script
    http://gallery.technet.microsoft.com/scriptcenter/Get-Active-Directory-User-bbcdd771
    and change it to your needs
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • COREid Federation Error: A local user session could not be created for the

    Hi,
    I installed two instances of COREid Federation in my machine. Also installed SiteMinder and LDAP. Source Domain of COREid (8101) uses LDAP as IdMBridge and Destination Domain (9101) uses SiteMinder as IdMBridge. I am trying to access the resource protected by the SiteMinder from the source domain using the URL which is constructed using the pattern given in the PDF:
    http://mymachine.domain.com:8101/shareid/saml/ObSAMLTransferService?DOMAIN=DestinationDomain&method=POST&TARGET=http://mymachine.domain.com:8887/Source/Source.html
    Assertions are generated and I can see the assertion in the Source domain and transferred to the Destination Domain.
    I get the following error in the Destination Domain Shareid Log file:
    ERROR - [http10113-Processor3] - RECEIVER: ERROR: A local user session could not be created for the assertion
    Please help me to solve this issue?
    Note: The Web agent runs on the web server instance 8887.
    SiteMinder is able to protect the resource when accessed.

    Typically that error occurs when the destinations access management system can't find the user based on the SAML attribute. Check to make sure that the attribute that you are matching on matches exactly.

  • SHAREid - A local user session could not be created for the assertion

    Problem: We have a client trying to federate to our environment using POST profile but we are getting the following error, "RECEIVER: ERROR: A local user session could not be created for the assertion".
    I verified that the user exist in the directory and I am able to execute a test successfully as that user.
    Thanks.

    There is a requirement that the client needs to send an attribute called "traveler" in the assertion. We found out that the problem occurs only when client sends a attribute in the assertion. When the assertion does not include the attribute, there is no issue. Not sure why that is the case as we have other clients sending the same attribute in the assertion.
    Here is the AttributeStatement.
    <saml:AttributeStatement xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><saml:Subject><saml:NameIdentifier Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">XXXXXX</saml:NameIdentifier></saml:Subject><saml:Attribute AttributeName="XXXID" AttributeNamespace="http://schemas.xmlsoap.org/claims"><saml:AttributeValue>XXXXX</saml:AttributeValue></saml:Attribute></saml:AttributeStatement>
    It does not have <saml:SubjectConfirmation> and <ConfirmationMethod> element. Can that be a problem?
    Thanks,
    Vinay
    Edited by: user504421 on Jul 9, 2009 2:17 PM

  • Iphone 5C will not sent iMessage to another Iphone user who has not installed ios7

    I have found that if I am trying to send an imessage to another Iphone user who has not upgraded to ios7, the messages will appear in my history as "sending". I deleted that contact history and tried to send another text and it worked as it was sending as a "green message" rather than a "blue message".  Is there a way to work around this?

    Thanks for the answer.  Disabling iMessage does work, but it's a bit clunky to have to do that every time I want to message him.  Many of my other contacts have iPhones and I like the iMessage feature.
    He's had the same number for years and I only recently have had this issue, he doesn't have iMessage on any device, he only has an iPod nano.  I wonder what happened that all of a sudden it has defaulted to iMessage for him.
    Any other ideas?

  • How to get the list of IDM users in a workflow.

    Hi,
    I wanted to get the list of IDM users in a workflow into a list.Now I tried to use getObjects Method,I do not have the display session here,I passed the workflow context or WF_Context.But it is giving exception like context null .
    I used the same method in a form and it worked.How can I get the list of users in a workflow.It is for customizing reports.
    Thanks and Regards,
    Pandu
    Any Idea on how to customize reports including attributes from resources and auditing attributes etc.Any help would be really great.
    Thank you.

    Hi John,
    I get this exception WorkItemForm: no id.
    This comes when I click on the other column.I generate the data needed in a report and display it as a sorting table when I get the data.
    I want to give the user ability to sort data by different columns.But when I click any column I get the exception
    WorkItemForm: no id
    How can I save a workitem on a manual form before invoking it from a manual action.
    Here is the code snippet
    <Field name='tblUsers'>
            <Display class='SortingTable'>
              <Property name='selectEnable' value='false'/>
              <Property name='align' value='left'/>
              <Property name='linkEnable' value='false'/>
              <Property name='sortEnable' value='true'/>
              <Property name='width' value='400'/>
              <Property name='columns'>
                <List>
                  <String>Account id</String>
                  <String>First Name</String>                      
                </List>
              </Property>
            </Display>      
            <FieldLoop for='row' in='_searchList[*]'>
              <Field name='enduserId'>
                <Display class='Label'>
                  <Property name='value'>
                    <block trace='true'>
                      <invoke name='getAccountId'>
                        <ref>row</ref>
                      </invoke>
                    </block>
                  </Property>
                </Display>
              </Field>
              <Field name='lblfirstname'>
                <Display class='Label'>
                  <Property name='value'>
                    <invoke name='getAttribute'>
                      <ref>row</ref>
                      <s>firstname</s>
                    </invoke>
                  </Property>
                </Display>
              </Field>
         <FieldLoop>      I think I may need to save some workItem,That is why this may be giving the error.How can I correct this.
    Thanks,
    pandu

  • How to get the list of actie users in the moss website !!

    Hello Everybody,
    I need to get the list of active users with access in the moss websites like following format.
    User name         User mailid       permission
    one of the project manager requested to find list of active users with user accesses in the moss website.
    he wants to modify the user permissions.
    Kindly suggest me how to get the users with permissions.
    Thanks.

    Hi,
    I have developed that code to retrieve the users, groups and permissions
    if (orole.Member.PrincipalType.ToString() == "SharePointGroup")
    lvigroup = new ListViewItem();
    lvigroup.Text = orole.Member.LoginName;
    // args.GroupsList.Items.Add(lvigroup);
    DoUpdate1(lvigroup);
    Group group = clientContext.Web.SiteGroups.GetById(orole.Member.Id);
    UserCollection collUser = group.Users;
    clientContext.Load(collUser);
    clientContext.ExecuteQuery();
    foreach (User oUser in collUser)
    lvigroup = new ListViewItem();
    lvigroup.Text = "";
    lvsigroup = new ListViewItem.ListViewSubItem();
    lvsigroup.Text = oUser.LoginName;
    lvigroup.SubItems.Add(lvsigroup);
    //args.GroupsList.Items.Add(lvigroup);
    DoUpdate1(lvigroup);
    // MessageBox.Show(oUser.LoginName);
    RoleDefinitionBindingCollection roleDefsbindings = null;
    roleDefsbindings = orole.RoleDefinitionBindings;
    clientContext.Load(roleDefsbindings);
    clientContext.ExecuteQuery();
    //permission level
    lvsi = new ListViewItem.ListViewSubItem();
    string permissionsstr = string.Empty;
    for (int i = 0; i < roleDefsbindings.Count; i++)
    if (i == roleDefsbindings.Count - 1)
    permissionsstr = permissionsstr += roleDefsbindings[i].Name;
    else
    permissionsstr = permissionsstr += roleDefsbindings[i].Name + ", ";
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation

  • How to get the list of all users

    Hi,
    Is there a way in Grid Control for getting the list of all users on all target databases? I need to count how many Oracle db users in our company.
    Thanks a lot.

    One way to do it might be...
    Assuming you have preferred credentials set up for all of your databases, you could run a 'select username from dba_users or all_users;' against all of your databases through grid control.
    Click on Targets tab, click Databases, then the 'Execute SQL' link at the bottom of the page. Click 'Add' and 'Select All'. Then run it. It's just running the same sql across all of your databases and the output will be at the bottom for all of them.

  • How to disable via Group Policy - "Any user who has a password doesn't need to enter it when waking this PC"

    The setting can be found in the following location:
    From the “Charm” bar, Settings>Change PC Settings>Users>Sign-in Options> click the “Change” button next to “Any user who has a password must enter it when waking this PC”.
    I am looking to disable this option via Group Policy on our domain, but am unable to find a default policy related to this setting.  I am searching Group Policy on a Server 2012 machine, and in local Group Policy in Windows 8, but have found nothing. 
    Hoping I'm just missing the location of this and someone can point me to the right place.
    Regards,
    -BN

    There is no specific policy for this item. Please set “Require a password on wakeup” policy instead.
    Niki Han
    TechNet Community Support
    I'm using Windows Server 2012 R2, and I can't find the above quoted policy, and don't know where to anymore where to look. I searched for "Require a password when the computer wakes up", but it took me to the "Define Power Buttons and Turn On
    Password Protection" page of System Settings, but there's NOTHING there except the "When I press the power button".  I really want to stop having to enter a password every time I wake up the monitor screen.
    Capt. Dinosaur

  • Instant Messaging: How to get a list of online users?

    Hi,
    Is there any way to get presence information of any users? I don't want to subscribe to all users presence. In the documentation I found that presence information is public in default. Using the Shell example client I got null for 'fp uid', it works on users in my contact list.
    I tried an other way using com.sun.im.provider.* interfaces but sample programs doesn't works well on server.
    Regards,
    Szocskekutya

    SzocskeKutya wrote:
    Is there any way to get presence information of any users? I don't want to subscribe to all users presence.There is no way to get presence information without subscribing.
    I've created a new enhancement request to add this functionality in a future release:
    RFE#6966768 - "Provide utility to list active user connections and presence information"
    If this is essential functionality for your deployment then you need to escalate this RFE with your Sun/Oracle account manager so the feature can be prioritised as appropriate.
    Regards,
    Shane.

  • How to get a list of current users and their transactions code?

    SM04 and AL08 give the list, but its not comprehensive.  in sm04, we have to click the username and select sessions and then a
    new popup comes giving all transactions for the user. 
    I want a list such that each and every transaction corresponding to the user is listed at same time.

    Hi,
    Use the FM TH_LONG_USR_INFO.
    Just give parameter user as * (it means all users, other wise current user)
    It will give ALL transactions for ALL users.
    Regards,
    Amit Mittal.
    Edited by: Amit Mittal on Dec 30, 2009 1:00 PM
    Edited by: Amit Mittal on Dec 30, 2009 1:03 PM

  • How to get a list of online users?

    hi,
    I don't what to do,every user has a session,
    so if I can check every session to see if the user is online?

    Since you cannot access other sessions besides the current one, you will need to store the current users somewhere other than the session. Here is an option.
    public class User implements HttpSessionBindingListener
       private String userid ;
       private MyServlet servlet ;
       public User(Stirng userid, MyServlet servlet)
            this.userid = userid;
            this.servlet = servlet ;
       //assume standard accessor methods.
       public void valueBound(HttpSessionBindingEvent ev)
         getServlet().currentUsers.addElement( getUserID() );
       public void valueUnBound(HttpSessionBindingEvent ev)
         for(int i = 0; i < getServlet().currentUsers.size(); i++)
             if( ((User)getServlet().currentUsers.elementAti)).getUserID().equals( getUserID() ) )
                  getServlet().currentUsers.remove(i);
                  break ;
    public class MyServlet extends HttpServlet
        public Vector currentUsers ;
    }Then, you can access the servlets currentUsers vector for a list of current users. Readup on HttpSessions and the HttpSessionBindingListener classes.
    You will put the person's information in a Bean and then store it in the session when they logon/return/etc. The Listener handles the rest.

  • How to: Get a list of mail users by using the Exchange Management Shell

    Hello every one, quick question: When I run this code below for VB, how will I see the results of the program? Is there anyway I can make the results appear in a message box?
    Function GetUsersUsingBasicAuth( _
        ByVal LiveIDConnectionUri
    As String, ByVal ScehmaUri
    As String, _
        ByVal Credentials
    As PSCredential, ByVal
    Count As Integer)
    As Collection(Of PSObject)
        Dim ConnectionInfo
    As WSManConnectionInfo = _
            New WSManConnectionInfo(New Uri(LiveIDConnectionUri), ScehmaUri, Credentials)
        ConnectionInfo.AuthenticationMechanism = AuthenticationMechanism.Basic
        Dim RemoteRunspace
    As Runspace
        RemoteRunspace = RunspaceFactory.CreateRunspace(ConnectionInfo)
        Return GetUserInformation(Count, RemoteRunspace)
      End Function
    Function GetUserInformation(ByVal
    Count As
    Integer, ByVal RemoteRunspace
    As Runspace) As Collection(Of PSObject)
        Dim RemotePowerShell
    As PowerShell = PowerShell.Create
        RemotePowerShell.AddCommand("Get-Users")
        RemotePowerShell.AddParameter("ResultSize",
    Count)
        ' Open the remote runspace on the server.
        RemoteRunspace.Open()
        ' Associate the runspace with the Exchange Management Shell.
        RemotePowerShell.Runspace = RemoteRunspace
        ' Invoke the Exchange Management Shell to run the command.
        Return RemotePowerShell.Invoke
    End Function

    All you need to do is enumerate through the Collection returned eg
    Dim commandResults As Collection(Of PSObject)
    commandResults = RemotePowerShell.Invoke()
    For Each obj As PSObject In commandResults
    MessageBox.Show(obj.Properties("DisplayName").Value.ToString())
    Next
    Cheers
    Glen

  • How to get the list of parameter and set them using RESTFul WS for a Crystal Report

    Hi All,
    I am able to schedule a Crystal report using following POST Restful call - http://localhost:6405/biprws/infostore/4738/scheduleForms/now and with a request xml body. But report is failing because I am not passing the parameter.
    But I need pass parameters/prompts to the Crystal report to execute successfully.
    What is the request XML to pass the parameter  for the report?
    I was able to do this for WEBI reports but I am not able to find any way to do this for Crystal reports?
    Any help on this matter is really appreciated.

    Hi Venki
    Please have a look at:
    How to pass parameters and generate the report using RESTful API in VB.net
    This is also described in the Developer Help files:
    http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41_webi_restful_ws_en.pdf
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Getting a list of numbers of who i called in the last month

    i am trying to find this number ...my phone erased it and i thought i would be able to see who i called on my monthly statement..wrong. .any solutions to this ..i need that number

    Your bill should list any Verizon long distance calls and charges. I assume it is a local number you are looking for. If you have on- line access, go to "My Verizon", "My Bill". On the my bill page , you should see an option called, "custom reports". When you bring up the custom reports page, you will see a list of places you called. Click on the town/city and you will see a list of the telephone numbers you called. This works in my state, hope it helps you.

Maybe you are looking for

  • Changing the size of a drop down list

    Hi Everyone, Is there anyway to change the size of a drop down list?  For example, our customer would like to make the drop down list for the Ship-To field on the logistics tab of the sales orders longer.  Currently, they cannot see the full name whe

  • Just installed Firefox V8; there's supposed to be a bookmarks button but I don't have one!

    I have the forward/back arrows, the URL box, a Google search box, the Adblock plus button and the home button. And nothing more...Where is the advertised Bookmarks button? Or how can I create it myself?

  • Combo box check

    How can I, by God's shake, check if a combo box has any value selected? I tried with If XXXX.Selected.Value = "" Then... but it doesn't work. Thanks

  • Audio and Licensing Problems

       I recorded a clip 1 hr and 50 min long using Sony PMW-EX1 in SD to On Location, exported the file in m2t format to external hard drive, then imported to Pre Pro CS3 on my editing computer.  I loaded the clip into time line to begin editing and the

  • JCA for JDE-XE - Looking for more inbound and outbound service examples

    Where can I find more examples using JCA for JDE-XE inbound and outbound service / events. Edited by: Channu on Sep 23, 2011 1:37 AM Edited by: Channu on Sep 23, 2011 1:37 AM