Category: General

Get Active Directory users expiration date

If you need to know when your users passwords will expire in AD, you can execute this commands in Powershell, this will response with all the accounts and dates. Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties “DisplayName”, “msDS-UserPasswordExpiryTimeComputed” | Select-Object -Property “Displayname”,@{Name=”ExpiryDate”;Expression={[datetime]::FromFileTime($_.”msDS-UserPasswordExpiryTimeComputed”)}} Output example: Displayname ExpiryDate ———– ———- John Doe 15/10/2018 18:45:29

Change Windows network IP address using console

The’s a way to change network configuration using Windows console, with this option you can set a new IP addess or switch bettwen static and dhcp,  Another interesting point of this is that you can do the same remotely using PsExec , I wrote a post time ago axplanating how it works, you can found just

Export certificate with private key when it’s not exportable

Sometimes computer replacement could became a headache, especially if the old one have a certificate with not exportable key and we don’t have a copy of the original file (Who are going to need this?). This kind of certificates normally are important and difficult to obtain, for this reason maybe you want to avoid a

Connect to remote console and execute commands with privileges

Since Windows 7, accessing to remote console using Telnet is not an option, nodaway Microsoft has provide us another tool for this tasks, PsExec https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx This tools give us the ability for connect to a remote console with privileges and execute commands or scripts. It give’s us many options, in this reminder i’ll expose only how