Category Archives: Hints and Tips

One drive Camera Roll – folder for each month

If you use one drive to backup your photos and videos from your phone you might have noticed it puts all of the files in one folder per year. I find it much easier to put one folder for month, … Continue reading

Posted in Hints and Tips, Powershell, VBS, VBA and other scripting. | Comments Off on One drive Camera Roll – folder for each month

Robocopy Scripts with logging.

Always struggle to remember this so put it here: Point is to create logfile with todays date in the name so we get a new file each day echo on for /F “tokens=1-6 delims=/ ” %%A in (‘date /t’) do … Continue reading

Posted in Hints and Tips, System Administration | Comments Off on Robocopy Scripts with logging.

WordPress not allowing FILE links.

To allow you to use FILE:// Links in a wordpress menu you need to add the protocol to the wp_allowed_protocols function in wp_includes/functions.php function wp_allowed_protocols() { static $protocols = array(); if ( empty( $protocols ) ) { $protocols = array( … Continue reading

Posted in Hints and Tips, Powershell, VBS, VBA and other scripting. | Comments Off on WordPress not allowing FILE links.

Windows 10 and VPN connections.

Update coming but a lot of this has been fixed in windows 10 creator update But the other issue where it tries to use the vpn username for all credentials after connecting isnt fixed. no matter which vpn you choose … Continue reading

Posted in Hints and Tips, System Administration | Comments Off on Windows 10 and VPN connections.

Archiving windows event logs.

If you select the option in windows event logs to archive old event logs it will create files of the format that event viewer can open. An event ID 1105 will be created as the first item in the new … Continue reading

Posted in Hints and Tips, System Administration | Comments Off on Archiving windows event logs.

Backing up SQL Express Databases

A scheduled script such as this which has hard coded the name of the sql command file, set it to run in the folder containing the backups echo %0 starting date /t time /t dir sqlcmd -S localhost\caserver -i “%programfiles%\custom\sql_express_database_name_backup.sql” … Continue reading

Posted in Hints and Tips, System Administration | Comments Off on Backing up SQL Express Databases

get the total number of items in all folders of outlook mailbox store

If you are ever moving large amounts of email around it can be useful to be able to check that there is the correct number of emails in the old and new locations. This code generates a text file that … Continue reading

Posted in Hints and Tips, Powershell, VBS, VBA and other scripting. | Tagged | Comments Off on get the total number of items in all folders of outlook mailbox store

Powershell to export list of email forwards on an Exchange Server

this will list all the forwards that are active for mailboxes. $fwds = get-mailbox | Where-Object { $_.ForwardingAddress -ne $null } | sort Name | select Name, ForwardingAddress # now get the primary smtp adress of each forward address foreach … Continue reading

Posted in Hints and Tips, Powershell, VBS, VBA and other scripting. | Tagged , | Comments Off on Powershell to export list of email forwards on an Exchange Server

Powershell to export list of Exchange Server Mailbox email addresses

this powershell snippet will export all the SMTP email addresses used on a mail server, useful to document and check on them. ; Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} ; Or to get … Continue reading

Posted in Hints and Tips | Tagged , , | Comments Off on Powershell to export list of Exchange Server Mailbox email addresses

ATO Tax calculations in Excel

Some possibly useful excel functions and macros. save this function in a macro enables excel documnet (xlsm) and then you can use the formula =taxpayable(a1) and it will calculate the tax payable for that gross income. ATO Tax scales Australian … Continue reading

Posted in Hints and Tips | Comments Off on ATO Tax calculations in Excel