Current Topic: Microsoft

Posted by Michael Alfaro on September 5, 2011

Office 365, change the default email address on a Shared Mailbox

0

Ran into this problem after I created a shared mailbox, without specifying which email address I wanted to be the primary one.  Original source here:  http://www.bpossibility.com/2011/08/10/office-365-shared-mailbox-how-to-change-the-default-email-address/

 

“Office 365 brings Shared Mailboxes that allow users interact with a common Inbox and Calendar.  The following site describes how these are made, licensing and other ins-and-outs such as setting Litigation Hold and delegating control to users:

http://help.outlook.com/en-us/140/ee441202.aspx

Although following these steps will probably create the wrong primary SMTP address.

Other situations, such as multiple domains in the one Office 365 tenant, will more than likely raise the need for several Shared Mailboxes in different domains.

When creating the Shared Mailbox specify the -PrimarySmtpAddress, below is an example:
New-Mailbox -Name “Shared Mailbox” -Alias sharedmbx -Shared -PrimarySmtpAddress SharedMbx@DOMAIN.COM


Topics: , , ,

Posted by Michael Alfaro on September 5, 2011

Create a Shared Mailbox in Office 365

2

Following up my previous post on Connecting powershell to Office 365, here’s why.  I needed to create a shared mailbox for multiple people to have access to.  Here’s how it’s done(Thumbs up to Microsoft for the great documentation):

“Create and configure a shared mailbox

After you create a shared mailbox, you have to assign permissions to all users who require access to the shared mailbox. Users can’t sign in to the shared mailbox. They have to sign in to their own mailbox and then open the shared mailbox to which they’ve been assigned permissions.

Here’s how to create and configure a shared mailbox for the Corporate Printing Services department at Contoso Corporation.

  1. Create a shared mailbox   To create the shared mailbox for Corporate Printing Services, run one of the following commands:Office 365

    New-Mailbox -Name "Corporate Printing Services" -Alias corpprint -Shared
    
    Set-Mailbox corpprint -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB

    Microsoft Live@edu

    New-Mailbox -Name "Corporate Printing Services" -Alias corpprint -Shared

    The new shared mailbox is displayed in the Mailboxes list in the Exchange Control Panel.

  2. Create a security group for the users who need access to the shared mailbox   In the Exchange Control Panel, create a security group for the staff who need access to the shared mailbox for Corporate Printing Services.
    1. Select My Organization > Users & Groups > Distribution Groups > New.
    2. Specify a display name, alias, and e-mail address. In this example, we’ll use Printing Services Staff, corpprintDG, and corpprintDG@contoso.com.
    3. Select the Make this group a security group check box.
    4. In the Ownership section, click Add to add an owner, if necessary.
    5. In the Membership section, click Add.
    6. In the Select Members page, select the users you want to add. When you are finished, click OK.
    7. On the New Group page, click Save.
      Note   After you create a security group, the membership is closed. When membership is closed, only group owners can add members to the security group, or owners have to approve requests to join the group. Additionally, only group owners can remove members from the security group.
  3. Assign the security group the FullAccess permission to access the shared mailbox   To enable members of the Printing Services Staff security group to open the shared mailbox, read e-mail, and use the calendar, run the following command:

    Add-MailboxPermission "Corporate Printing Services" -User corpprintDG -AccessRights FullAccess
  4. Assign the security group the SendAs permission to the shared mailbox   To enable members of the Printing Services Staff security group to send e-mail from the shared mailbox, run the following command:

    Add-RecipientPermission "Corporate Printing Services" -Trustee corpprintDG -AccessRights SendAs

Note   It may take up to 60 minutes until users can access a new shared mailbox or until a new security group member can access a shared mailbox

