Search This Blog

Tuesday, 29 November 2016

Stop and Remove Azure Ad Sync users from O365

I had a POC where i configured Azure AD Sync and wanted to remove all the users from O365 and stop the sync.

To get the users removed i did the following:

Uninstalled Azure AD Connect from the AD Server.
Then i installed to apps to connect to O365 Powershell

Install Microsoft Online Services Sign-in Assistant:

Install the Windows Azure AD Module for Windows PowerShell

Once installed open and run:
Somewhere it asks for a password. Type a O365 Global admin password.

Set-MsolDirSyncEnabled -EnableDirSync $false

Once done you can confirm the setting with:

Now give it some time. 20min or so.
You can go to O365 Users and delete all your synced users.

To enable your AD Sync you can run this command again:
Set-MsolDirSyncEnabled -EnableDirSync $true
Now you will need to give it some more time. Was told 72 hours then it should start Sync again.
Mine took about 4 hours when i noticed the users are back on O365.

Now i opened Powershell on my Onprem AD Server and ran the following:
Start-ADSyncSyncCycle -PolicyType Initial
This will synchronize the objects back from AD to Office 365.

To check if the sync completed you can open "Synchronization Service"

This can give you some more info on your sync.

Thursday, 28 July 2016

"Access Denied" error when a user tries to view the Access Requests list in SharePoint 2010 ,2013

Granting access to user to approve a access request.
This permissions get configured when you create a site. If you edit afterwords your users might not be able to grant this access.

This is a straight copy and paste from Rambabu's site.

To resolve this issue, change the Access Request list permissions. To do this, follow these steps:
  1. As a user who has the Manage Permissions Permission Level on the affected site and who also has access to the Access Requests list (for example, a Site Collection administrator), browse to the Access Requests list in Internet Explorer.
  2. Press F12 to open the F12 developer tools in Internet Explorer.
  3. Click the Network tab in the Developer Tools window, and then press F5 to enable network traffic capturing.
  4. Refresh the Access Requests page in Internet Explorer. After the page has loaded, press Shift+F5 to stop capturing network traffic.
  5. In the Developer Tools window, double-click the first result in the URL list. This URL will end with "pendingreq.aspx."
  6. In the Developer Tools window, click Request body.
  7. In the search box, type pagelistid: and then press Enter.
  8. The search will highlight the pageListId text. Following this text, copy the GUID after pageListId:. The GUID will be inside an opening { brace character and a closing } brace character as follows: {GUID

    Include the opening and closing brace character when you copy the GUID. This GUID is the identifier for the SharePoint Online Access Requests list for your organization.
  9. In the browser address bar, enter https://<URL of affected site or site collection>/_layouts/15/ListEdit.aspx?List=<{GUID}>, and then press Enter.

    Note The <URL of affected site or site collection> placeholder represents the URL for the site collection where you are trying to change the access requests—for example, And <{GUID}> represents the GUID that you copied in step 8.
  10. On the Settings page, click Permissions for this list.
  11. Make the necessary changes to the permissions for the list to enable users other than those who are members of the Site Owners group to make changes to the Access Requests list.

Friday, 1 July 2016

IE Crashes when opening sites containing the calendar web part

Had this issue where i access sites and immediately my IE Crashes.

Application Log:
Faulting application name: IEXPLORE.EXE, version: 11.0.9600.18315, time stamp: 0x571ae616
Faulting module name: ucrtbase.DLL, version: 10.0.10586.9, time stamp: 0x5642c5f8
Exception code: 0x40000015
Fault offset: 0x0008469a
Faulting process id: 0x1a80
Faulting application start time: 0x01d1d369b4b31b47
Faulting application path: C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE
Faulting module path: C:\WINDOWS\system32\ucrtbase.DLL
Report Id: fb7462f7-3f5c-11e6-90c9-00a0c6000017

Turns out to be a IE Addin.
Go to your "Manage Add On" in Internet explorer.
Find the "SharePoint Export Database Launcher" Add on and disable it.

Thursday, 12 May 2016

Stop-SPDistributedCacheInstace -Graceful is not graceful!!

Came across this when i posted on a forum regarding appFabric and Nauplius pointed out to me that the command that everyone is using is not truly graceful...

Edit the server name in the script below.
Prob savest if you copy the code from the link provided below.

## Settings you may want to change for your scenario ##
$startTime = Get-Date
$currentTime = $startTime
$elapsedTime = $currentTime - $startTime
$timeOut = 900




Write-Host "Shutting down distributed cache host."
$hostInfo = Stop-CacheHost -Graceful -CachePort 22233 -HostName

while($elapsedTime.TotalSeconds -le $timeOut-and $hostInfo.Status -ne 'Down')
Write-Host "Host Status : [$($hostInfo.Status)]"
$currentTime = Get-Date
$elapsedTime = $currentTime - $startTime
$hostInfo = Get-CacheHost -HostName -CachePort 22233

Write-Host "Stopping distributed cache host was successful. Updating Service status in SharePoint."
Write-Host "To start service, please use Central Administration site."
catch [System.Exception]
Write-Host "Unable to stop cache host within 15 minutes."

Steps when upgrading AppFabric:

  • Do one server at a time.
  • Run Script above on the server before you install the CU. At the moment, CU7 is the latest.
  • I wait 15min, not sure how long it takes to transfer everything to the other server.
  • Run the CU.
  • Edit DistributedCacheserver.exe for Garbage collection feature.
  • Start AppFabric on Central Admin

It is best practice to do it on all the servers running SharePoint if you decide to move app fabric around in the future.

Wednesday, 16 March 2016

SharePoint Proxy Settings


We have got RSS feeds tat need to go via our Proxy server.
You need to add the proxy details to the web.config file.

In the Web.config search for
Make a backup of the web.config before you continue.

Replace the following from to /\

            proxyaddress = "http://proxyserver:80"
            bypassonlocal = "true"

Wednesday, 17 February 2016

SP2013: Restore Content DB Fails with full DB or max site collections but that is not true

Ok, this is a bug.

We are running SP2013 with the March 2013 PU.

restore-spsite : The operation that you are attempting to perform cannot be completed successfully. No content databases in the web application were available to store your site collection. The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection. Create another content database for the Web application and then try the operation again.

The Content DB has got space and not in read-only

Looks like this is a bug.
By the looks of it after you delete a site it goes "somewhere" and you need to run the "Gradual Site Delete" Job.

This did not work for me.

Next, delete the site via PowerShell
Run: Get-SPDeleteSite

Get your Side ID
Run: Remove-SPDeletedSite -Identity {SiteID}

Remove the site's you need to remove. Nope Still not, this seemed to have worked for most people.
Went back i ran the  "Gradual Site Delete" job again.

Start the restore again and it worked.

SP2013: Performance Counters: What to look for and what to do

Hi, back in a more hand on role for a change to hopefully will be getting more updates to this blog.

Performance counters has always been a bit of a grey area...Had an idea but was never sure of what to do with the results.

This site explains what you need to do for the diffrent results: