Wednesday, September 28, 2016

How to change product key in Office 2016.

There is no option to change product key in "Add/Remove programs" trough control panel.
Instead of using Control Panel, run command prompt with administrative privileges and run following commands:

to check key status:

For Office 2016 32bit on 32bit version of Windows
cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

For Office 2016 32bit on 64bit version of Windows
cscript "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" /dstatus 

For Office 2016 64bit on 64bit version of Windows
cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

you'll get installed license details and last 5 character of Product Key.

you can change product key by entering command /inpkey:value for example:

cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Friday, September 23, 2016

Exchange 2013. Got error 500 when try to login to ECP.

Problem: when trying to access exchange control panel, after entering credentials server returns error 500. If you look to event viewer you find the errors like this:

System.InvalidOperationException: Cannot load Counter Name data because an invalid index 'W3SVC_W3WP' was read from the registry.

Login to OWA is working normally.

Solution: On server run command prompt with administrative privilegies and run command:

lodctr /R

If you get an error, try to run again. After it finished with success,  restart IIS with command

iisrestart

After that try to login to ECP.

Friday, September 2, 2016

Exchange 2013. Add mailbox from powershell.

Check database name:

Get-MailBoxDatabase

for existing user mailenable it:

Enable-Mailbox estherv@contoso.com -Database UsersMailboxDatabase

if you create new user:

New-Mailbox -Alias pilarp -Name "Pilar Pinilla" -FirstName Pilar -LastName Pinilla -DisplayName "Pilar Pinilla" -UserPrincipalName pilarp@contoso.com -Password (ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force)

add additional email addresses if needed:

Set-Mailbox "Tom Taylor" -EmailAddresses @{add="tomt@acme.com","tom.taylor@acme.com"} 

choose default reply to address:

Set-Mailbox "Tom Taylor" -PrimarySmtpAddress tom.taylor@acme.com

if mailbox is configured to use an email address policy then you shoul disable it first(before doing previous step):

Set-Mailbox "Tom Taylor" -EmailAddressPolicyEnabled $false

check is user created:

Get-Mailbox <Name> | FL Name,RecipientTypeDetails,PrimarySmtpAddress

check what distribution group configured

Get-DistributionGroup

Add mailbox to distribution group

Add-DistributionGroupMember -Identity "Staff" -Member "tomtaylor@acme.com"