Next steps

  • Assign an Exchange Online (Plan 1) or Exchange Online (Plan 2) license to a shared mailbox if you need additional functionality. See Manage licenses in Office 365 for enterprises.
  • Let users know how to open the shared mailbox using Outlook Web App. Point them to this topic: Open Another Mailbox
  • Let users know they can view and use the calendar in the shared mailbox. Each user can schedule events or enter their vacation or out-of-office time.
  • By default, security-enabled distribution groups are displayed in the shared address book. However, you may not want users to send e-mail to this type of group because its purpose is to assign permissions to a shared mailbox. To help prevent users from sending e-mail to a security-enabled distribution group, you can hide it from the shared address book.
    To hide a group, just select it in the Groups list, click Details, and select the Hide this group from the shared address book check box.
    Alternatively, you can restrict who can send messages to the group. For example, you can allow only members to send messages to the group. To do this, configure the Delivery Management section on the group’s properties page. See Change Distribution Group Properties.”

Original Source here: http://help.outlook.com/en-us/140/ee441202.aspx


Topics: , , ,

Posted by Michael Alfaro on September 5, 2011

Connect Windows Powershell to Office 365

0

Found the need for this today as we’re switching over to Office 365 and I had to use the power shell to create a Shared Mailbox that multiple people can access.  Step 1 was connecting the powershell to Office 365 as show below.

“Connect Windows PowerShell on your local computer to the cloud-based service

  1. Click Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell.
  2. Run the following command:

    $LiveCred = Get-Credential
  3. In the Windows PowerShell Credential Request window that opens, type the credentials of an account in your cloud-based organization. When you are finished, click OK.
  4. Run the following command:

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

    Note   The AllowRedirection parameter enables cloud-based organizations in datacenters all over the world to connect Windows PowerShell to the cloud-based service by using the same URL.

  5. Run the following command:

    Import-PSSession $Session

    A progress indicator appears that shows the importing of commands used in the cloud-based service into the client-side session of your local computer. When this process is complete, you can run these commands.

Disconnect Windows PowerShell from the cloud-based service

When you’re finished using the server-side session, always disconnect Windows PowerShell by running the following command:

Remove-PSSession <session variable>

For example, to disconnect from the server-side session that is defined by the $Session variable, run the following command:

Remove-PSSession $Session

Important   If you close the Windows PowerShell window without disconnecting from the server-side session, your connection will remain open for 15 minutes. Your account can only have three connections to the server-side session at one time.”

Original Source here: http://help.outlook.com/en-us/140/cc952755.aspx


Topics: , , ,

Posted by Michael Alfaro on July 27, 2011

401 – Unauthorized: Access is denied due to invalid credentials

1

Ran into this today when pushing from the development machine to staging for testing.  We have forms-based authentication turned on, and of course it ran into an issue when we pushed to staging.  Found the solution here: http://social.technet.microsoft.com/Forums/en-US/winserversecurity/thread/c9239a89-fbee-4adc-b72f-7a6a9648331f/

“To whoever this may help, this saved my life…

IIS 7 was difficult for figuring out why i was getting the 401 – Unauthorized: Access is denied due to invalid credentials… until i did this…

1.) Open iis and select the website that is causing the 401

2.) Open the “Authentication” property under the “IIS” header

3.) Click the “Windows Authentication” item and click “Providers”

4.) For me the issue was that Negotiate was above NTLM. I assume that there was some kind of handshake going on behind the scenes, but i was never really authenticated. I moved the NTLM to the top most spot, and BAM that fixed it.”

For us I had to enable Forms Authentication on step 3.


Topics: , , ,

Posted by Michael Alfaro on July 24, 2011

Clever Microsoft video – Apollo 11 and Excel

2

I know, Clever and Microsoft in the same sentence usually do not go together, but this video by the office team is pretty good:


Topics: , , , ,

Posted by Michael Alfaro on June 15, 2011

How to Group By multiple columns in LINQ for ASP.NET

0

Go from this SQL:

select rl.UserID,rm.RewardType,sum(rl.RewardPoints) from rewardslog rl
join rewardsmaster rm on rl.RewardID = rm.Id
where rl.UserID=’varsha’
group by rm.RewardType, rl.UserID

To this:

var q = from i in (from rl in context.rewardslog
join rm in rewardsmaster on rl.RewardID equals rm.Id
where rl.UserID == “varsha”
select new {rl.UserID, rm.RewardType, rl.RewardPoints})
group i by new {i.RewardType, i.UserID} into g
select new {g.Key.UserID, g.Key.RewardType, Points = g.Sum(rl => rl.RewardPoints)};

