как улучшить холодный запрос помимо скомпилированного запроса

Я удалил команду invoke и после изменения работы логического скрипта, как и ожидалось.

$date = (Get-Date).ToString("_MMddyyyy")

#Storing servers

$Servers = Get-Content C:\server.txt

#Scanning Servers and executing 

$Servers | ForEach-Object {

#Defining Source and Destination path

$DestPath =  "d:\Temp\IIS_Logs_"+"$_"
$SourcePath = "\\$_\d$\u_ex15122717.log"

#Creating new folder for storing backup

New-Item -Path $DestPath -ItemType directory

#Copying folder

Copy-Item -Recurse -Path $SourcePath -destination $DestPath 

}
1
задан Gert Arnold 15 January 2019 в 21:48
поделиться