Skip to content

Instantly share code, notes, and snippets.

<#
.SYNOPSIS
Loops through the recycle bin and output a csv string.
Uses PNP Powershell.
.EXAMPLE
-URL:'https://<tenant>.sharepoint.com/sites/<siteCollection>' -Stage:First -Path:.\FirstRecycleBin.csv
-URL:'https://<tenant>.sharepoint.com/sites/<siteCollection>' -Stage:First -Path:.\FirstRecycleBin.csv -RowLimit:200000
#>
@proxb
proxb / Example1Runspace.ps1
Created August 10, 2015 00:50
Example 1 of returning data back from a runspace
# Create an array of computers to do work against
$Computers = “computer01”,”computer02”,”computer03”,”computer04”,”computer05”
# Create an empty array that we'll use later
$RunspaceCollection = @()
# This is the array we want to ultimately add our information to
[Collections.Arraylist]$qwinstaResults = @()
# Create a Runspace Pool with a minimum and maximum number of run spaces. (http://msdn.microsoft.com/en-us/library/windows/desktop/dd324626(v=vs.85).aspx)