Publish-XboxMultiplayer.psm1

function Publish-XboxMultiplayerTraces
{
    [CmdletBinding( )]
    Param(
   [Parameter(Mandatory=$true)][string]$gamertag
    )

    Begin
    {    }
    Process
    {

$LocalPath = Split-Path -parent $PSCommandPath

$TeredoAddress = Get-NetIPAddress 2001:0:*

if($TeredoAddress -eq $null)
{
    netsh int ter sho s
    Write-Error "No Teredo address. Teredo is required to publish traces."
    return $null
}


$DirectoryName = "\\2001-0-9d38-90d7-2cdb-fbff-4013-85a6.ipv6-literal.net\party\" + (Get-Date).ToFileTime() + $Gamertag + "\"
New-Item -ItemType Directory -Force -Path $DirectoryName
$Logging = $LocalPath + "\Logging\"

write-host "Uploading...."
$Logging = $LocalPath + "\Logging\*" 
Copy-item $Logging $DirectoryName -recurse -verbose 
 

Write-Host "Complete."


}
}