Office 365 Commands (( GoOdies ))

Hvis du skal sette full access på en annen bruker eller møteroms boks, bruke følgende commando

Set-ExecutionPolicy RemoteSigned

$Cred = Get-Credential

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

Import-PSSession $Session

Grant an Admin access to a single mailbox:

Add-MailboxPermission user@domain.com -User admin@domain.com -AccessRights FullAccess -InheritanceType All

Grant an Admin access to all mailboxes

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq ‘UserMailbox’) -and (Alias -ne ‘Admin’)} | Add-MailboxPermission -User admin@domain.com -AccessRights fullaccess -InheritanceType all

Grant Send As permission

Add-RecipientPermission <identity> -AccessRights SendAs -Trustee <user>

For Example:

Add-RecipientPermission “grouptoaccess@domain.com” -AccessRights SendAs -Trustee “usertoaccess@domain.com”

Hide from Address list

Set-Mailbox -Identity <Object@contoso.com> -HiddenFromAddressListsEnabled $true

Convert to meeting room:

set-mailbox user@domain.no -Type Room

changing the Calendar’ s setting from none to full detailed by running PowerShell to make everyone be able to see the detailed information about Calendar meetings.

The PowerShell command is:

set-MailboxFolderPermission ABC:\Calendar -user default -AccessRights custom

( ABC is the name for the Room Mailbox.)

 

Now that you’re in Exchange Online PowerShell, visit Manage TNEF Message Formatting with Remote Domains for complete instructions. To view the TNEF settings for the Default remote domain, run:

Get-RemoteDomain | Select Name,TNEFEnabled

The result for the remote domain named Default should be blank, which means to TNEF or not to TNEF is controlled by other settings also explained in the topic, like Outlook Settings or mail contact settings. In the off chance that you have other remote domains configured, the TNEFEnabled setting for those remote domains should likewise be blank (or false).

 

 

Har kunden problemer med at mail bli til Winmail.dat bruk kommando under

To disable TNEF encoding for all messages sent from your organization, run:

Set-RemoteDomain Default -TNEFEnabled $false

To disable TNEF encoding on a specific remote domain, just run the command again, but replace Default with the Name value of the other remote domain(s).

Calendar Sharing Run the following command

Open a remote PowerShell session by running the following commands and set the sharing policy

 

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

 

Set-SharingPolicy ‘Default Sharing Policy’ –Domains ‘*: CalendarSharingFreeBusySimple’, ‘Company.com:CalendarSharingFreeBusyReviewer, ContactsSharing’, ‘Company.onmicrosoft.com:CalendarSharingFreeBusyReviewer, ContactsSharing’

Disable Passord

 

Set-MsolUser -UserPrincipalName contoso@microsoft.com -PasswordNeverExpires $true

Note If you want to change the setting for all the users in an organization, run the following command:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

Sette ny primary SMTP address

Set-Mailbox -Identity “Username” -EmailAddresses SMTP:user.name@domain.no,user2.name@domain.no

 

Create Dynamic Distribution Groups Using Customized Filters

http://207.46.16.237/en-us/140/dd264647.aspx

 

 

Sette nytt passord på bruker:

 

Set-MsolUserPassword -UserPrincipalName user@example.com -NewPassword Password1 -ForceChangePassword $false

 

 

 

 

 

New-DynamicDistributionGroup -Name “Alle” -Alias “Alle” -RecipientFilter {RecipientType -eq ‘UserMailbox’} -PrimarySmtpAddress alle@technoclassic.no

 

Migrating Via Powershell (Exchange 2003)

 

$migrationsettings = Test-MigrationServerAvailability -Exchange -Credentials (Get-Credential) -Exchangeserver pdc.drammensteater.no -RPCProxyServer webmail.drammensteater.no

 

New-MigrationBatch -Exchange -Name 2ndBatch -ExchangeConnectionSettings $Migrationsetting.ConnectionSettings -MaxConcurrentMigrations 3 -TimeZone “Central Europe Standard Time”

 

$migrationsetting = Test-MigrationServerAvailability -Exchange -Credentials (Get-Credential) -Exchangeserver unionsrv01.unionscene.local -RPCProxyServer mail.unionscene.no

 

Shared Mailbox Config

$Cred = Get-Credential

 

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

 

Import-PSSession $Session

 

 

 

New-Mailbox -Name “Vip24 Support” -Alias vip24 -Shared

 

Set-Mailbox vip24 -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB

 

portal.microsftonline.com:

-Legg til alias vip24@conexus.no på vip24

-Opprett distribusjonsgruppe, kalt “Vip24 Sikkerhetsgruppe”

-Legg til de som skal ha rettigheter og skjul gruppen fra adressebok

 

 

Add-MailboxPermission “Vip24 Support” -User vip24DG -AccessRights FullAccess

 

Add-RecipientPermission “Vip24 Support” -Trustee vip24DG -AccessRights SendAS

Add-MailboxFolderPermission shared@xxx.com:\ -User clientsuccess@xxx.com -AccessRights reviewer

Add-MailboxFolderPermission shared@xxx.com:\SHARED -User clientsuccess@xxx.com -AccessRights reviewer

 

Pasted from <http://community.office365.com/en-us/forums/145/p/61478/231591.aspx>

 

 

 

Forwarding Email via poweshell:

 

Set-Mailbox -Identity Alias -DeliverToMailboxAndForward $true -ForwardingSMTPAddress forwarding@address

 

Share calendar with everyone in the organisation.

 

Hi,

As I understand, you want users in your organization to share Full Details information of appointment to each other.

For this situation, you can change the value of Default Share Policy from “CalendarSharingFreeBusySimple” to “CalendarSharingFreeBusyReviewer” with the cmdlet Set-SharingPolicy. To do it, please refer to the following steps.

1. Connect the Windows powershell to Exchange Online.

2. Run the cmdlet “Get-SharingPolicy |fl” to check the current value of “Domains” in the results. The following is an example of the output.

Domains           : {Anonymous:CalendarSharingFreeBusyReviewer, *:CalendarSharingFreeBusySimple,}

 

3. Run the cmdlet Set-SharingPolicy and append “yourdomain:CalendarSharingFreeBusyReviewer” as the value of parameter

Domains. For example,

Set-SharingPolicy -Identity “Default Sharing Policy” -Domains ‘ourcompany.co.uk:CalendarSharingFreeBusyReviewer’, ‘Anonymous:CalendarSharingFreeBusyReviewer’, ‘*:CalendarSharingFreeBusySimple’

Note: Please ensure to change the value of Domain parameter accordingly.

For more information about the value of sharing policy action and the set-sharingpolicy cmdlet, please refer to the following article.

 

Pasted from <http://community.office365.com/en-us/f/158/t/54401.aspx

 

 

 

View members of a Dynamic Distributiongroup:

 

Dynamic distribution groups aren’t displayed in the Exchange Control Panel. To view the members of a dynamic distribution group, you have to run the following commands:

 

$DDG = Get-DynamicDistributionGroup <group name>

Get-Recipient -RecipientPreviewFilter $DDG.RecipientFilter

 

The first command stores the dynamic distribution group object in the $DDG variable, and the second command uses the Get-Recipient cmdlet to list the recipients that match the criteria defined for the dynamic distribution group.

 

From <http://help.outlook.com/en-us/140/dd264648.aspx>

 

Problem med winmail.dat

 

Set-RemoteDomain Default -TNEFEnabled $false

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.