Query Active directory form SQL server

A couple of weeks ago we had the needed to get some users data and our best option was querying directly to Active directory from an SQL server, this could be the best option in some cases, taking in mind that a healthy AD with a good maintainment is allways our best shot. Microsoft Active

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

Javascript – Play with strings and arrays

Last weekend I was playing with strings in Javascript and I made different exercises with them, so this is a good moment to write a remember post with this simple commands. Exercise 1: Discard first n characters of a string, in this case 3 [crayon-5c9125245c9ee820146384/] Exercise 2: Get the string until certain character, in this

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