Skip to main content

Steven Hodson

  • Home
  • Recommended Reading
  • About

Category: Uncategorized

Batch script to reset users home directory permissions

4 April 201818 April 2019 stevenh Leave a comment

1
2
3
@echo off
for /d %%d in (*.*) do icacls %%d /setowner Domain\%%d /t
for /d %%d in (*.*) do icacls %%d /reset /t

PowerShell Script to find LastLogonDate and PasswordLastSet information from Active Directory for list of computers in a text file

11 September 201711 September 2017 stevenh Leave a comment
1
2
3
4
[Array]$OutList = foreach ($computer in Get-Content -Path C:\Temp\InputFile.txt) {
Get-ADComputer -Identity $computer -Property LastLogonDate, PasswordLastSet -ErrorAction SilentlyContinue | select Name, LastLogonDate, PasswordLastSet
}
$OutList | Export-CSV C:\Temp\OutputFile.csv -NoTypeInformation

Recent Posts

  • Client Certificate Renewal for the Azure AD Passthrough Authentication Agent
  • Azure Conditional Access Named Locations IPv6 Support
  • Batch script to reset users home directory permissions
  • PowerShell Script to find LastLogonDate and PasswordLastSet information from Active Directory for list of computers in a text file
  • More than one MediaPool reported for same Media

Recent Comments

    Archives

    • February 2022
    • January 2022
    • April 2018
    • September 2017
    • May 2015
    • October 2014
    • July 2013

    Categories

    • Active Directory
    • Azure
    • Conditional Access
    • Configuration Manager
    • Data Protection Manager
    • Operating System Deployment
    • Uncategorized

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org
    sparkling Theme by Colorlib Powered by WordPress