Locating a job from the find list

Paul Watson (101 posts)
April 12, 2016 02:59 PM
Accepted Answer
From the find results dialog, the job can be opened and edited. How would I see the path in adTempus to the group where the job exists?
Bill Staff (599 posts)
April 12, 2016 03:23 PM
Accepted Answer

There's no way to get that information from the Find window. I will write that up as an enhancement as well.

You can leave the Find window open, then go back to the Console and use Tools > Go to Job to open the Go To window. Here you can type in a name and it will show you the matching job(s) including the group.

The other option is to use scripting. I posted a knowledge base article here based on the PowerShell script I suggested yesterday for your question about saving search results. I just updated the script in the article so it will print the full path for the job, rather than just the name.

 

Paul Watson (101 posts)
April 14, 2016 07:42 AM
Accepted Answer
Using Tools > Go to Job is a good idea. However, if the same job name is used in multiple groups, then it would not really specify the one in the Find window. There would be identical job names if there were groups for DEV, TEST, UAT, and PROD.
Bill Staff (599 posts)
April 14, 2016 09:28 AM
Accepted Answer

That's a good point. The Go to Job window will list all the jobs with that name, but you still won't know which one the Find tool was referring to.

Looks like the PowerShell script is the best workaround for now.

Paul Watson (101 posts)
April 14, 2016 10:23 AM
Accepted Answer
The script is working. Is it possible that the location of the match might also be output? It would be helpful to know if the match came from documentation, variable, trigger, step, or response.
Bill Staff (599 posts)
April 15, 2016 07:40 AM
Accepted Answer
Updated the article with a new version of the script. Add "-details" to the command line to get the complete location information.
Paul Watson (101 posts)
April 15, 2016 08:08 AM
Accepted Answer

Working under Powershell 4.0, but not under 2.0.

PS D:\DW_Devl\Paul\phs_dmx_config\bin> $PSVersionTable

Name Value
---- -----
CLRVersion 2.0.50727.5485
BuildVersion 6.1.7601.17514
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1


PS D:\DW_Devl\Paul\phs_dmx_config\bin> .\adt-search.ps1 -find "BEGIN_Catalyst"
Add-Type : Could not load file or assembly 'file:///C:\program files\arcana development\adtempus\4.0\ArcanaDevelopment.adTempus.Client.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be load
ed.
At D:\DW_Devl\Paul\phs_dmx_config\bin\adt-search.ps1:6 char:9
+ add-type <<<< -path "c:\program files\arcana development\adtempus\4.0\ArcanaDevelopment.adTempus.Client.dll"
+ CategoryInfo : NotSpecified: (:) [Add-Type], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand

Unable to find type [ArcanaDevelopment.adTempus.Client.Scheduler]: make sure that the assembly containing this type is loaded.
At D:\DW_Devl\Paul\phs_dmx_config\bin\adt-search.ps1:7 char:56
+ $adtempus=[ArcanaDevelopment.adTempus.Client.Scheduler] <<<< ::Connect($server,[ArcanaDevelopment.adTempus.Shared.LoginAuthenticationType]::Windows,"","")
+ CategoryInfo : InvalidOperation: (ArcanaDevelopme...lient.Scheduler:String) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound

Bill Staff (599 posts)
April 15, 2016 08:26 AM
Accepted Answer
The adTempus assemblies are built against .NET 4 and cannot be loaded by the .NET 2 runtime that PowerShell 2 uses by default. You can tell PowerShell to use .NET 4: see this discussion. Use the solution that modifies "powershell.exe.config", not the one that involves setting Registry values.
Paul Watson (101 posts)
April 15, 2016 08:39 AM
Accepted Answer

Yes, one should clearly avoid registry changes. But, even the config file approach is said to be "unsupported."

This may be a way to get a modern-day version of Powershell installed on the machine. I will try that first.

Replies are disabled for this topic.