OneDrive for Business (web interface)

Just a quick reminder for the old and new interface URL's:

  • OLD interface
    • https://domain-my.sharepoint.com/personal/user/_layouts/15/start.aspx
  • NEW interface
    • https://domain-my.sharepoint.com/personal/user/_layouts/15/onedrive.aspx

Remember that soon will the new OneDrive for Business sync client be available. Get in line for the preview: https://preview.onedrive.com/sync 

Microsoft Edge browsers crashes directly after start [FIX]

Today I had problems with my Microsoft EDGE browser (the new and cool browser in Windows 10). Directly after launch the application crashed:
Activation of app Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge failed with error: The remote procedure call failed. See the Microsoft-Windows-TWinUI/Operational log for additional information.
Steps to solve:

  1. Open a powershell with admin permissions (run as administrator)
  2. Find the installationfolder
    Get-AppxPackage *edge* | fl name,*location*
  3. Navigate to the installation folder (see location from command above)
    set-location C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe
  4. Repair the Edge browser
    Add-AppxPackage -DisableDevelopmentMode -Register ".\appxmanifest.xml"



Remove a Office 365 User/Mailbox from all distribution lists

Remove all groups on a user with Powershell;
# Get the correct mailbox
$mbx = ( Get-Mailbox UserPrincipalName )

# Process all DistributionGroups and if mailbox is member remove (with simple console output)
foreach ($group in Get-DistributionGroup -ResultSize unlimited) {
 if ((Get-DistributionGroupMember $group.identity | select -Expand distinguishedname) -contains $mbx.DistinguishedName){
  write-host "Removing user from" $group.name
  Remove-DistributionGroupMember $group.name -member $mbx.DistinguishedName -BypassSecurityGroupManagerCheck -confirm:$false
 }
}

Windows 10 - Remove fingerprint data

Today I removed an old user account from my computer and added a new one (after moving my computer from AD domain to AD Azure join). After adding my Azure account to the computer I tried to add fingerprint to logon to the computer. However this was not possible due to an error:
Fingerprint already present on other user account

Steps to resolve (as the old account was deleted)

  1. Stop "Windows Biometric service" (WbioSrvc)
  2. Go to "C:\Windows\System32\WinBioDatabase"
  3. Delete all files (I suspect GUID's to be bound to different logins)
  4. Start "Windows Biometric service" (WbioSrvc)


Now I could add my fingerprint to my Azure logon on the computer.

Upload server to Azure (lessons learned)

I have had a need to move a few servers to a new test/development environment shared for several people. Azure was the preferred location of the servers and below are a process for uploading an on premise server to Azure (and some notes to create a template for deployment of servers).

Important bullets
  • Azure is running Microsoft Hyper-V
  • Currently Azure supports fixed VHD (not vhdx or dynamicdisk)
  • Must be stored as a page blob (and not block blob)
Before uploading (Windows server)
  • Add a local administrator with password
  • Enable RDP on the server
Convert VMWare image (if you are running VMWare)
  1. Install Microsoft Virtual Machine Converter (link)
  2. Convert VMWare image via PSH commands
    1. Import-Module C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1
    2. $source = "{path to VMWare image}\server.vmdk"
    3. ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath $source -DestinationLiteralPath {path to converted}\HyperV\ -VhdType Fixed -VhdFormat Vhd
Upload server (using CloudBerry Explorer for Azure)
  1. Create Azure storage (using Azure portal)
  2. Note down the access keys
  3. Download and install CloudBerry Explorer for Azure
  4. Use CloudBerry Explorer to upload the vhd file to Azure
    (be aware to upload as page blob)
Create a disk in Azure (for the uploaded VHD file)
A disk is what you can attach to a virtual machine later.
  1. Logon to Azure portal (https://manage.windowsazure.com) 
  2. Azure > Virtual Machines > Disks (in the top level bar)
  3. Create disk
    • Name
    • VHD URL (locate the vhd file you uploaded)
    • OS in image (checkbox)
    • OS Family
Create a Virtual Machine (attaching disk from above)
  1. Logon to Azure portal
  2. Azure > NEW > Virtual Machine > Quick Create
  3. Under image specification you choose "More Images"
    1. My Disks > "Name of disk in previous section"
Your Virtual Machine will be provisioned and you can access it using RDP in the Azure portal: Azure > Virtual Machines > Mark the server > Connect (in the "footer bar").

A few additional tips
  • Use a good naming structure for all your Azure services, storage, cloud services, etc
  • Have a good understanding of the Azure SLA
  • Delegate permissions with least privilegie model
  • Create good system and process documentation of servers and management
  • Educate yourself on the Azure platform

Simple script for reporting PF permissions (Exchange 2007)

Get UPN Suffix for all users in Office 365 (Powershell);
# Simple script for reporting PF permissions (Exchange 2007)
$arFolderData2 = @()
$folders = get-publicfolder -recurse -resultsize unlimited
foreach ($folder in $folders) 
{
 $folderstats = get-publicfolderstatistics $folder.identity
 $perm = get-publicfolderclientpermission $folder.identity 
  foreach ($owner in $perm) 
  {
    $folder2 = ""
    $folder2 = $folder.name + ";" + $folder.identity + ";" + $owner.user + ";" + $owner.AccessRights
    $arFolderData2 += $folder2
  }
}
$arFolderData2 > PF2.txt

Azure AD Sync behind proxy

To be able to have Azure AD Sync (AADSync) behind a proxy it must allow unauthenticated proxying (i.e. no ID/PWD). If you can fulfill this then you need to do the following:
  1. Configure the proxy server
  2. Configure AADSync to use the proxy server
Configure the proxy server
Do configuring to allow traffic to Office 365 IP's and URL's.

Configure AADSync
If you have a static ID/PWD for the service account then use the following command:
runas /user:domain\serviceuser "control.exe inetcpl.cpl"

In some cases you also need to edit the machine.config for .Net framework 4.5
  1. Open C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
  2. Add proxy settings (case sensitive XML)
Example on proxy settings
<system.net>
<defaultProxy>
<proxy usesystemdefault="true" proxyaddress="http://proxy-ip:80" bypassonlocal="true" />
</defaultProxy>
</system.net>
Reference: 
Sometimes you also need to set winhttp using NetSh
set proxy proxy-server="http=myproxy;https=sproxy:88" bypass-list="*.contoso.com"
NetSh commands

Create signing and encryption certificate that lasts 100 years in Windows 2012R2 server

Create signing and encryption certificate that lasts 100 years in Windows 2012R2 server;
Set-ADFSProperties -CertificateDuration 36500 -AutoCertificateRollover $true
Update-AdfsCertificate -CertificateType Token-Decrypting -Urgent
Update-AdfsCertificate -CertificateType Token-Signing -Urgent
Set-ADFSProperties -AutoCertificateRollover $false