Use PowerShell to Explore Office 365

Use PowerShell to Explore Office 365

  1. Type Connect-MsolService
  2. Enter your office 365 credentials.
  3. Type Get-Command -Module MSOnline to see all available commands.

Examples:

To see your package and licenses:

PS C:\Users\guy.naftaly> Get-MsolAccountSku |ft -AutoSize

 

AccountSkuId         ActiveUnits WarningUnits ConsumedUnits

————         ———– ———— ————-

xxxxxxx:MIDSIZEPACK 61          0            44

How to Staged migration mailbox To Office 365

Staged migration

Staged migration enables migration from an on-premises Exchange 2003 or

Exchange 2007.

1.     Prepare a CSV file.

 

Attributes


Here are the attributes for each mailbox. The CSV file can only contain these attributes.

EmailAddress specifies the primary SMTP e-mail address for users’ on-premises mailbox. For example, pilarp@tailspintoys.com. This attribute is required.

Important   Be sure to use the primary SMTP address for on-premises mailboxes and not user IDs from the cloud-based organization. For example, if the on-premises domain is named tailspintoys.com but the cloud-based e-mail organization is named service.tailspintoys.com you would use the tailspintoys.com domain name for e-mail addresses in the CSV file.

Password is the password that will be set on the new cloud-based mailbox. Any password restrictions that are applied to your cloud-based organization apply to the passwords included in the CSV file. For more information, see Password Guidelines. This attribute is optional.

ForceChangePassword specifies whether a user must change the password the first time they sign in to their new cloud-based mailbox. Use either True or False for the value of this parameter. Other values are invalid. This attribute is optional.

Important   If you’ve implemented a single sign-on solution by deploying Active Directory Federation Services 2.0 in your on-premises organization, you must use False for the value of the ForceChangePassword attribute.

CSV file format


Here’s an example of the format for the CSV file. In this example, three on-premise mailboxes are migrated to the cloud.

EmailAddress,Password,ForceChangePassword

pilarp@tailspintoys.com,Pa$$w0rd,False

tobyn@tailspintoys.com,Pa$$w0rd,False

iant@tailspintoys.com,Pa$$w0rd,False

The first row, or header row, of the CSV file lists the names of the attributes, or fields, specified in the rows that follow. Each attribute name is separated by a comma.

Each row under the header row represents one user and supplies the information that will be used to migrate the user’s mailbox. The attribute values in each row must be in the same order as the attribute names in the header row. Each attribute value is separated by a comma.

Use any text editor, or an application like Microsoft Office Excel, to create the CSV file. Save the file as a .csv or .txt file.

  1. Sign in to the Office 365 portal (https://portal.office.com).
  2. Click Admin, and then click Exchange.
  3. Click Migration, click New (

), and then click Onboarding.

  1. Select the migration option that you want, and then click Next. Migration options are as follows:
    1. Remote move
    2. Staged migration
    3. Cutover migration
    4. IMAP

6.     On the “Select the mailboxes” screen, locate the CSV file that you created in step 1, and then click Next.

7.     Enter the credentials of your on-premises admin account, and then click Next.

8.     Enter a name for the migration batch, and then click Next

9.      Specify the admins in your Office 365 organization who should receive the migration report, select one of the following migration methods, and then click New:

 

    1. Automatically start the migration
    2. Manually start the migration later

via How to migrate mailbox data by using the Exchange Admin Center in Office 365.

http://help.outlook.com/en-us/140/ff959691(d=lightweight).aspx

WDS Error : windows cannot install required files

I tried to install new computer from an image from a WDS server.

The new computer connected to the WDS server, I choose the installation image that I wanted.  However during the expansion part of the process I was presented with the error “windows cannot install required files error …….. Error code 0x80070040”.

The reason for that is probably the Res.RWM may have become corrupt.

The file Res.RWM is located on every imagegroup at RemoteInstall\Images\ImageGroupName and it’s like an index file of all images that were published on the WDS.

To solve this you can delete and recreate the Image Group.

Before you do that you can back up the original wim files from this group so you can use it after in the new Image Group that you will create.

  1. Back up the original wim files from this group:
    1. Back up Open the WDS server.
    2. Expend the Install Images Folder.
    3. Click on the Image Group that has the error.
    4. Right click the image that you want to back up.
    5. Click on export image.
    6. Choose a file name and location whare you want to save the back up.
    7. Export the file.
  2. Delete the error image group:
    1. Right click the image group.
    2. Click delete.
  3. Create new image group:
    1. Right click Install Images folder.
    2. Click add image Group.
    3. Add a new group.
  4. Add the backed up images to the new image group.
    1. Right click the new group.
    2. Click add install image.
    3. Choose the backed up image that you want.
    4. Add it to the group.
  5. finish

Sources:

http://robbieroberts.wordpress.com/2012/03/14/wds-windows-cannot-install-required-files/

http://front-slash.blogspot.co.il/2010/08/wds-error-windows-cannot-install.html

How To Upgrade VMWARE ESXI 5.0.0 To 5.1.0

  1. Download the update from https://my.vmware.com/group/vmware/patch#search.
    1. Choose ESXi and Version 5.1.0
    2. On the next site download the file: ESXi510-201210001.zip
  2. Upload the zip file to your esxi datastore
    1. Open your VMware vSphere Client
    2. Click on your host
    3. Click on configuration
    4. Click on storage
    5. Right click on your datastore
    6. Select Browser Datastore…
    7. Select the upload symbol.
    8. Select upload file
    9. Select your update-file
    10. File is uploading…
  3. When it is uploaded activate your SSH Server to trigger the update.
    1. Open your VMware vSphere Client
    2. Click on your host
    3. Click on configuration
    4. Click on security Policy.
    5. Click on properties.
    6. Activate the SSH server service.
  4. Start putty and connect to your server. Login with root.
  5. Depending on where you uploaded your ESXi 5.1.0 update file you need to execute this command to updated your server:
  6. esxcli software vib install -d /vmfs/volumes/datastore1/ESXi510-201210001.zip
  7. After a while the result of the update appears:

Installation Result

   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.

   Reboot Required: true

   VIBs Installed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.510.0.0.799733, …snip…

 VIBs Removed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512, …snip…

VIBs Skipped:

  1. As you can see the updated completed successfully.
  2. Reboot your server with the command reboot.

 

Sources:

http://www.sysstem.at/2012/11/upgrade-vmware-vsphere-hypervisor-esxi-version-5-0-0-to-5-1-0-with-ghettovcb/

http://www.tinkertry.com/patchesxi50/

http://www.tinkertry.com/windows-8-consumer-preview-on-esxi-5-0-patch-02/

How To Restore User Mailboxes in Office 365

Restore one or more users

When you restore a user account within 30 days after deleting it, the user account and all associated data are restored. The user can sign in to Office 365 with the same user ID, their mailbox is fully restored, and they have access to all services they previously accessed.

Before you restore a user account, make sure there are Office 365 licenses available that you can assign to the account. Also, when you restore an account, you may encounter conflicts with user names or proxy addresses, which you can resolve.

To restore one or more users

  1. Go to Admin > Office 365 > Users and groups > Deleted users.
  2. On the Deleted users page, choose the names of the users that you want to restore, and then click Restore users.
  3. In the confirmation box, click Close.

Delete or restore users – office365 suite.

How Connect to Exchange Online Office 365 using remote PowerShell

Remote PowerShell allows you to manage your Exchange Online settings from the command line. You use Windows PowerShell on your local computer to create a remote Shell session to Exchange Online. It’s a simple three-step process where you enter your Exchange Online credentials, provide the required connection settings, and then import the Exchange Online cmdlets into your local Windows PowerShell session so that you can use them.

 

What do you need to know before you begin?

·        

Estimated time to complete: 5 minutes

·         You can use the following versions of Windows:

o    Windows 8 or Windows 8.1

o    Windows Server 2012 or Windows Server 2012 R2

o    Windows 7 Service Pack 1 (SP1)*

o    Windows Server 2008 R2 SP1*

·         You need to install the Microsoft .NET Framework 4.5 or 4.5.1 and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0.

 

Connect to Exchange Online

 

1.     On your local computer, open Windows PowerShell and run the following command.

2.     $UserCredential = Get-Credential

In the Windows PowerShell Credential Request dialog box, type your Exchange Online user name and password, and then click OK.

3.     Run the following command.

4.     $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

5.     Run the following command.

6.     Import-PSSession $Session
7.     Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you'll need to wait for the sessions to expire. To disconnect the remote PowerShell
               Remove-PSSession $Session
How do you know this worked?

 

After Step 3, the Exchange Online cmdlets are imported into your local Windows PowerShell session as tracked by a progress bar. If you don’t receive any errors, you connected successfully. A quick test is to run an Exchange Online cmdlet—for example, Get-Mailbox—and see the results.

If you receive errors, check the following requirements:

·         A common problem is an incorrect password. Run the three steps again and pay close attention to the user name and password you enter in Step 1.

·         To help prevent denial-of-service (DoS) attacks, you’re limited to three open remote PowerShell connections to your Exchange Online organization.

·         Windows PowerShell needs to be configured to run scripts. You only need to configure this setting once on your computer, not every time you connect. To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you opened by selecting Run as administrator).

