Pages

Friday, September 11, 2015

Remove specific user from All Site collections in office 365 Tenant

 

Finally I got below script to remove user from all site collections in office 365 Tenant J

$credential = Get-Credential

$Adminurl = "https://XXXXX-admin.sharepoint.com"

Connect-SPOService -url $Adminurl -credential $credential

write-host "Connected" -foregroundcolor green

$sites = get-sposite

Foreach ($site in $sites)

{

Write-host "Removing users to $($site.URL)" -foregroundcolor yellow

Remove-SPOUser -Site $site.url -LoginName user@yourdomain.com

}

Friday, August 28, 2015

SharePoint 2016 preview Installation

I have completed Application SharePoint Farm for SharePoint 2016 Preview with dedicated Database Server. I would like to share the SharePoint 2016 installation experience to all. The details and steps are below

Hardware Requirement for SharePoint 2016

Scenario

Deployment Type

Processor

RAM

Hard Disk

Database server running a single SQL instance

Development or evaluation installation with the minimum recommended services

64-bit, 4 cores

12-16 GB

80 GB for system drive

100 GB for second drive

Database server running a single SQL instance

Pilot, user acceptance test running all available services

64-bit, 4 cores

12-16 GB

80 GB for system drive

100 GB for second drive and additional drives

Web server or application server in a three-tier farm

Development or evaluation installation with the minimum number of services

64-bit, 4 cores

12-16 GB

80 GB for system drive

80 GB for second drive

Web server or application server in a three-tier farm

Pilot, user acceptance test running all available services

64-bit, 4 cores

12-16 GB

80 GB for system drive

80 GB for second drive and additional drives

Server Type

Operating System

Installation Media

SP 2016 Prerequisites

Database

Windows Server 2012 R2

SQL Server 2014

 

SharePoint Server

Windows Server 2012 R2

SharePoint 2016 Preview

· Application Server Role, Web Server (IIS) Role

· Microsoft SQL Server 2012 Native Client

· Microsoft ODBC Driver 11 for SQL Server

· Microsoft Sync Framework Runtime v1.0 SP1 (x64)

· Windows Server AppFabric 1.1

· Cumulative Update Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763)

· Microsoft Identity Extensions

· Microsoft Information Protection and Control Client

· Microsoft WCF Data Services 5.0

· Microsoft WCF Data Services 5.6

· Microsoft .NET Framework 4.5.2

· Update for Microsoft .NET Framework to disable RC4 in Transport Layer Security (KB2898850)

· Visual C++ Redistributable Package for Visual Studio 2013

       

SharePoint 2016 Installation steps

Ø Install the SharePoint 2016 Prerequisites

Ø Install the SharePoint 2016

Ø Run the SharePoint 2016 product configuration Wizard

Ø Select appropriate Role in the Minimum role Topology(MinRoleTopology)

Ø Complete the SharePoint 2016 Product configuration Wizard

Install SharePoint 2016 prerequisites:

Run the Splash Setup and Click “install prerequisites “and follow the instructions to complete the prerequisites installations and restart the machines.

clip_image002[4]

clip_image004[4]

clip_image006[4]

clip_image008[4]

clip_image010[4]

Install SharePoint 2016 Preview

Run the splash setup and click install SharePoint 2016 and follow the instructions to complete the installations.

clip_image011[4]

clip_image012[4]

clip_image013[4]

clip_image014[4]

clip_image015[4]

SharePoint product configuration Wizard and Select MinRoleTopology

1. Run the configuration and follow the instruction

clip_image016[4]

clip_image017[4]

clip_image018[4]

clip_image019[4]

2. In the Minimum Role Topology Section select the appropriate Role. For my case I have selected Application Role and completed the configuration wizard

Roles

Descriptions

Front End

Services end user requests, optimized for low latency.

Application

Services the backend jobs or the requests triggered by backend jobs, optimized for high throughput.

Distributed Cache

Services distributed cache for the farm. Optionally, the server assigned to this role can load balance end user requests among the web front ends.

Search

Reserved for Search services.

Custom

Reserved for services to be isolated from other services, I.e. 3rd party, PerformancePoint, etc.

Single-Server Farm

Provisions all services on the server for a single server deployment. This role is provided for evaluation and development purposes.

Important: Single Server Farm is like a Standalone installation, so you could not join additional machines to this SharePoint Farm.

clip_image020[4]

clip_image021[4]

clip_image022[4]

clip_image023[4]

clip_image024[4]

clip_image025[4]

clip_image027[4]

Wednesday, May 20, 2015

Setup Maintenance Page in SharePoint 2013/2010 Web site

Few days back, I was tried to set up Maintenance page for one of SharePoint web application based on the below reference link which worked perfectly for me.

http://www.sharepointdiary.com/2012/07/maintenance-page-for-sharepoint-2010.html

Below are the steps I have followed

1. Create app_offline.htm file with the following content

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Site Under Maintenance</title>

</head>

<body>

<div align="center"><br />

<br />

<br />

<br />

<h1> The Site is under Maintenance </h1>

</body>

</html>

2. Place the app_offline.htm file in your specific web application IIS root folder where the web config file located.

clip_image001

3. Once you placed the app_offline.htm file in the directory, then the site will be under maintenance page without stopping your SharePoint web application.

clip_image003

Wednesday, May 13, 2015

Activate office 365 SharePoint online site feature using Powershell

Due to some reason, I was unable to activate SharePoint publishing feature in one of the office 365 SharePoint site. After I goggled, got the very good link for activating the site collection feature using Power Shell script through SharePoint Management shell.

I have used the below script(copy and save it as .ps1 file and run on it your on promise SharePoint 2013 server which doesn’t required copy the DLL’s) and referred following link which saved my time https://gallery.technet.microsoft.com/office/How-to-enable-a-SharePoint-5bb614c7

Power Shell Script

############################################################################################################################################

#Script that enables a feature in a SPO Site

# Required Parameters:

# -> $sUserName: User Name to connect to the SharePoint Online Site Collection.

# -> $sPassword: Password for the user.

# -> $sSiteColUrl: SharePoint Online Site Collection

# -> $sFeatureGuid: GUID of the feature to be enabled

############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to enable a SPO Feature

function Enable-SPOFeature

{

param ($sSiteColUrl,$sUserName,$sPassword,$sFeatureGuid)

try

{

#Adding the Client OM Assemblies

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\\Microsoft.SharePoint.Client.dll"

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\\Microsoft.SharePoint.Client.Runtime.dll"

#SPO Client Object Model Context

$spoCtx = New-Object Microsoft.SharePoint.Client.ClientContext($sSiteColUrl)

$spoCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($sUsername, $sPassword)

$spoCtx.Credentials = $spoCredentials

Write-Host "----------------------------------------------------------------------------" -foregroundcolor Green

Write-Host "Enabling the Feature with GUID $sFeatureGuid !!" -ForegroundColor Green

Write-Host "----------------------------------------------------------------------------" -foregroundcolor Green

$guiFeatureGuid = [System.Guid] $sFeatureGuid

$spoSite=$spoCtx.Site

$spoSite.Features.Add($sFeatureGuid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)

$spoCtx.ExecuteQuery()

$spoCtx.Dispose()

}

catch [System.Exception]

{

write-host -f red $_.Exception.ToString()

}

}

#Required Parameters

$sSiteColUrl = "https://ramu.sharepoint.com"

$sUserName = "aramu@ramu.com"

$sFeatureGuid= "f6924d36-2fa8-4f0b-b16d-06b7250180fa"

#$sPassword = Read-Host -Prompt "Enter your password: " -AsSecureString

$sPassword=convertto-securestring "youraccountpassword" -asplaintext -force

Enable-SPOFeature -sSiteColUrl $sSiteColUrl -sUserName $sUserName -sPassword $sPassword -sFeatureGuid $sFeatureGuid

Monday, May 4, 2015

Configure Apps for SharePoint 2013 in on premise Environment

Configure Apps for SharePoint 2013 in on premise Environment

I have configured APPS for SharePoint 2013 based on the Microsoft forums and I would like to share you the experience about the configuration with some print screen for your reference which helps you to identify the settings and configure the service easily.

MS reference link: https://technet.microsoft.com/en-in/library/fp161236.aspx

1. Install DNS Server

1. Click Start and type “Server Manager”.

2. Right Click Server Manager and click “Run as administrator”.

