kwizcom banner advertisement

SharePoint Online: Update Metadata of a Document using PowerShell

August 30, 2017    , ,
Requirement: PowerShell to update metadata of a file in SharePoint Online. PowerShell to Update the Metadata of a File in SharePoint Online: How to set metadata of a document in SharePoint Online? Lets update the "Status" Column value of a particular file in a SharePoint Online Document library. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Set parameter values $SiteURL="https://crescent.sharepoint.com/sites/Ops" $FileRelativeUrl="/sites/Ops/Shared Documents/Investment Process.pptx" Try { #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
SharePoint Online: Update Metadata of a Document using PowerShell SharePoint Online: Update Metadata of a Document using PowerShell Reviewed by Salaudeen Rajack on August 30, 2017 Rating: 5

SharePoint Online: Copy List Views using PowerShell-CSOM

August 30, 2017    , , ,
Requirement: Copy a List View in SharePoint Online using PowerShell. How to Copy a List View in SharePoint Online? To copy view in SharePoint list through UI, follow these steps: Navigate to the List  List Settings >> Scroll down to Views section >> Click on "Create View" link Under "Start from an existing view" section pick any existing view.  Provide a name to your New View and click OK to copy the view. How to Copy SharePoint view using PowerShell CSOM? To copy a view in SharePoint Online, use this PowerShell script. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #To call a non-generic method Load Function Invoke-LoadMethod() { param( [Microsoft.SharePoint.C
SharePoint Online: Copy List Views using PowerShell-CSOM SharePoint Online: Copy List Views using PowerShell-CSOM Reviewed by Salaudeen Rajack on August 30, 2017 Rating: 5

SharePoint Online: How to Deprecate a Managed Metadata Term in Term Store using PowerShell?

August 29, 2017    , , , ,
Managed Metadata Term store in SharePoint Online provides a fantastic way to classify data and enhance search results using pre-defined Terms. However, There are situations where you may need to remove terms from use. So, If you decide to retire a term - Don't delete them, but deprecate them instead. Deprecating a Term prevents the term from being used any further.  It doesn't affect all items which are already using the specific term! How to deprecate a term in managed metadata Term Store? Here is how to deprecate a term in SharePoint Online term store. Login to SharePoint Online Admin Center and then "term store" from the left navigation. Traverse to the particular term you want to deprecate.  Select the term click on little down arrow, Click on the "Deprecate Term" option from the context menu. Deprecated terms are displayed with a little red icon and its dimmed. The deprecated term cannot be used in new items. Enable Deprecated Term ( Un-Dep
SharePoint Online: How to Deprecate a Managed Metadata Term in Term Store using PowerShell? SharePoint Online: How to Deprecate a Managed Metadata Term in Term Store using PowerShell? Reviewed by Salaudeen Rajack on August 29, 2017 Rating: 5

SharePoint Online: Get All Fields from List View using PowerShell

August 28, 2017    , , ,
Requirement: Get all fields from a SharePoint Online List View SharePoint Online: PowerShell to Get All Fields from a List View This PowerShell script gets all fields from a given list view in SharePoint Online. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Config Parameters $SiteURL= "https://crescent.sharepoint.com/" $ListName="Projects" $ViewTitle ="All Items" #Setup Credentials to connect $Cred = Get-Credential $Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password) Try { #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = $Cred #Get the List $List
SharePoint Online: Get All Fields from List View using PowerShell SharePoint Online: Get All Fields from List View using PowerShell Reviewed by Salaudeen Rajack on August 28, 2017 Rating: 5

SharePoint Online: Update Managed Metadata Field Value using PowerShell and CSOM

August 28, 2017    , , ,
Requirement: Update managed metadata column value using PowerShell in SharePoint Online. SharePoint Online: PowerShell-CSOM script to update managed metadata Field Value Assuming the data is already populated in Term Store, Here is the PowerShell script to set value for managed metadata column. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Taxonomy.dll" #Set parameter values $SiteURL="https://crescent.sharepoint.com/sites/Ops/" $ListName="Projects" $ItemID="1" $TaxonomyFieldTitle="Region" #Termset parameters $TermGroupName="Regions" $T
SharePoint Online: Update Managed Metadata Field Value using PowerShell and CSOM SharePoint Online: Update Managed Metadata Field Value using PowerShell and CSOM Reviewed by Salaudeen Rajack on August 28, 2017 Rating: 5

How to Change SharePoint Farm Account Password using PowerShell?

August 25, 2017    , , , , ,
What is SharePoint farm account, BTW? Well, SharePoint farm account is a service account manages farm services, Used as the application pool identity for Central Administration, used for database access and in used to run SharePoint Timer service! In certain circumstances, You may have to change the Password of SharePoint Farm account, such as: Security Policies, Account has been compromised, SharePoint Admin left, etc. How to Change SharePoint Farm Account Password? Changing SharePoint farm account's password is similar to changing any other managed account's password in SharePoint. As a first step, Identify the SharePoint Farm account ( How to Get SharePoint Farm Account ) and then you can change the password as follows: Case 1: Farm Account's Password is already changed in Active Directory If the Farm account's password is already changed in Active Directory, You'll have to update the Farm account credentials in SharePoint. We use the STSADM command line to
How to Change SharePoint Farm Account Password using PowerShell? How to Change SharePoint Farm Account Password using PowerShell? Reviewed by Salaudeen Rajack on August 25, 2017 Rating: 5

Create User Profile Service Application using PowerShell in SharePoint 2016

August 24, 2017    , , , ,
We need User Profile Service Application to consume social features in SharePoint 2016 such as My Sites, User profiles, etc. This PowerShell script creates User Profile Service Application in SharePoint 2016. Prerequisite: Create my site host prior creating user profile service application. Create My site host using PowerShell in SharePoint PowerShell to create user profile service application in SharePoint 2016 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration Parameters $ServiceAppName = "User Profile Service Application" $ServiceAppProxyName = "User Profile Service Application Proxy" $AppPoolAccount = "Crescent\SP16_Pool" $AppPoolName = "Service Application App Pool" $DatabaseServer ="SP16-SQL" $UserProfileDB = "Farm_Profile_DB" $UserProfileSyncDB = "Farm_Profile_Sync_DB" $UserProfileSocialDB = "Farm_Profile_Social_DB" $MySiteHostLocation="http://mysi
Create User Profile Service Application using PowerShell in SharePoint 2016 Create User Profile Service Application using PowerShell in SharePoint 2016 Reviewed by Salaudeen Rajack on August 24, 2017 Rating: 5

How to Get SharePoint Farm Account Password using PowerShell?

August 20, 2017    , , , , ,
Requirement: Had to take-over a SharePoint Farm and we don't have the Farm Account Password! We needed the credentials of SharePoint Farm account. Get SharePoint Farm Account Password: SharePoint Farm account user name and password can be retrieved with this little trick: Central Admin site uses SharePoint Farm account, So, lets retrieve the credentials of SharePoint Central admin App Pool. This tiny script gets you the user name and password of SharePoint Farm account. Import-Module WebAdministration #Get Central Admin App Pool - which Runs on FARM account $CAPool = Get-ChildItem -Path IIS:\AppPools\ | Where { $_.Name -eq "SharePoint Central Administration v4" } #Get User Name and Password for Farm Account $CAPool.ProcessModel.UserName $CAPool.ProcessModel.Password That's All! Now, you have the Farm Account Password! Similarly, You can retrieve any managed account password or IIS application pool passwords too. One can argue on misuse of this. But this is for
How to Get SharePoint Farm Account Password using PowerShell? How to Get SharePoint Farm Account Password using PowerShell? Reviewed by Salaudeen Rajack on August 20, 2017 Rating: 5

How to Change a SharePoint Web Application from HTTP to HTTPS?

August 16, 2017    , , , ,
Requirement:   Enable HTTPS encryption in SharePoint Web Application using SSL certificate. How to Configure HTTPS for SharePoint 2016 web applications? Enabling HTTPS encryption ensures that the communications between users and the SharePoint web site remain secure. This article assumes you have generated CSR and imported the SSL certificate to the IIS. If you need any assistance on these steps refer my another article: configuring SSL Certificates in SharePoint - Step by Step To configure SharePoint 2013 /SharePoint 2016 for HTTPS, follow these steps: Add HTTPS to web application's IIS binding Configure Alternate Access Mapping for the SharePoint Web application. Step 1:  Add HTTPS Binding for the SharePoint Web Application In SharePoint 2013, to change web application to HTTPS you have to  modify the default AAM to include the new HTTPS URL. Add IIS binding to your SharePoint web application as below: Open IIS Manager (Start >> Run >> Type "InetM
How to Change a SharePoint Web Application from HTTP to HTTPS? How to Change a SharePoint Web Application from HTTP to HTTPS? Reviewed by Salaudeen Rajack on August 16, 2017 Rating: 5

Get SharePoint Page Layouts Usage Analysis Report using PowerShell

August 09, 2017    , ,
Requirement: Get an inventory of all available Page layouts and their usage in SharePoint site Collection. How to Get All Page Layouts in SharePoint? If you get into Site Settings page, You can find page layouts either under "Page layouts and site templates" or "Master pages and page layouts" links. Get All Available Page Layouts of a Publishing Site Collection SharePoint Page layouts are scoped at site collection level.   Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue Function Get-PageLayouts { param ( [Parameter(Mandatory=$true)][Microsoft.SharePoint.SPSite]$Site ) #Get the Publishing Site object [Microsoft.Sharepoint.Publishing.PublishingSite]$PublishingSite = New-Object Microsoft.SharePoint.Publishing.PublishingSite($Site) #Get All page layouts $PageLayouts = $PublishingSite.GetPageLayouts($false) ForEach($PageLayout in $PageLayouts) { Write-host $
Get SharePoint Page Layouts Usage Analysis Report using PowerShell Get SharePoint Page Layouts Usage Analysis Report using PowerShell Reviewed by Salaudeen Rajack on August 09, 2017 Rating: 5
Powered by Blogger.