Hi guys,
We have alot of real time displays across our callcenters. Im working on a better solotion, when our support team needs to restart a display which takes some time (login, menu, browse etc).
I would like to base this on powershell. I havent done that much powershell, so thought this would be a good way learn abit more
This is what I have come up with so far. If I can get it to work I will add a simple gui later on.
<# Browser version must be IE or I will be redirected away from login site#>
$userAgent = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT; Windows NT 6.1; en-US)'
<# CCMA server login page#>
$baseUrl = "
<# Link to real time display#>
$displayURL = "
<# login process #>
$url = Invoke-WebRequest $baseUrl -SessionVariable ccmalogin -UserAgent $userAgent
$url.Forms[0].fields["UserID"] = "my display user"
$url.Forms[0].fields["Password"] = "my display password"
$result = Invoke-WebRequest $baseUrl -WebSession $ccmalogin -UserAgent $userAgent -Body $url -Method Post
<# start display #>
start $displayURL
Right now I have the following issues.
If I do a MANUAL login from the ccma website and run my script, it will launch the correct display.
If I run the script without a working running session, it will just launch the CCMA login site.
Something must be wrong with my login request then
Im getting a active X promt when running the script. Manual launch does not give this. I can click OK and it the loginsite will launch
Any obvious errors?
We have alot of real time displays across our callcenters. Im working on a better solotion, when our support team needs to restart a display which takes some time (login, menu, browse etc).
I would like to base this on powershell. I havent done that much powershell, so thought this would be a good way learn abit more
This is what I have come up with so far. If I can get it to work I will add a simple gui later on.
<# Browser version must be IE or I will be redirected away from login site#>
$userAgent = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT; Windows NT 6.1; en-US)'
<# CCMA server login page#>
$baseUrl = "
<# Link to real time display#>
$displayURL = "
<# login process #>
$url = Invoke-WebRequest $baseUrl -SessionVariable ccmalogin -UserAgent $userAgent
$url.Forms[0].fields["UserID"] = "my display user"
$url.Forms[0].fields["Password"] = "my display password"
$result = Invoke-WebRequest $baseUrl -WebSession $ccmalogin -UserAgent $userAgent -Body $url -Method Post
<# start display #>
start $displayURL
Right now I have the following issues.
If I do a MANUAL login from the ccma website and run my script, it will launch the correct display.
If I run the script without a working running session, it will just launch the CCMA login site.
Something must be wrong with my login request then
Im getting a active X promt when running the script. Manual launch does not give this. I can click OK and it the loginsite will launch
Any obvious errors?