Category: Tecnologia

Powershell Scripting – Automatic upload files to remote FTP

Yesterday we had a needed, we needed to transfer every n minutes all the xml files located in a folder to a remote ftp location. There’s a lot of ways to do this and some of them include a payment softwares. In our case files were xml created by a SAP server in a Windows Read More

Persistent connection to Windows shared folder using Linux Ubuntu

This is how you can connect to a windows shared folder as persistent using Linux Ubuntu, in this case we will connect to a Windows server using a domain user for connection credentials At first step we must create a now dir in media location, in ths case we will use testfolder

Then we Read More

Python – Check last file date in a folder and notify if there isn’t a new one after n days

This week we had the need of monitoring a folder, specifically we need to know if after “n” days there isn’t any new file. For this reason I programmed a simple python script that sends us an email if this happen. Let’s do the example.

  Thanks for all Read More

Add SQLSRV driver support in EasyPHP Devserver

Recently I had to develop a new project in php, jquery, ajax and javascript which needs a Microsoft SQL database connection. For developing purposes I like to use Easyphp Devserver , an all in one package like WampServer or XAMPP.  I Prefer this one because it seems more lightly and less intrusive for my overweighted system. By Read More

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 Read More

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 Read More

1 2 3 7