·         Set-ExecutionPolicy RemoteSigned

 

·         The account you use to connect to Exchange Online must be enabled for remote Shell. TCP port 80 traffic needs to be open between your local computer and Exchange Online. It’s probably open, but it’s something to consider if your organization has a restrictive Internet access policy.

Connect to Exchange Online using remote PowerShell: Exchange Online Help.

How To Delete User Mailboxes in Office 365

·         You can delete Exchange Online mailboxes by deleting the corresponding Office 365 user account, removing the Exchange Online license, or by running the Remove-Mailbox cmdlet in the Shell.

·         When a mailbox is deleted, Exchange Online retains its contents for 30 days, by default. After 30 days, the mailbox is permanently deleted and is not recoverable.

·         You can recover a deleted mailbox within the retention period by using the Office 365 admin center to recover the corresponding Office 365 user account.

·         If the mailbox was deleted by removing the Exchange Online license, it can be restored within the retention period by reassigning the license to the corresponding user account. 

·         If you need to delete a mailbox, but preserve the mailbox contents indefinitely, you can enable an inactive mailbox. To do this, you have place the mailbox on In-Place Hold before you delete it. 

·         Before an inactive mailbox can be enabled, the mailbox must be assigned an Exchange Online (Plan 2) license or have an Exchange Online Archiving subscription so that an In-Place Hold can be placed on the mailbox before it’s deleted.

Use the Office 365 admin center to delete a user account

1.     Go to Admin > Office 365 > Users and groups.

2.     Choose the names of the users that you want to delete, and then click Delete .

3.     In the confirmation box, click yes.

Use the Shell to delete a mailbox

1.     Connect to Exchange Online Using Remote PowerShell:

a.     Run PowerShell as administrator.

b.    Configure PowerShell to run scripts. Set-ExecutionPolicy RemoteSigned

c.     $UserCredential = Get-Credential

d.    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic –AllowRedirection

e.     Import-PSSession $Session

2.     Remove-Mailbox -Identity “Nellie Rom”

3.     Disconnect the remote PowerShell session:

 

a.     Remove-PSSession $Session

via Delete or Restore User Mailboxes in Exchange Online: Exchange Online Help.

How to get a list of all Licensed Office 365 users with PowerShell

Install required software

1.     Ensure you are running Windows 8.1, Windows 8, or Windows 7.

2.     Make sure you have the .NET Framework 3.51 feature.

3.       Make sure you have the latest updates.

4.     Install the Microsoft Online Services Sign-In assistant.

5.       Install the Windows Azure Active Directory (Azure AD) module for the appropriate version of your operating system.

6.       Open powershell as administrator.

7.       Import-Module MSOnline

8.       Get-Credential (Windows PowerShell  dialog box appears)

9.       Enter your credentials.

10.   Connect-MsolService

11.   Get-MsolUser -All |Sort isLicensed

12.   Finish.

Via – Getting Started with Office 365 and PowerShell – Hey, Scripting Guy! Blog – Site Home – TechNet Blogs.