1

Resolved

Export failed on Win10Homex64 [RESOLVED]

description

After running the Import-Module, I attempted the Export-Taxml. I received the following errors with and without the -CloudCredential switch.

PS C:\Users\Roy> Export-Taxml -Path c:\taxonomytoolkit\holisticmeta-output.taxml -SiteUrl https://mysite.sharepoint.com -Verbose

Taxonomy Toolkit Version 2.1.1.0
Copyright (c) Microsoft Corporation. All rights reserved.
https://taxonomytoolkit.codeplex.com/

Using SharePoint client library version 15.0.4420.1017.

TAXML output will be written to c:\taxonomytoolkit\mysite-output.taxml

Connecting to SharePoint site: https://mysite.sharepoint.com
Export-Taxml : The remote server returned an error: (403) Forbidden.
At line:1 char:1
  • Export-Taxml -Path c:\taxonomytoolkit\mysite-output.taxml -Site ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Export-Taxml], WebException
    • FullyQualifiedErrorId : System.Net.WebException,TaxonomyToolkit.PowerShell.ExportTaxmlCommand

PS C:\Users\Roy> Export-Taxml -Path c:\taxonomytoolkit\mysite-output.taxml -cloudcredential -SiteUrl https://mysite.sharepoint.com -Verbose

Taxonomy Toolkit Version 2.1.1.0
Copyright (c) Microsoft Corporation. All rights reserved.
https://taxonomytoolkit.codeplex.com/

Using SharePoint client library version 15.0.4420.1017.

TAXML output will be written to c:\taxonomytoolkit\mysite-output.taxml

Connecting to SharePoint site: https://mysite.sharepoint.com
Export-Taxml : The -CloudCredential switch cannot be used without specifying a credential object
At line:1 char:1
  • Export-Taxml -Path c:\taxonomytoolkit\mysite-output.taxml -clou ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Export-Taxml], InvalidOperationException
    • FullyQualifiedErrorId : System.InvalidOperationException,TaxonomyToolkit.PowerShell.ExportTaxmlCommand

comments

pgonzal wrote Sep 27, 2015 at 7:51 PM

** Closed by pgonzal 09/27/2015 12:51PM

RoyRoebuck wrote Sep 27, 2015 at 7:54 PM

I updated the Export cmdlet to follow the guidance in the Export-TaxML help file. The results follow.

PS C:\Users\Roy> Export-Taxml -Path c:\taxonomytoolkit\mysite-Output.taxml -SiteUrl https://mysite.sharepoint.com/ -Credential (Get-Credential -UserName 'royroebuck@mysite.com' -Message
'Enter password:') -CloudCredential
At line:1 char:187
  • ... tial (Get-Credential -UserName 'royroebuck@mysitea.com' -Message
  • ~
    Missing closing ')' in expression.
    At line:2 char:22
  • 'Enter password:') -CloudCredential
  • ~
    Unexpected token ')' in expression or statement.
    • CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    • FullyQualifiedErrorId : MissingEndParenthesisInExpression

pgonzal wrote Sep 27, 2015 at 7:58 PM

Please check the following things:
  • Taxonomy service is running on the server (e.g. Term Store Manager can create terms)
  • The CSOM service is enabled for remote calls
  • Your user account has Taxonomy and CSOM permissions access. For troubleshooting purposes, it would be best to start with an account that has Term Store Administrator and/or Tenant Administrator permissons
For an example of how to use the -CloudCredential parameter, see the docs on this page.

pgonzal wrote Sep 27, 2015 at 10:02 PM

Regarding the "unexpected token" error, it looks like you pressed ENTER before the last part of the command. That command needs to be entirely on a single line.

It might be easier to split it into two statements like this:
$credential = Get-Credential -UserName 'royroebuck@mysite.com' -Message 'Enter password:'

Export-Taxml -Path c:\taxonomytoolkit\mysite-Output.taxml -SiteUrl https://mysite.sharepoint.com/ -Credential $credential -CloudCredential -Verbose

RoyRoebuck wrote Sep 28, 2015 at 12:47 AM

The following sequence of commands exported the term sets.

$credential = Get-Credential -UserName 'royroebuck@mysite.com' -Message 'Enter password:'

Unblock-File C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.dll

Import-Module C:\TaxonomyToolkit\TaxonomyToolkit.PowerShell.psd1

Export-Taxml -Path c:\taxonomytoolkit\mysite-Output.taxml -SiteUrl https://mysite.sharepoint.com/ -Credential $credential -CloudCredential -Verbose

pgonzal wrote Sep 28, 2015 at 5:11 AM

Thanks for following up. I have updated the Installation instructions based on your notes above. Let me know if you encounter any other issues or questions. Happy trails!