3. Go to “Add Role and Features” under “Manage”.

clip_image002

4. “Add Roles and Features Wizard” Window will appear.

5. Check “Before You Begin” is Selected by default in the Left Side and click “Next”.

clip_image004

6. In the “Installation Type” check “Role-based or feature-based installation” is selected and then click “Next”.

clip_image006

7. In the “Server Selection” check “Select a server from the server pool” is selected and the IP address of the Machine with the name is mentioned and then click “Next”.

clip_image008

8. On selecting the “DNS Server” checkbox a pop up window will appear.

9. Click “Add Features” in the pop up window. On clicking “Add Features” the required tools for DNS server will added.

clip_image010

10. “DNS Server” will be selected and now click on “Next”.

clip_image012

11. Click “Next” in the “Features” tab.

clip_image014

12. Click “Next” in the “DNS Server” tab.

clip_image016

13. To install the DNS Server in our machine Click “Install” in the “Confirmation” tab.

clip_image018

2. Creating Domain Name in DNS Server

Before creating the domain name confirm all the SharePoint services are running i.e., SharePoint Administration and SharePoint Timer Services.

To verify this, click Start, point to Administrative Tools, and then click Services. In the Services list, verify that the SharePoint Administration and SharePoint Timer services are running.

2.1 To create a Forward Lookup Zone for the app domain name

1. Verify that the user account that performs this procedure is at admin level.

2. Click Start and type “Administrative Tools”, then click the “DNS”.

3. The “DNS Manager” Window will be opened.

4. Right Click “Forward Lookup Zone” and Click “New Zone” to create a Forward Lookup Zone.

clip_image019

5. In the “New Zone Wizard” Window, Click “Next”.

clip_image021

6. In the Zone Type, select the type of zone you need, by default the “Primary Zone” is selected and then click “Next”.

clip_image023

7. In the Zone Name page, enter the name for your new app domain name in the Zone name box, for example: sp.apps.com and then click “Next”.

clip_image025

8. In the Zone File page, click “Next” to create a new zone file in the dns.

clip_image027

9. In the Dynamic Update page, select the type of the dynamic update for your environment, the default “Do not allow dynamic updates” will be selected and then click “Next”.

clip_image029

10. Click “Finish” in the Completing the New Zone Wizard page to create a domain name for your apps.

clip_image030

2.3 To create a wildcard Alias (CNAME) record for the new domain name

1. Verify that the user account that performs this procedure is at admin level.

2. In the DNS Manager, under the Forward Lookup Zone, right click the new domain name, and then click the New Alias (CNAME).

clip_image032

3. In the “New Resource Record” window, in the Alias name (uses parent domain if left blank) box, enter “*”.

4. The Fully qualified domain name (FQDN) box displays * followed by the domain name. Example:*.sp.apps.com

clip_image033

5. In the Fully qualified domain name (FQDN) for the target host, Click Browse and navigate to the Forward Lookup Zone for the domain that host the SharePoint sites and then click OK.

clip_image034

clip_image035

clip_image036

clip_image037

clip_image038

clip_image039

clip_image041

2.4 To verify the domain name

1. Verify that the user performing this procedure is at the admin level.

2. Click Start and type Command Prompt.

3. Right Click Command Prompt and click “Run as administrator

4. In the Command Prompt, type Ping followed by the subdomain of the domain that you created and press “Enter”. Example: test.sp.apps.com

5. If the ping returns the correct IP address, then your wildcard for the domain name was configured successfully.

clip_image042

2.5 To create a Reverse Lookup Zone for the app domain name

1. Verify the user that performs this procedure is at admin level.

2. Right Click the “Reverse Lookup Zone” and then Click “New Zone” to create a Reverse Lookup Zone.

clip_image043

3. In the “New Zone Wizard” Window, Click the “Next”.

clip_image045

4. In the Zone Type, select the type of Zone you need, default the Primary Zone is selected and then click “Next”.

clip_image047

5. Select the type of the IP address in the Reverse Lookup Zone Name that you need for the DNS names, the default “IPv4 Reverse Lookup Zone” is selected and then click “Next”.

clip_image049

6. In the Reverse Lookup Zone Name, enter the network ID for your zone, then click “Next”.

clip_image051

7. In the Zone File page, click “Next” to create a new zone file for the Reverse Lookup Zone.

clip_image053

8. In the Dynamic Update page, select the type that you need for your Environment, the default “Do not allow dynamic updates” is selected and then click “Next

clip_image055

9. In the “Completing the New Zone Wizard” page, Click “Finish” so that the Reverse Lookup Zone will be Created.

clip_image057

clip_image059

3. Configure the Subscription Settings and App Management Service applications

3.1 To Start the Subscription Settings and App Management services in Central Administration

1. Verify that you should be the member of the farm admin group in Central Administration.

2. Go to SharePoint 2013 Central Administration and click “Run as administrator”.

3. In the Central Administration under System Settings click “Manage Services on Server”.

clip_image061

4. Check whether the “App Management Service” and “Microsoft Sharepoint Foundation Subscription Settings Service” are started, if not click the Start.

clip_image063

5. Go to “Manage service applications” under Application Management, Verify the App Management Service and its Proxy has been Started.

clip_image065

clip_image067

3.2 To Configure the Subscription Settings service application by using SharePoint 2013 Management Shell

1. Verify the user performing this procedure is at the admin level.

2. Click Start and type SharePoint 2013 Management Shell.

3. Right Click SharePoint 2013 Management Shell and click “Run as administrator”.

4. The subscription settings and its proxy should be created in the admin level.

5. At the Windows PowerShell command prompt, type the following commands, and press ENTER after each one to create the application pool.

$account = Get-SPManagedAccount "<AccountName>"

Ø Gets the name of the managed account and sets it to the variable $account for later use.

Where <AccountName> is the name with an admin account.

$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account

Ø Creates an application pool for the Subscription Settings service application.

Ø Uses a managed account as the security account for the application pool.

Ø Stores the application pool as a variable for later use.

 

6. Type the following command and press “Enter” after each one to create a new service application and proxy.

$appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName <SettingsServiceDB>

Ø Creates the Subscription Settings service application, using the variable to associate it with the application pool that was created earlier.

Ø Stores the new service application as a variable for later use.

Where <SettingServiceDB> is the name of the Subscription Settings Service database created in SQL.

 
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc
Ø  Creates a proxy for the Subscription Settings service application.

clip_image069

Check whether the Database name given for the Subscription settings is created in SQL Server Management under Databases.

clip_image070

7. Check whether the Subscription Settings Service Application and its proxy are started in Central Administration.

clip_image072

3.3 To create the App Management service application in Central Administration


1. In SharePoint 2013 Central Administration, on the Application Management page, click Manage service applications.

2. On the ribbon, click New, and then click App Management Service.

3. In the New App Management Service Application page, in the Service Application Name box, type the name for the service application.

4. In the Database section, in the Database Server box, type the instance of SQL Server where you want to store the database, or use the default server.

5. In the Database Name box, type a database name, or use the default name. The database name must be unique.

6. Under Database authentication, select the authentication that you want to use by doing one of the following:

Ø If you want to use Windows authentication, leave this option selected. We recommend this option because Windows authentication automatically encrypts the password when it connects to SQL Server.

Ø If you want to use SQL authentication, click SQL authentication. In the Account box, type the name of the account that you want the service application to use to authenticate to the SQL Server database, and then type the password in the Password box.

7. In the Failover Database Server section, if you want to use a failover database server, specify the server name.

8. In the Application Pool section, do one of the following:

Ø Click Use existing application pool, and then select the application pool that you want to use from the drop-down list.

Ø Click Create a new application pool, type the name of the new application pool, and then under Select a security account for this application pool do one of the following:

Ø Click Predefined to use a predefined security account, and then select the security account from the drop-down list.

Ø Click Configurable to specify a new security account to be used for an existing application pool. You can create a new account by clicking the Register new managed account link.

9. In the Create App Management Service Application Proxy section, leave the Create App Management Service Application Proxy and add it to the default proxy group check box selected.

10. Click OK.

clip_image074

4. Configure App URL


1. In SharePoint 2013 Central Administration, click Apps.

2. Click Configure App URLs.

3. Enter the DNS name in App domain box which has been created already in the ForwardLookupZone.

clip_image076

4. Give the name in the App prefix box, which will be the subdomain of the app URLs and then click OK.

clip_image077