init
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
param ([string]$target)
|
||||
|
||||
$allowedUserList= (
|
||||
'RCINET\madachf',
|
||||
'RCINET\ersekz',
|
||||
'RCINET\jakaba',
|
||||
'RCINET\retinagyt',
|
||||
'RCINET\egyediz')
|
||||
$user = Get-WmiObject Win32_ComputerSystem | select username
|
||||
|
||||
$isRunEnabled = $TRUE
|
||||
$isAlwaysRunEnabled = $FALSE
|
||||
|
||||
if($isAlwaysRunEnabled -OR ($isRunEnabled -AND ($allowedUserList -Contains $user.username)))
|
||||
{
|
||||
Add-Type -AssemblyName "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
|
||||
|
||||
$webResposne = Invoke-WebRequest -Uri "https://biatorbagyi.ekreta.hu/ellenorzo/swagger/docs/V3"
|
||||
|
||||
if($webResposne.StatusCode -eq 200)
|
||||
{
|
||||
Out-File -FilePath $target\swagger.json -InputObject $webResposne.Content -Force
|
||||
Write-Host "$target\swagger.json VN kész."
|
||||
}
|
||||
else
|
||||
{
|
||||
$top = new-Object System.Windows.Forms.Form -property @{Topmost=$true}
|
||||
[System.Windows.Forms.MessageBox]::Show($top,"Hibás VN Swagger!",'Error',1,'Error')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user