Thursday, July 4, 2013

PowerShell Select-Object -ExpandProperty

If a field while using PowerShell ends with a “…}” indicating that more data is present, the cmdlet Select-Object –ExpandProperty can be used to return the entire data set.

How to disable SMB version 1 within Windows Server 2012

Windows Server 2012 introduced a new version of the Server Message Block (SMB) protocol.  SMB version 3 includes new features such as encryption.  If your environment does not have any Windows XP or earlier clients, an option is available to disable SMB version 1 to improve security.  The PowerShell cmdlet Get-SmbServerConfiguration will offer information on the current status of SMB version 1 and 2.

2012_powershell_smb1_1

To disable SMB version 1, use the PowerShell command of Set-SmbServerConfiguration –EnableSMB1Protocol $false

2012_powershell_smb1_2

Fail2ban

Fail2ban scans log files and blocked IP addresses that show malicious signs by normally updating firewall rules.  Fail2ban includes filters for various services such as Apache and SSH.

http://www.fail2ban.org/

Swish

Swish is a secure FTP client for Windows.

http://www.swish-sftp.org/

Obtain a list of installed applications using PowerShell

Use the following command to obtain a list of installed applications using PowerShell.

Get-WmiObject -Class Win32_Product | Select-Object -Property Name