NotePage, Inc. Forum Index

Search found 2 matches
NotePage, Inc. Forum Index
Author Message
  Topic: Powershell
MartinRoy

Replies: 2
Views: 10071

PostForum: PageGate Support   Posted: Mon May 31, 2010 7:06 am   Subject: Powershell
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' }

  Topic: Powershell
MartinRoy

Replies: 2
Views: 10071

PostForum: PageGate Support   Posted: Fri May 28, 2010 7:08 am   Subject: Powershell
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
 
Page 1 of 1
All times are GMT - 5 Hours
Jump to:  


Powered by phpBB © 2001, 2002 phpBB Group
Theme created by Vjacheslav Trushkin