-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate_search.ps1
30 lines (24 loc) · 1.09 KB
/
template_search.ps1
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
27
28
29
30
#find a set of report guids in the webtrends templates.
#since the templates contain a number of matches, for the chapter,
#graphs and tables, strip out everything except the chapter.
C:\wtdata\storage\config\wtm_wtx\report_templates
{wtservice} [21]--> $guids
Wn1jvsPfuT6
Wn1jvsPfuT6
Wn1jvsPfuT6
$guids = ("Wn1jvsPfuT6","Wn1jvsPfuT6","Wn1jvsPfuT6")
gci -Recurse -Filter *.wct | %{ foreach($r in $guids){Select-String -Path $_.FullName -Pattern $r | ?{$_.Line -match "Chapter"}}}
C:\wtdata\storage\config\wtm_wtx\report_templates
{wtservice} [23]--> gci -Recurse -Filter *.wct | %{ foreach($r in $guids){Select-String -Path $_.FullName -Pattern $r | ?{$_.Line -match "Chapter"}}}
rcent\flrdacbkoji.wct:7556:pageid = dynamictablesWn1jvsPfuT6Chapter1
rcent\flrdacbkoji.wct:7556:pageid = dynamictablesWn1jvsPfuT6Chapter1
rcent\flrdacbkoji.wct:7556:pageid = dynamictablesWn1jvsPfuT6Chapter1
Get-Child-Item -Recurse -Filter *.wct |
Foreach-Object {
foreach($r in $guids){
Select-String -Path $_.FullName -Pattern $r |
Where-Object {
$_.Line -match "Chapter"
}
}
}