pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

Get-PnPView | Select-Object exists the current script silently #1644

Open gabbsmo opened 6 years ago

gabbsmo commented 6 years ago

Reporting an Issue or Missing Feature

Issue

Expected behavior

I expect the script to continue running after piping Get-PnPView.

Actual behavior

The script exists silently.

Steps to reproduce behavior

Import-Module SharePointPnPPowerShell2016

Connect-PnPOnline http://contoso -CurrentCredentials
New-PnPList -Title "Test" -Template GenericList
Get-PnPView -List "/Lists/Test" | Select-Object -First 1
Write-Host "This is not outputed"

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

2.26.1805.1

How did you install the PnP-PowerShell Cmdlets?

gabbsmo commented 6 years ago

Workaround:

$v = (Get-PnPView -List "/Lists/Test")[0]
Write-Host "This is outputed"