How to Connect SharePoint Online using Windows PowerShell

This Document explains how to Connect Skype online using Windows PowerShell from your Local computer.

Pre-Request:

  1. User should have SharePoint administrator Access level in Office 365.
  2. Windows PowerShell 3.0 or later.

Installing SharePoint Online Module

For first time use, we need to install the SharePoint Online PowerShell Module in the computer.

You can download the SharePoint Online PowerShell Module from the below link.

https://www.microsoft.com/en-us/download/details.aspx?id=35588

SPS1

SPS2

SPS3

Connecting the SharePoint Online from Windows PowerShell

  1. Open the new PowerShell Session

$UserCredential = Get-Credential Off365Admin@upirdmain onmicrosoft.com

Connect-SPOService -Url https://yourdomain-admin.sharepoint.com -Credential $UserCredential

 

  1. Then you can be access the SharePoint Online using PowerShell.

You can use commands like Get-SPOSite to list all the SharePoint sites

To Disconnect from SharePoint Online Powershell , use

Disconnect-SPOService

For further reference and cmdlets , https://technet.microsoft.com/EN-US/library/fp161364.aspx

 

 

 

 

 

 

 

Advertisements

How to Connect Skype Online using Windows PowerShell

How to Connect Skype Online using Windows PowerShell

This Document explains how to Connect Skype online using Windows PowerShell from your Local computer.

Pre-Request:

  1. User should have Skype for Business administrator Access level in Office 365.
  2. Windows PowerShell 3.0 or later.

Installing Skype Online Module

For first time use, we need to install the Skype for Business Online PowerShell Module in the computer.

You can download the Skype for Business Online PowerShell Module from the below link.

https://www.microsoft.com/en-us/download/details.aspx?id=39366

010116_1703_HowtoConnec1.png

010116_1703_HowtoConnec2.png

 

Once the installation is completed, you can connect the Skype Online.

 

Connecting the Skype Online from Windows PowerShell

  1. Open the new PowerShell Session

$UserCredential = Get-Credential XXX@yyy.onmicrosoft.com

$session=New-CsOnlineSession -Credential $UserCredential

Import-PSSession $session

 Then you can be access the Skype Online using PowerShell.

You can use Cmdlets like, Get-CSOnlineuser ..

For More Skype Online PowerShell cmdlets  –

https://technet.microsoft.com/en-us/library/mt228132.aspx

 

Recovering Mails from the deleted Mailbox in Microsoft Exchange Server

Overview:

 In Microsoft exchange environment, when we delete the mailbox from Active directory, Mailbox will not purge immediately.

Based upon retention period set in exchange server, mailbox will purge accordingly.

Issue we faced:

 

Customer deleted the user account along with associated mailbox from the Active Directory (AD) some time back. As retention period exceeds, mailbox has been purged.

Now we need to restore exchange database to the recovery storage group and use emerge to extract mails to local pst.

Considerations before proceeding database restoration:

 

  1. 1. If a mailbox is not connected to an Active Directory user account, ExMerge cannot log on to the mailbox and extract data from it.

 

  1. Recovery Storage Group logically links the mailboxes with  the original database by the msExchOrigMDB attribute and the mailbox Guids

 

  1. Even though we restore the database to original store in Recovery storage group, ExMerge will not show the user.

Solution Provided:

  1. Create the user in a same OU with a mailbox to the corresponding mail store.
  2. Restore the mail database to recovery storage group.
  3. Run the ExMerge tool to recover the mails.
  4. You will get the error message shown in below.

01:07:55] Error! Cannot identify the user with the msExchMailboxGuid ZE\EF\2E\12\E3\F8E\81\CBR\C4p\92\0D\BB. The legacyExchangeDN is /O=XXXX/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=user.sham

image1

  1. This error indicates that mailbox Guid (msExchMailboxGuid) mismatched.
  1. Take the corresponding original msExchMailboxGuid from the ExMerge log.

7.To convert the ExMerge log Guid of the  particular user to msExchMailboxGuid.

Login into website: http://www.arricc.net/exchange-guid-converter.php

This helps us to convert from ExMerge log Guid to msExchMailboxGuid

  1. Once we got the correct msExchMailboxGuid, Open Adsiedit (A low level Active Directory database editor)
    1. Select the particular user and click properties. This will list all the attributes of the particular user
      1. Select Attribute msExchMailboxGuid as shown in the  figure.

image2

  1. Copy the value we got from the Guid converter site and click OK.
  1. Now run the ExMerge tool and this will extract mails successfully.

Applies to:

  1. Microsoft Exchange Server 2003

 

  1. Microsoft Exchange Server 2007 /2010 /2013

 

 

Lessons Learnt:

 

  1. It is possible to recover mailboxes which are deleted from AD from  Original server without using standby server.

 

 

 

 

 

 

 

 

 

 

 

 

Exchange 2010 – Automated meeting responses not processing for external users

In Earlier versions of Exchange, If we configure the Conference Room to accept the External meeting request by enabling –processexternalmeetingmessages $true , External meeting requests will be processed and Sender would receive Meeting Accepted message.

 

However in Exchange 2010 , this external meeting request will not work , due to security reasons.   To resolve this, we need to do few tweaking’s on this …..

    1. Create the Contact for External Sender in GAL
    2. Create Hub Transport Rule as shown below

HubRule-2

By this, External Meeting request will be successfully accepted by the conference room.

Unable to Login in Blackberry Administration Console after BES Password change

Hi,

Today I have changed my BES service account password also i have updated the new password in the below Administration Services.

  • Blackberry Administration Service-Application Server
  • Blackberry Administration Service –Native Code Container.

However, I’m unable to login Web console either Service accounts or any other accounts.

Then, I found that we need the new password BES Administration Service –AD Settings.

  1. Goto – All programs – Blackberry Enterprise Server –
  2. Open the Blackberry Server Configuration.
  3. Update the new password in AD Settings as show below.
  4. Restart the both Administration Services ,
  5. Wait for 5 minutes , then try Login into console
  6. Yahoo!!! It worked ….

How to Schedule PowerShell Script

We create PoweShell script to perform specific activity such as Getting mailboxes count , Exchange Database size or Free disk space in the servers.

We used to manually run this script to get output results.

Is it possible to run such script automatically in the schedule time ?

Yes , It is possible , it just need some more steps … .

I will outline here …

Step1 : Create PowerShell with your requirements.

Step 2 : Create Windows Batch file to run this PowerShell script.

  1. Open the Notepad and type the below lines

    Powershell -command “&{<Your powershell script path>}”

    Example :

    Powershell -command “&{C:\Scripts\DB-Report\DB-Report-Automate.ps1}”

  1. Save the Notepad as *.Bat file
  1. Schedule the Batch file to run automatically using windows Task Scheduler.

Welcome to My First Blog

 

Hi ,

In this Blog site , I would like to share my Day to Day work experience , so that It would be helpful for some one at any point of time…

 

As you know , Sharing is the best way for Knowledge.

 

Keep Blogging ..

 

Regards

K Gopi