I personally have a memory like a sieve. Unless I use something regularly I often forget the exact commands to configure it. (Go GUI!) – The most useful PS commands I have for managing Office365/ Exchange are:
PowerShell (From server with Exchange Extensions):
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Send-As mailbox access:
Add-RecipientPermission -Identity <sharedEmail> -Trustee <userEmail> -AccessRights SendAs
Y
Add Full Mailbox Access:
Add-MailboxPermission <sharedEmail> -User <userEmail> -AccessRights FullAccess
Remove Mailbox Access
Remove-MailboxPermission -Identity <SharedMailbox> -AccessRights <MailboxRights> -User <UserEmail>
Removing Distribution Groups
Use the Remove-DistributionGroup cmdlet together with the BypassSecurityGroupManagerCheck parameter to remove the distribution group as follows:
Remove-DistributionGroup <name of the group> -BypassSecurityGroupManagerCheck
Forwarding Email With Copy
Set-Mailbox user -DeliverToMailboxAndForward:$True -ForwardingAddress $forward (NOTE must be user within Exchange Org, otherwise use ForwardingSMTPAddress)
Removing Forward
Set-Mailbox $user -DeliverToMailboxAndForward:$False -ForwardingAddress $null
Create a Shared Mailbox (http://technet.microsoft.com/en-us/exchangelabshelp/ee441202)
set-mailbox <shared> -type shared
New-Mailbox -Name “<Shared>” -Alias <Shared> -Shared
Set-Mailbox <Shared> -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB
Kudos must go to Tony Redmond for a great article on how Exchange Archiving works and the implications of simply enabling it for example, all management staff.
Moral of the story: Notify users, Confirm ‘Default Policy’ settings, Then tick the box.
Rest in Peace instsvc.exe, you have served a good and hearty life. With the invent of 2008 x64 you are no longer required.
A built in tool ‘sc’ is now the command to use for all your services related configurations.
SRVANY.exe can still be used to run applications, simply specify:
sc create MRTG binPath= C:\Windows\System32\srvany.exe DisplayName= "MRTG"
Add the appropriate information into HKLM\SYSTEM\CCS\Services\MRTG\Parameters\ and your favourite multi-router traffic grapher will start with windows. =)
<sigh> New SBS 2011 Essentials server and customer just HAS to install QuickBooks with .NET 1.1 </sigh>
Thanks to several posts on the SBS Diva Blog I was able to identify the issue and fix it in a slightly different way.
All web sites hosted (http://server/Remote, /Connect, etc.) were reporting the following HTTP 500.0 server error -
“Calling LoadLibraryEx on ISAPI filter “C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll”
Is obviously caused by x64 code being executed by x32 .NET – Enabling x32 compatibility in the Application Pool did not help. To resolve: Continue Reading