• Reboot resets Desktop Win 10 -

    Solved IT Discussion
    13
    0 Votes
    13 Posts
    913 Views
    gjacobseG

    @WrCombs said in Reboot resets Desktop Win 10 -:

    So found out the user is actually corrupt, this is the 4th time this has happened according to the internal IT team, and they're looking to get the PC replaced

    It’s always best to replace a corrupt user. The can leave so much of a mess.

  • 2 Votes
    13 Posts
    2k Views
    dbeatoD

    Another example taken from another script:

    import-module activedirectory $domain = "domain.mydom.com" $DaysInactive = 90 $time = (Get-Date).Adddays(-($DaysInactive)) # Get all AD computers with lastLogonTimestamp less than our time Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -Properties LastLogonTimeStamp | # Output hostname and lastLogonTimestamp into CSV select-object Name,@{Name="Stamp"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp)}} | export-csv OLD_Computer.csv -notypeinformation