Jump to content

Search the Community

Showing results for tags 'password'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • autoexec.gr
  • Events
  • Γενικά

Forums

  • Γενικά
    • Τα πρωτοσέλιδα
    • Café
    • Λοιπά Θέματα
    • Ειδήσεις & Εκδηλώσεις
  • Προϊόντα
    • Εργαλεία και συμβουλές
    • Microsoft Office
    • Windows
    • Windows Server
    • Microsoft SQL Server
    • Exchange Server
    • SharePoint Server
    • Microsoft Hyper-V
    • Microsoft Azure
    • PowerShell
  • Τεχνολογία
    • Cloud
    • Virtualization
    • Management & Automation
  • Εκπαίδευση & Πιστοποίηση
    • Εκπαίδευση
    • Πιστοποίηση
  • Αγγελίες
    • Προσφορά Εργασίας
    • Αγοραπωλησίες
  • Archives
    • Γενικά
    • Εργαλεία και συμβουλές
    • Hardware
    • OS
    • Servers
    • Netwok & Security
    • Magazino

Blogs

  • Το προσωπικό σου blog
  • Bits & Bytes
  • Το Ελληνικό Exchange Blog
  • Ioannis Alexopoulos -- IT Blog
  • Εξομολογήσεις ενός διαχειριστή
  • Για την αντι-γραφή
  • spanougakis.com
  • Project Management: Art or Science? Profession or Competence?
  • BlackTrack
  • Hyper-Vangelis
  • Frees Point
  • Klag Rulez
  • Heimaros
  • Info Overflow
  • The dark side
  • Greek Active Directory Blog
  • The Greek Windows PKI blog
  • Greek Geek Girls "3G"
  • Tips, Tricks and Recipes for IT Pros
  • There is nothing like 127.0.0.1
  • kpsalida's Blog
  • απλά...το βλογ μου
  • Θέλω να γίνω τσομπάνης!
  • Holy IT
  • Admin
  • Catastrophic Failure
  • Rocking with Knowledge of SQL Server
  • Apple Macintosh in the Enteprise
  • Firewall In A Nutshell
  • The Infrastructurer
  • Smart Office
  • Το άδειο σεντούκι
  • iThalis
  • Παιδιά! Έχουμε mail ?
  • SBS & όχι μόνο , Ioannis Zontos
  • Paradigm Shift
  • Αη-Τι (ο άγιος Τι)
  • The TroubleShooter
  • George Markou's Blog
  • fmarkos' Blog
  • dead:beef::1
  • Vaggelis' Blog
  • Apostolidis Cloud Corner
  • Who Is General Dentist?
  • Self-loading Mixers In Different Cities In Indonesia

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Occupation

Found 1 result

  1. Και ένα μικρό Script για να ειδοποιούνται οι χρήστες πως οι κωδικοί τους θα λήξουν σε X μέρες <# Script to notify users of password change #> #Variables----------------------------------------------------------### #What date is it? $Today=Get-date #How many days before should we notify the user? $Days=50 #Specify a From address $From="[email protected]" #Specify a subject for the message! $Subject="Your account will expire soon! Action Required" #Specify the SMTP Server ! $SMTPServer="10.0.0.1" #-------------------------------------------------------------------### #Start!-------------------------------------------------------------### #Find all users that will need a password change within the specified days, We are searching for all Enabled accounts , with Password never expires option not set and not containing a $ sign (Domains with trust accounts,GMSA accounts ...etc, we do not need those) $Expiring=Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False -and Name -notlike "*$*"} –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed" ,"PasswordExpired" , "Mail","UserPrinciPalName" #Loop through each account foreach ($Account in $Expiring) { #And get its expiring date, convert it to a more readable format as msDS-UserPasswordExpiryTimeComputed is a calculated field and it is a mess $ExpiringDate=[datetime]::FromFileTime($Password."msDS-UserPasswordExpiryTimeComputed") #If you do find an account that has not expired and the remaining days are less than the days specified if ($Account.PasswordExpired -eq $false -and ($ExpiringDate - $Today).Days -lt $Days ) { #Start the notification process #Get the actual UPN in the domain as this may differ from the users email $AccountUPN=$Account.UserPrinciPalName #Calculate the days left $DaysLeft=($ExpiringDate-$Today).Days #Inform the user Send-MailMessage -SmtpServer $SMTPServer -From $From -To $Account.Mail -Subject $Subject -Body "Your AD Password for account $AccountUPN will expire in $DaysLeft days! Please change it." } }
×
×
  • Create New...