Original blog post here.

 


Topics: , , ,

Posted by Michael Alfaro on May 4, 2011

How to properly print to PDF from Microsoft Powerpoint if you have background images

1

You’ll quickly learn that if you use background images in powerpoint, when you go to print to PDF, the background image gets a white border around it.  It took me a while to figure out how to get the PPTX to properly display the background, so I thought I’d share it.

Step 1:  Your preview will look like this:



Step 2: Go into the PDF printer properties and set the “Adobe PDF Page Size” to “Slide 7.5 x 10″ as shown here:



Step 3: Your preview will now look correct as such:


Topics: , , , , ,

Posted by Michael Alfaro on February 13, 2011

Microsoft MSDN Code Gallery

0

Found this in an old email from a friend of mine.  Its a community website where developers can upload code samples for work they’ve done on microsoft’s various development platforms.  Worth checking out, you will find some cool samples to use up there.
http://code.msdn.microsoft.com/


Topics: , , ,

Posted by Michael Alfaro on February 13, 2011

JQuery extensions for the ASP.NET MVC

0


Was clicking around the internet as I tend to do sometimes and ran into this site that has JQuery extensions for the ASP.NET MVC.  You can download from codeplex here. Here’s what they say:

“DJME – The jQuery extensions for ASP.NET MVC is a lightweight framework which helps you build rich user interfaces for ASP.NET MVC while enjoying great developer productivity.

Features

  • Base on jQuery
  • Search Engine Optimized
  • Cross-browser support
  • Model DataBind supports
  • Server template and Client template supports

Full site here:

http://www.dotnetage.com/sites/home/djme.html

Demos here:

http://www.dotnetage.com/sites/home/djme-2-demo.html


Topics: , , ,

Posted by Michael Alfaro on February 3, 2011

Detecting browser language in ASP.NET

1

Was looking for this for our newest development project, if you don’t know, now you do :)

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/localization/culture.aspx#autoculture

“Auto-detecting the browser language for culture-sensitive formatting New in 2.0

The language list can be used to determine which culture the user most likely prefers for formatting of numbers, dates and times. ASP.NET v2.0 now provides functionality to easily detect the first language in the list and use this for formatting:

<%@ Page Culture="auto:en-US" %>

If the first language in the list matches the name of a specific culture supported by the .NET Framework, ASP.NET will set the CurrentCulture of the running thread to this culture. This happens early in the page life cycle so that all subsequent culture-sensitive formatting will be done with this culture.

If the first language in the list matches the name of a neutral culture supported by the .NET Framework, ASP.NET will try to use the function CultureInfo.CreateSpecificCulture() to create a specific culture for the purpose of formatting. For example, this would map fr into the culture for French (France). However, this determination could be inappropriate for somebody in the French-speaking part of Canada, which is why an application should provide the means to configure both culture and language – more on this personalization in the localization section.

If the first language in the list isn’t a culture supported by the .NET Framework, ASP.NET will fall back to the culture specified after the colon in the Culture declaration. This would be en-US – English (United States) in the example above.

This auto-detection functionality can be used in all places where Culture can be specified declaratively, such as in the globalization section of web.config. The auto-detection works the same for UICulture, which is used for localization and is explained later.

The following sample demonstrates a Currency Exchange Calculator that reacts to different language settings in the browser (see above for information how to change this). It will display the date in the format appropriate for the first language in the list and also uses the correct decimal separator for the exchange values. Furthermore, this decimal separator can be used for the entry of the value to be converted.

Culture-sensitive date and number formatting (VB)
Run Sample View Source

In order to view text in some East Asian languages and some languages with complex scripts, you might need to install the appropriate font for Internet Explorer. Refer to Internet Explorer Help Topics for more information (see in the index under “foreign languages used in Web pages”). Alternatively you can install additional fonts from the Regional and Language Options of the Control Panel.

This sample will not display dates in the correct reading order for right-to-left languages like Arabic or Hebrew. See the second and third sample in the Localization section for information on how to handle this case.”


Topics: , , ,