Howtos / Articles

Change Exchange Smart Host Port Number

By default, an Exchange server will try and send emails to a smart host using port 25. Unfortunately, there is no option to change the port number within the Exchange Management Console. This howto guide will show you how to change this to a different port number. This will be done using the Exchange Management Shell.…

Read more [...]

Display Total Folder Size with PowerShell and Sort by Size

The PowerShell command below can be used to display a list containing the total size (in MB) of all the files and folders (recursively) in the current directory, and sort them by total size. ls -Force | Add-Member -Force -Passthru -Type ScriptProperty -Name Length -Value {ls $this -Recurse -Force | Measure -Sum Length | Select -Expand Sum } | Sort-Object Length -Descending | Format-Table @{label=”TotalSize (MB)”;expression={[Math]::Truncate($_.Length / 1MB)};width=14}, @{label=”Mode”;expression={$_.Mode};width=8}, Name Sample Output: TotalSize (MB) Mode Name ————– —- —- 26499…

Read more [...]

PowerShell Command to Recursively Delete Thumbs.db

The PowerShell command below can be used to remove thumbs.db files from the current folder, and all sub folders. Make sure you change directory ‘cd’ into the folder you want the command to run from. Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force | Remove-Item -Force You can change the ‘-Include’ parameter to any wildcard you like, such as *.tmp or *.bak for example. Get-ChildItem -Path . -Include *.tmp -Recurse -Name -Force | Remove-Item -Force Remove the ‘Remove-Item’ statement to…

Read more [...]