Page 2 of 12

CMD line: add domain to local intranet zone

A quick way to add domains to a computers Local intranet zone is to run the following regs in cmd. No Admin rights needed.

REG ADD “HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\office.com ” /v https /t REG_DWORD /d 1 /f
REG ADD “HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\microsoftonline.com ” /v https /t REG_DWORD /d 1 /f

How to add a user as a Site Collection administrator – Office 365

To add users as site Collection admins follow this procedure:

  1. Connect to the SharePoint admin center
  2. Select User Profile, then Manage User Profiles
  3. Find a profile
  4. Manage Site Collection Owners
  5. Change the primary or secondary site collection administrator
  6. Repeat for every single user

Azure VPN – Change Local Site Public IP

If a Clients Local site public IP changes the VPN tunel betwen Azure and the Local Site will disconnect. To fix this do the following:

Connect to Azure using powershell and run the following command:

New-AzureRmLocalNetworkGateway -Name LocalSite -ResourceGroupName [ClientRG] -Location ‘northeurope’ -GatewayIpAddress ‘[Public wan IP 2.4.6.8]’ -AddressPrefix ‘[LAN IP Net 192.168.1.0/24’

 

(Change the RG and Public wan IP and the LAN IP Net to the correct settings)

Office 365 Add calendar permissions with powershell

To add permissions on a Exchange Object in Office 365 using PowerShell the cmdlet set-MailboxFolderPermission or add-MailboxFolderPermission can be used.

In this example we add editor permissions for user2 to user1’s calendar. This will enable user2 to edit, add or delete content of user1’s calendar.

set-MailboxFolderPermission -Identity user1@domain.no:\calendar -user user2@domain.no -AccessRights Editor

Note: kalender is the Norwegian Word for Calendar

To bulk add all users in a Tennant as Reviewer to user1@domain.no’s calendar run the following cmdlet.

$Users = Get-Mailbox | Select-Object -ExpandProperty userprincipalname
ForEach ($user in $Users )
{
Add-MailboxFolderPermission -Identity “user1@domain.no:\calendar” -User $User -AccessRights Reviewer
}

For full details of this cmdlet:
https://technet.microsoft.com/en-us/library/dd298062(v=exchg.160).aspx

And for my original Source:

Add Calendar Permissions in Office 365 via PowerShell

Installing modules is easy – Azure and Office365

This little post is to get you up and running with Azure PowerShell so that you can manage your Azure subscriptions and Office365 tenants in 10 minutes after booting up an fresh install of Windows 10.

I have tested this in the following Windows builds:
10586 (1511 build – Windows 10)
10586(TP4 build – Windows Server 2016)
14328 (insider build – Windows 10)

Simply start PowerShell in Elevated mode (right click on PowerShell and start in Admin mode.

type these 3 lines – one at a time.

“Install-Module AzureRM -force:$true”
“Install-Module Azure -force:$true”
“Install-Module MSOnline -force:$true”

When the installation is finished you need to set the execution policy to “Unrestricted” to be able to connect to Office365 tenants.

“Set-ExecutionPolicy Unrestricted”

You are good to go! 🙂
Good luck playing around with Azure and Office365

 

 

How to store emails sent from a shared mailbox in the correct sent folder

Problem: User sends email as a shared mailbox (shared@domain.com) but the sent email gets stored in the users sent items in Outlook (user@domain.com).

To have Outlook Place the sent item in the correct sent item folder, do the following registry change.

NOTE: Changing registry might cause unwanted Things to happen to Your computer. Always back up before changing the registry.

The fix:

1.Click Start, click Run, type regedit, and then click OK.
2.Locate and then click the following registry subkey:
HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\Preferences
Note The x.0 placeholder represents your version of Office (16.0 = Office 2016, 15.0 = Office 2013, 14.0 = Office 2010).
3.On the Edit menu, point to New, and then click DWORD Value.
4.Type DelegateSentItemsStyle, and then press Enter.
5.Right-click DelegateSentItemsStyle, and then click Modify.
6.In the Value data box, type 1, and then click OK.
7.Exit Registry Editor.

This fix Works for Outlook 2013 and newer. It does the fix on the Client, without having to change the Exchange server. For larger enterprices where it is more conveenient to have this as a server setting please read this blog article:
http://blogs.technet.com/b/exchange/archive/2015/03/03/want-more-control-over-sent-items-when-using-shared-mailboxes.aspx

Source:
https://support.microsoft.com/en-us/kb/2843677

Managing Office 365 and Exchange Online with Windows PowerShell

Connect to Office 365 PowerShell
Connect to Exchange Online PowerShell
Connect to Office 365 Compliance Center PowerShell
Connecting to Skype for Business Online by using Windows PowerShell
Set up the SharePoint Online Management Shell Windows PowerShell environment

Sorurce: https://support.office.com/en-gb/article/Managing-Office-365-and-Exchange-Online-with-Windows-PowerShell-06a743bb-ceb6-49a9-a61d-db4ffdf54fa6?ui=en-US&rs=en-GB&ad=GB

Delegate “logoff” permission RDS 2012

Recently I had a challenge with delegating the permission to logoff sessions to a group of users on a RDS solution based on 2012 R2, but without giving them local administrator permissions. Microsoft has removed the RDSH console in Windows Server 2012, which means we have no place to set permissions for the sessions on a RDSH based on 2012 or later. After a quite bit a research I found a solution.

Step 1: Assign permissions

Some googling led me here where I found this command which does the job if you replace “domain\group”with correct values.

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSPermissionsSetting WHERE (TerminalName =”RDP-Tcp”) CALL AddAccount “domain\group”,2

However if you have an existing 2008 R2 server you can install the RSAT for RDSH and connect to the 2012 R2 session host and set the needed permissions there.

rdsh_gui1

Step 2: Enable logoff

Now when the users have permission to logoff sessions, they still can’t use task manager because the options there are very limited when you’re not an administrator:

rdsh_taskmgr

And Powershell can’t query the RDS deployment without administrator rights, so for once I couldn’t user Powershell to save the day.

However we have command line tools to get the job done. To make this more user friendly I made a batch-file and put it on the desktop for the delegated users. Here the user can list all sessions on the server and select which one to logoff. It boils down to a combination of “query session” and “logoff” commands. This is the batch file, feel free to use if needed.

@echo off
REM List sessions and log off users
REM Written by Per-Torben Sørensen
:MENU
ECHO.
ECHO ………………………………………..
ECHO PRESS 1 or 2 to select your task, or 3 to EXIT.
ECHO ………………………………………..
ECHO.
ECHO 1 – List current sessions only
ECHO 2 – List and log off a session
ECHO 3 – EXIT
ECHO.
SET /P T=”Type 1, 2, or 3 then press ENTER: ”
IF %T%==1 GOTO LIST
IF %T%==2 GOTO LOGOFF
IF %T%==3 GOTO EOF
:LIST
query session
GOTO MENU
:LOGOFF
query session
echo.
SET /P ID=”Type the ID of the session to log off, or C to cancel: ”
IF %ID%==C GOTO MENU
logoff %ID%
GOTO MENU

 

SMTP Relay in Office365

When sending email from i.e. Visma or other 3. party applications you need a SMTP server. Some times you can use the local ISP SMTP server, but then you need to add that SMTP server to yours domain SPF record. You might don`t wnat to do this.

 

Here is the solution:

Log in to the tennant, and start Exchange management console.

Create a connector filtering on the public IP address beeing used for the server that hosts Visma.

In Visma add a SMTP server using your MX record for that tennant (i.e. itstyring-no.mail.protection.outlook.com​ ) and port 25.

 

This connector will relay email with from addresses containing a valid domain for that tennant.

OneDrive for Business – ​The server you are trying to access is using an authentication protocol not supported by this version of Office.

OneDrive for Business – ​The server you are trying to access is using an authentication protocol not supported by this version of Office.

We ran into this error and found the following fix at community.office365.com

1.Accessed Control Panel > Selected the Microsoft Office Subscription > right clicked > change > Selected Online Repair
2.Removed all the stored credentials in the credentials manager (control panel > credentials manager)
3. Restarted the computer
4. Deleted the folder’s below:
C:\Users\username\AppData\Local\Microsoft\Office\Spw
C:\Users\username\AppData\Local\Microsoft\Office\16.0\OfficeFileCache
5. Sign in Word (opened blank document > file > account > signed out and signed in office 365 account)
6. Started OneDrive for Business. ( from the search bar typed OneDrive for Business> clicked on the app > sync a different library instead >pasted the url of the team site “Public documents” > sync now​

Source:
https://community.office365.com/en-us/f/154/t/410059

© 2019 IdefixWiki

Theme by Anders NorénUp ↑