in powershell-agent/src/main/java/jetbrains/buildServer/powershell/agent/detect/cmd/CommandLinePowerShellDetector.java [191:201]
private File prepareDetectionScript() {
final File cacheDir = myConfiguration.getCacheDirectory(PowerShellConstants.PLUGIN_NAME);
final File result = new File(cacheDir, "detect_" + System.currentTimeMillis() + ".ps1");
try {
FileUtil.writeFile(result, DETECTION_SCRIPT, "UTF-8");
} catch (IOException e) {
LOG.warnAndDebugDetails("Failed to write PowerShell detection script to file [" + result.getAbsolutePath() + "]", e);
return null;
}
return result;
}