I'm running a simple Export-PnPTermGroupToXml command against an on-prem SP2016 farm. I've tried with different group names or none at all. In all cases I get an Object reference not set to an instance of an object error. Other cmdlets against the local and MMS term store are working fine.
I expect the command to run. :)
Export-PnPTermGroupToXml : Object reference not set to an instance of an object.
At line:1 char:1
+ Export-PnPTermGroupToXml
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Export-PnPTermGroupToXml], NullReferenceException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Taxonomy.ExportTermGroup
Connect-PnPOnline -Url https://xxxx
Export-PnPTermGroupToXml
PnP PowerShell for SharePoint 2016
2.18.1709.0
Installed through the PowerShell Gallery with Install-Module
Same problem here with Sharepoint online! Seems too be related to the latest release
+1
Working with my previous version 2.16.1706.1
Same behavior in SP2013 OnPrem version 2.18.1709.0.
Worked fine in version 2.13.1703.0.
Import-PnPTermGroupFromXml returns the same error.
+1
SharePointPnPPowerShellOnline 2.19.1710.0
+1
Silently fails for me on 2.23.1802.0
[EDIT]
Actually I just discovered that if the target term group is the site collection default term group, then this method doesn't work as intended, and will result in a blank output. Luckily this guy right here found a good fix:
http://sharepoint.handsontek.net/2018/01/14/export-and-import-site-collection-term-groups-using-pnp-powershell/
Most helpful comment
+1
Working with my previous version 2.16.1706.1