Skip to content

Instantly share code, notes, and snippets.

@torgro
Created February 15, 2015 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torgro/e686bcf45a084b6bfa85 to your computer and use it in GitHub Desktop.
Save torgro/e686bcf45a084b6bfa85 to your computer and use it in GitHub Desktop.
function Export-Object
{
[cmdletbinding()]
Param(
[Parameter(Mandatory)]
[string]$xPath
,
[pscredential]$Credential
,
[string]$Uri
)
$f = $MyInvocation.InvocationName
Write-Verbose -Message "$f - START"
Write-Verbose -Message "$f - Getting data"
$data = Get-XMLdocument
Write-Verbose -Message "$f - xpath = $xPath"
Write-Verbose -Message "$f - Returning objects"
Select-Xml -Xml $data -XPath $xPath
Write-Verbose -Message "$f - END"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment