Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

#6. PnP Powershell cmdlets with SharePoint Online

Introduction


In this article you will learn via demo application, 

1. Create List using PnP Powershell Modular approach.
2. Get List using PnP Powershell Modular approach.
3. Remove List using PnP Powershell Modular approach.
4. Create and Use a Bat and CSV file as input.

GitHub Link :- https://github.com/manoj1201/PnPUsingSPO/tree/master/CreateList


SharePoint Patterns and Practice (PnP) contains a library of PowerShell Cmdlets which allowed to perform operation towards SharePoint. These Cmdlets use CSOM and works for both SharePoint Online and On Premises.


#5. PnP Powershell cmdlets with SharePoint Online

Introduction


In this article you will learn via demo application, 

1. Get Fields using PnP Powershell Modular approach.
2. Get Content Type using PnP Powershell Modular approach.
3. Associate Fileds with Content Type using PnP Powershell Modular approach.
4. Create and Use a Bat and CSV file as input.

GitHub Link :- https://github.com/manoj1201/PnPUsingSPO/tree/master/SiteColumnToContentType

SharePoint Patterns and Practice (PnP) contains a library of PowerShell Cmdlets which allowed to perform operation towards SharePoint. These Cmdlets use CSOM and works for both SharePoint Online and On Premises.


Previous Articles:-

 




#4. PnP Powershell cmdlets with SharePoint Online

Introduction


In this article you will learn via demo application, 

1. Get Content Type using PnP Powershell Modular approach.
2. Add Content Type using PnP Powershell Modular approach.
3. Remove Content Type using PnP Powershell Modular approach.
4. Create and Use a Bat and CSV file as input.

GitHub Link :- https://github.com/manoj1201/PnPUsingSPO/tree/master/ContentType

SharePoint Patterns and Practice (PnP) contains a library of PowerShell Cmdlets which allowed to perform operation towards SharePoint. These Cmdlets use CSOM and works for both SharePoint Online and On Premises. 


Previous Articles:-

 



#3. PnP Powershell cmdlets with SharePoint Online

Introduction


In this article you will learn via demo application, 

1. Create a Site Column using PnP Powershell Modular approach.
2. Delete a Delete Site Column using PnP Powershell Modular approach.
3. Create and Use a Bat and CSV file as input.

GitHub Link :- https://github.com/manoj1201/PnPUsingSPO/tree/master/SiteColumn
SharePoint Patterns and Practice (PnP) contains a library of PowerShell Cmdlets which allowed to perform operation towards SharePoint. These Cmdlets use CSOM and works for both SharePoint Online and On Premises. 

#2. PnP Powershell cmdlets with SharePoint Online

Introduction

In this article you will learn via demo application, 

1. Create a subsite using PnP Powershell Modular approach.
2. Delete a subsite using PnP Powershell Modular approach.
3. Create and Use a Bat and CSV file as input.


SharePoint Patterns and Practice (PnP) contains a library of PowerShell Cmdlets which allowed to perform operation towards SharePoint. These Cmdlets use CSOM and works for both SharePoint Online and On Premises.



Previous article Link can be found here:- http://manojmittalblogs.blogspot.com/2018/10/1-pnp-powershell-cmdlets-with.html

Stay tune...

#1. PnP Powershell cmdlets with SharePoint Online

Introduction

In this article you will learn via demo application, How to install PnP Powershell and  get start with basic operations.

SharePoint Patterns and Practice (PnP) contains a library of PowerShell Cmdlets which allowed to perform operation towards SharePoint. These Cmdlets use CSOM and works for both SharePoint Online and On Premises.



Stay tuned with series of videos.

How to know Site Collection associated with which Content Database

Its like very simple and sweet post - How to know which site collection associated with which content database.

Power Shell Command:-

Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}}

Result look like this:-


We can easily convert the result into Text file using below command:-

Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}} > C:\sitecollections.txt


Result look like this:-


Happy Coding !!

SharePoint Farm Backup Size using Powershell

Farm Backup and restore activity - before performing any operation - Its very important to know the farm size 

To know the Farm size is very easy - Just use below power shell command:-

Power Shell Command

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + ” – ” + $_.disksizerequired/1024/1024} {Write-Host “`nTotal Storage (in MB) =” (“{0:n0}” -f ($db/1024/1024))}

The above command gives the result like this:-

Happy Coding !!

SharePoint Get Content Database Size using Powersell

During Migration activity - it become very import to know the size of Content Database - which we are going to migrate.

To know the Content Database size is very easy - Just use below power shell command:-

Power Shell Command:-

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + ” – ” + $_.disksizerequired/1024/1024} {Write-Host “`nTotal Storage (in MB) =” (“{0:n0}” -f ($db/1024/1024))}

The above command give the list of all database with size in MB.


Happy Coding !!