PowerShell DSC Variables Getting Null after Invoke-Command execute from pwrshell

Configuration setupfilezip
{
param
($ComputerName)
$vdirectoryPath
= “C:\temp\setupfiles”
Import-DscResource -ModuleName “PSDesiredStateConfiguration”
Node ‘localhost’{
File setupfiles {
Type = ‘Directory’
DestinationPath = $vdirectoryPath
Ensure = “Present”
}
}
}
setupfilezip

Start-DscConfiguration -ComputerName localhost -Path setupfilezip -Wait -Verbose

///another powershell script

Invoke-Command “C:\tmp\sample2.ps1”

It’ll be good if you can give us need more information,

Which variable is getting null here ?
What is the flow of execution ? (which script gets triggered first)

its a single script