[ad_1]
I am relatively new to powershell coding, i am trying to create a script which auto runs a system key grab. However i am struggling with the naming system. I am using a directory of previous tests but cant seem to figure out a way to call it with my script. Im trying to have my $Num variable change and stay changed after my script is run.
gci -Recurse -Path E:\temp | Measure-Object.Count
for($Num.Count ; $Num -le 300; $Num++){
Write-Output Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
start-sleep -Seconds 05
Write-Output A
Write-Output Install-Script -Name Get-WindowsAutoPilotInfo -RequiredVersion 3.5
start-sleep -Seconds 5
Write-Output Y
start-sleep -Seconds 5
Write-Output Y
start-sleep -Seconds 5
Write-Output Y
Write-Output Get-WindowsAutoPilotInfo.ps1 | Out-File -FilePath E:\temp\kpf-Laptop$num.txt -NoClobber
Write-Output $Num
Exit
}
[ad_2]