Office365: setting maximum mail transport limits (email+attachments)…
** NOTE ** The parameters -“InternalDsnMaxMessageAttachSize” and “ExternalDsnMaxMessageAttachSize” are no longer recognized by the Azure PS add-on module; even though the parameters are visible upon viewing a “Get-TransportConfig”. Apparently Microsoft has now set all attach sizes to/from Office365 mailboxes (somehow I doubt this) to 25MB. The article supplied by MS on this is:
Hopefully this helps someone else out there; the amount of PowerShell commands and cmdlets can be quite overwhelming, and knowing what add-on you need for PowerShell to manage your Office365 installations can be a big time waster.
Here are my notes.
Steps (11 total)
What version of PS do you have?
Windows 7 comes with PowerShell v2 as part of the package, and Win8 comes with v3. If you’re using Vista or XP you’ll have to update to at least v2; but that’s outside of this post.
Install Microsoft Online Services Sign-On Assistant for IT Pros:
(32-bit for 32-bit OS, 64-bit for 64-bit OS)
Install Windows Azure AD Module (may be unnecessary for this procedure, but will be necessary for others – I install it by default)
Reboot after install.
Yeah, you know where that is – the power switch. Or the Start menu/shutdown/reboot. If you’re feeling plucky, Win+R “shutdown /r” – of course there will be some scripting people commenting later on other ways too 🙂
Start PowerShell as admin (you will notice a new program group-Windows Azure Active Directory with a PowerShell shortcut; it’s safe to start this or the main PowerShell program for our purpose).
The COMMANDS – feel Powerful yet?
Once in PS, and **having your admin credentials for your Office365 subscription**, enter the following commands;
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $LiveCred -Authentication Basic –AllowRedirection
Let’s see what our values are here…
Explanation to Get-TransportConfig
‘ Now – pay special note to the output from this last command, “Get-TransportConfig” – look for the lines “InternalDsnMaxMessageAttachSize” and “ExternalDsnMaxMessageAttachSize”. This is your current max for outbound and inbound emails. Most likely it’s at 10MB, and not what you want.
Set the new maxmessagesize…
Set-TransportConfig -InternalDsnMaxMessageAttachSize (nn)MB
‘ Change the (nn) to a number – in meagabytes – that you want for your maximum. Might be 20, 40, etc… supposedly the global max is 25.
Set-TransportConfig -InternalDsnMaxMessageAttachSize 20MB
Set the external maxmessagesize…
Set-TransportConfig -ExternalDsnMaxMessageAttachSize (nn)MB
‘ Again, see above note on what to replace (nn) with…
Set-TransportConfig -ExternalDsnMaxMessageAttachSize 20MB
‘ This will set the max incoming message size (individually) to 20MB – as I understand it.
Now check your settings and kick back…
‘ Now check your config the “*maxmessageattachsize” variables- you should see your new max sizes replaced with what you programmed.
‘ Good luck!
Today I had to deploy a Microsoft hotfix that would fix an issue we were experiencing. The hotfix was a msu file and although I had deployed many msu’s in the past, I realised that I hadn’t blogged the process. So here we are!
To deploy the msu I will be using the wusa.exe (Windows update standalone installer) that is built into most versions of Windows operating systems. You can find out more about wusa here: http://support.microsoft.com/kb/934307
The first thing I did was download the hotfix and store the resulting .msu file on my SCCM server where I normally keep all of my application source files.
Next up, I chose to create a new Application:
- Select to ‘Manually specify the application information’
- Complete the ‘General Information’ screen to your tastes…
- I chose to leave the ‘Application Catalog’ screen at the defaults as I will not be making this available to the catalog; rather it will be a required device deployment.
- Click the ‘Add’ button so that we can add a new deployment type.
- Select ‘Script Installer’ and to ‘Manually specifiy the deployment type information’
- For the General Information screen, complete any fields with the appropriate information. I chose to add ‘x64’ in the name as I downloaded the x64 msu so this deployment type will be for x64 computers only. Later, you could add a x86 deployment type if you needed to.
- Browse to where you have stored your msu file and then add the following for the:
wusa.exe "nameOfTheMsu.msu" /quiet /norestart
wusa.exe /uninstall "nameOfTheMsu.msu" /quiet /norestart
* Note that I chose to suppress reboots.
* Note that the screenshot below will look slightly different to yours as you go through the new application wizard as I made a typo in my original screenshot and fixed it after the application was complete – this gives you a slightly different view but essentially it’s the same.
- Click the ‘Add Clause’ button
- This is where we will add our detection rule. In this instance, I looked at the KB article from Microsoft for this particular msu and it showed me the name of the file that would be changed along with the new version number of the changed file. You will find this information on most hotfix KB’s:
- Here’s the current version on one of our affected computers…as you can see, the version number is older than the one listed in the hotfix (Step 9 above):
- Now we know what to look for, the detection rule is easy. Here’s what my resulting rule looked like which is based on the Microsoft KB:
- Click next!
- Change the user experience to ‘Install for system’ and ‘Whether or not a user is logged on’ (As I will be making this a required device deployment.)
- Click the Add button for our system requirement
- I simply chose all Windows 7 x64 computers as that is what this particular msu applies to:
- The completed requirement:
- I did not have any dependencies to add so I clicked next.
- Take a look at the Summary screen:
- We have success!
- At this point, we could add a secondary deployment type if we were going to deploy the x86 version of this MSU by clicking the add button. I am not so I clicked next.
- Another Summary:
- And we’re done.
All that’s left is to upload this to your distribution point and deploy it to your computer collection.
SQL Server 2008, can’t save changes to tables
When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the management tools will not allow you to save the changes.
You will get an error stating, “You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table be re-created.”
What a pesky problem. It prevents you from making progress when you making database changes. It’s a good thing you can turn it off.
This is caused when you make one of the following changes:
- You change the Allow Nulls setting for a column.
- You reorder columns in the table.
- You change the column data type.
- You add a new column.
Now Management studio will work like expected.
Microsoft recommends you don’t turn this option off and that you use T-SQL to make changes to your tables.
Turning off this option will conflict if you have Change Tracking feature turned on. If you turn off this option and make a change to table with change tracking on all the tracking changes for that table will also be deleted.
To check if you have change tracking turned on, right click on your table and go to properties, look for the option Change Tracking.
Here is the kb article from microsoft: http://support.microsoft.com/default.aspx/kb/956176
Check the IE11_main.log file in C:\Windows. Find which prerequisites the installer is not seeing. Will usually be a time out issue with the WMI Query. Can possibly see one or both of the following errors:
Setup exit code: 0x00009C47 (40007) – Required updates failed to download.
WMI query for Hotfixes timed out. Query string: ‘Select HotFixID from Win32_QuickFixEngineering WHERE HotFixID=”KB2729094″‘ Error: 0x00040004 (262148).
- Open a powershell window for each prerequisite
- Run the following loop command changing the KB number for each prerequisite
Get-WmiObject -Query ‘Select HotFixID from Win32_QuickFixEngineering WHERE HotFixID=”KB2729094″‘}
User receives this error when trying to change their password using the rdweb password reset site:
Your password cannot be changed. Please contact your administrator for assistance.
Solution: Make sure user is using correct password complexity rules.