| |
| Search found 2 matches |
| Author | Message |
|---|---|
| MartinRoy Replies: 2 Views: 10071 |
|
| The command work perfectly.
I use this code to check if the call is FAILED or SUCCESSFULL, is there another way to check this? [int] $Rand = get-random -minimum 100000000 -maximum 999999999 \\paging-srv\pagegate\page\sendpage.exe "pagenet $Num" $Description $NewPassword" $Etat = "" $i = 1 while ($i -le 12) { $Message = "Checking... ($i/12)" $Message get-childitem \\paging-srv\PageGate\Log\pagegate.log | select-string -pattern $NewPassword | foreach {$Etat = $_.line -match "SUCCESSFUL"} If ($Etat) { break } ElseIf ($Etat -eq $False) { break } Else { Start-Sleep -s 10 } $i++ } If ($Etat) { 'SUCCESS } Else { 'FAILED' } |
|
| MartinRoy Replies: 2 Views: 10071 |
|
| Hi,
I was a VBScript fan and I discover Powershell. In a DOS prompt I was able to sent page with this command \\paging-srv\pagegate\page\sendpage.exe -dir=\\paging-srv\share "pagenet 88888888" Test Test It is working great in DOS/VBScript but when I tried this command in Powershell, the command executed succesfully, no warning but nothing appear in the \\paging-srv\share. I have check the log file and nothing appear. Thank you |
|
All times are GMT - 5 Hours |