Generic filters
Exact matches only
Filter by Custom Post Type

ICYMI: PowerShell Week of 12-October-2018

Topics include the Switch statement, Chocolatey Fest, Graph API, HTML disk reports, auditing Office 365 document sharing and Teams usage.

Read more

ICYMI: PowerShell Week of 5-October-2018

Topics include the Az module, PowerShell module design, PowerShell & Puppet, Hacktoberfest, SQL Server backups, and a PowerShell session from Ignite.

Read more

ICYMI: PowerShell Week of 28-September-18

Topics include PowerShell Rest API on AWS Lamda, web applications in PowerShell, using PowerBI to show DB restores, input validation in functions, PowerShell command history, and the Unplugged session at Ignite with Jeffrey Snover and Jason Helmick.

Read more

ICYMI: PowerShell Week of 21-September-18

Topics Azure Pipelines, PowerShell Core 6.1, PowerShell on Arch Linux, and the PSPowerHour.

Read more

ICYMI: PowerShell Week of 14-September-18

Topics include log file notifications, checking uptime, AWS Lamda support for PowerShell Core, organizing code, and episode 3 of PowerHour!

Read more

ICYMI: PowerShell Week of 7-September-18

Topics include Azure Stack Infrastructure Backup, SharePoint Online Module Availability in PSGallery, Script for Updating Sysinternals Tools, Understanding While Loops, and the PowerShell Explorer module.

Read more

Getting Feedback on PowerShell + DevOps Global Summit Proposals

Hi all!

August is over, and we're about a month out from the close of the PowerShell + DevOps Global Summit CFP!

We have some seriously awesome sessions coming, but we still need more proposals! I've had a number of questions like what makes a good CFP? and would this topic work?. We're going to try something new to see if we can help with this!

  • Do you want feedback on your proposal? Are you curious to see if your peers are interested in a topic? Join the #conferences channel in and ask away!
  • Do you want to help other folks with their proposals? To help encourage folks and different topics? Join the #conferences channel in and help out!

There are two main ways you might get feedback here:

  • In public. Just post your draft proposal or question, and folks will hopefully help!
  • In private. Ask the channel if anyone is around for a private discussion. Some folks prefer this, no harm!

Just keep in mind - if you go the private route, you might end up missing out on feedback from someone with a different and perhaps more helpful perspective.

A number of summit regulars and speakers have offered to help, keep an eye out for them!

I’d encourage this as your first step in getting feedback on your proposals.  If you have more logistical questions, or really want to get feedback specifically from Missy and me, you can ping content –at- and we’ll try to help out.

Lastly, do consider giving a PSPowerHour lightning demo - this is a low pressure way to show off something fun and useful, and gives the folks evaluating summit proposals some insight into your presentation and prep chops! We'll try to fit these all in before the summit CFP closes.

That's about it! Hope to see some fun ideas and proposal discussions in Slack, and your proposals (and hopefully sessions) at the summit!

ICYMI: PowerShell Week of 31-August-18

Topics include automating ACLs for O365 public IPs, the Scour module, Module Design w/ Plaster, the ConvertToMarkdown module, and PSPowerHour.

Read more

ICYMI: PowerShell Week of 24-August-18

Topics include script module design, PowerShell exploitation, PowerShell Remoting, PowerShell AST, the O365 Data Retriever tool, and the inaugural PSPowerHour.

Read more

Use PnP PowerShell to add ContentType for your SharePoint site

You can achieve the task by using SharePoint GUI. However, if your sites collection has tens of hundreds sites and each site has more than one document library, it will become a nightmare for a SharePoint administrator to do the task by using GUI. 

Luckily, there is PnP Powershell which can help us achieve the goal.

The steps will be like below:

#Step1: export your login credential to a secure file on your local machine

get-credential|export-clixml -path c:\safe\mycredential.txt

#Step2: import your credential to Powershell

$cred=import-clixml -path c:\safe\mycredential.txt

#Step3: connect PnP online

connect-pnponline -url "your site url here" -credentials $cred

#Step4: get all sub sites of your site collection

$subsites=get-pnpsubwebs -recurse|select-url

#Step5: Use for each loop to loop through each subsites and add the content type into document libraries in each sub site.

foreach ($site in $subsites) {

connect-pnponline -url $site.url -credentials $cred

$docids=get-pnplist|where-object {$_.basetemplate -eq 101 -and $_title -ine "Site Assets"}|select id

foreach ($docid in $docids) {

     add-pnpcontenttypetolist -list $ -contenttype "content type name of your choice for default one" -DefaultContentType

     add-pnpcontenttypetolist -list $ -contenttype "2nd content type"



To remove the contenttype from your sharepoint libraries, you need to use remove-pnpcontenttypefromlist command.

See the following code:

Foreach($site in $subsites) {

connect-pnponline -url $sites.url -credentials $cred

$docids=get-pnplist|where-object {$_.basetemplate -eq 101 -and $_.title -ine "Site Assets"}|select id

foreach ($docid in $docids) {

remove-pnpcontenttypefromlist -list $ -contenttype "the name of the content type you want to remove"}



Skip to toolbar