Files
gpw_next/Scripts/GPW_CheckProj_IIS01.ps1
T
2022-01-27 11:35:22 +01:00

28 lines
645 B
PowerShell

$FolderName="c:\Steamware\Logs"
$Logfile = Join-Path $FolderName "\GPW_checkProj.log"
$callUri = "https://iis01.egalware.com/GPW/Api/api/ProjCheck/ResAlloc"
Function LogWrite
{
Param ([string]$logstring)
$Stamp = (Get-Date).toString("yyyy/MM/dd HH:mm:ss.fff")
Add-content $Logfile -value "$Stamp $logstring"
}
LogWrite("Start CheckProj process...")
if (Test-Path $FolderName) {
Write-Host "Folder Exists"
}
else
{
#PowerShell Create directory if not exists
New-Item $FolderName -ItemType Directory
Write-Host "Folder Created successfully"
}
$Response = Invoke-WebRequest -URI $callUri
LogWrite($Response)