Básicamente tengo este código:¿Hay un equivalente de "esto" en Powershell?
$file = $web.GetFile("Pages/default.aspx")
$file.CheckOut()
y me preguntaba si hay alguna forma de utilizar un tubo y el PowerShell equivalente de this
reescribir como:
$web.GetFile("Pages/default.aspx") | $this.CheckOut()
Cuando intento esto obtener el error:
Expressions are only allowed as the first element of a pipeline.
también he intentado usar $_
en lugar de $this
pero obtuvo el mismo error.
¡Buena pregunta, Abe! Esto me mordió un par de veces cuando empecé a jugar con PS. – JNK