Usando el PnP TokenParser desde PowerShell

Luis Mañez
Feb 2, 2018 · 1 min read

Hace unas semanas hice una contribucion al PnP Core para que se puedan usar Tokens al registrar una custom action de SharePoint para el RegistrationId. Es decir, que se pueda hacer esto:

Sin embargo, si alguna vez necesitais resolver tokens en alguna parte de una template, y no esta soportado por el PnP, se puede hacer algo desde PowerShell (o .net). Aqui teneis un snippet en PS con un ejemplo:

Podeis ver como en la linea 5 se crea un objeto TokenParser, con el que luego resolvemos el token RegistrationId de las CustomActions de nuestra PnP template, que previamente hemos cargado en un objeto en memoria.

Saludos!

Luis Mañez

Inherits Cloud

Office Development MVP. Loving Microsoft cloud, specially Office 365. Here you can find articles about Microsoft Cloud, always from a development point of view, and specially focus on SharePoint Online.

Luis Mañez

Written by

Office Development MVP. SharePoint and Cloud Solutions architect. MS Azure certified developer and MCPD SharePoint 2010

Inherits Cloud

Office Development MVP. Loving Microsoft cloud, specially Office 365. Here you can find articles about Microsoft Cloud, always from a development point of view, and specially focus on SharePoint Online.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade