-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathInvoke-IPccDispatch.ps1
More file actions
26 lines (24 loc) · 964 Bytes
/
Invoke-IPccDispatch.ps1
File metadata and controls
26 lines (24 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
param (
$Sender
)
begin {
function Get-IPRadarURL {
param(
$IPPCFolder
)
((Get-ChildItem -LiteralPath (Join-Path -Path $env:appdata -ChildPath ".purple\logs\jabber\jbrasser@jabber.ipsoft.com\$IPPCFolder") |
Sort-Object LastWriteTime | Select-Object -Last 1 | Get-Content -Raw) -split '(https.*?\d{8})')[3]
}
function Get-IPimURL {
param(
$IPPCFolder
)
((Get-ChildItem -LiteralPath (Join-Path -Path $env:appdata -ChildPath ".purple\logs\jabber\jbrasser@jabber.ipsoft.com\$IPPCFolder") |
Sort-Object LastWriteTime | Select-Object -Last 1 | Get-Content -Raw) -split '(https.*?\d{8})')[1]
}
}
process {
$Sender | Out-File -Append -FilePath C:\Script\Log\Dispatch.log
(Get-Date).ToString('yyyy-MM-dd HH:mm:ss') | Out-File -Append -FilePath C:\Script\Log\LastRun.log
Get-IPRadarURL -IPPCFolder ($Sender -replace '/.*')
}