# Verify batch files on AD2 $Username = "INTRANET\sysadmin" $Password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force $Cred = New-Object System.Management.Automation.PSCredential($Username, $Password) New-PSDrive -Name Z -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $Cred | Out-Null Write-Host "Batch files in COMMON\ProdSW:" Get-ChildItem "Z:\Shares\test\COMMON\ProdSW\*.BAT" | Select-Object Name, Length, LastWriteTime | Format-Table -AutoSize Write-Host "`nBatch files in _COMMON\ProdSW:" Get-ChildItem "Z:\Shares\test\_COMMON\ProdSW\*.BAT" | Select-Object Name, Length, LastWriteTime | Format-Table -AutoSize Remove-PSDrive Z