Powser Shell Script to Purge Computer Records from SCCM

Hello!
I have built a collection in Configuration Manager to bring in a list of computers that have duplicate names. Here is the query that I am using.
select R.ResourceID,R.ResourceType,R.Name,R.SMSUniqueIdentifier,R.ResourceDomainORWorkgroup,R.Client from SMS_R_System as r   full join
SMS_R_System as s1 on s1.ResourceId = r.ResourceId   full join SMS_R_System as s2 on s2.Name = s1.Name   where s1.Name = s2.Name and s1.ResourceId != s2.ResourceId
I am building a PowerShell Script to obtain the names of the computer resources stored in the above SCCM 2012 collection and place them in a variable. Next,
I want to obtain the computer resources (e.g., ddr records) and store them in a 2ed variable using the first variable to pipe in the data. I am using a “ForEach” looping construct to accomplish this. Lastly, I want to purge the computers records from the Configuration
Manager database that are stored in the second variable which came from the computers names of the specified SCCM collection. I am attempting to use this line of code within my loop to purge the computer records from SCCM:
$compObject.psbase.syncroot | % { $_.psbase.delete()
Here is a
blog I found suggesting this line of code.
What I have discovered is rather interesting. My script works as intended, but even though the correct records  ARE
being purged. The above line of code is returning an error.
You cannot call a method on a null-valued expression.
At line:18 char:35 + $compObject.psbase.syncroot | % { $_.psbase.delete() }
+                                   ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
I have a few questions:
Does anyone know why this is occurring?
Is there a different approach or code I should be using instead to purge the collected data?
Here is my full script:
#// required parameters
$SCCMServer
= "MySiteServer"
$sitename
= "PS1"
$collectionID
= "PS1009c8"
#// Obtain collection members from $collectionID
$SMSClients
= Get-WmiObject
-Query "SELECT * FROM SMS_FullCollectionMembership WHERE CollectionID='$collectionID' order by name" 
-ComputerName $SCCMServer
-Namespace  "ROOT\SMS\site_$sitename"
#//looping construct to loop through all the colection members
ForEach ($SMSclient
in $SMSclients) {
#// Loads computer records one at a time into $compobject variable using a ForEachloop to be deleted
$compObject
= get-wmiobject
-query "select * from SMS_R_SYSTEM WHERE Name='$($smsclient.name)'"
-computername $SCCMServer
-namespace "ROOT\SMS\site_$sitename"
#// Delete’s computer objects one at a time in $compObject variable from CM12 database
$compObject.psbase.syncroot
| % {
$_.psbase.delete() }
--Tony

Daniel
Have you ever used Orchestrator to kick off your Powershell scripts? I am using System Center 2012 R2 Orchestrator, and trying to use the "Run .Net Script" action to launch my Powershell code, but the process is failing.  When I run the code
from within PowerShell and RunBook Tester the code executes as it should. When I run it from the RunBook I receive this error:
Exception calling "Delete" with "0" argument(s): "Generic failure "
Just curious if you had any thoughts why my code was blowing up in an Orchestrator RunBook when it works fine within PowerShell? My full code is below.
#// required parameters
$SCCMServer = "MySiteServer"
$sitename = "PS1"
$collectionID = "PS1009c8"
#// Obtain collection members from $collectionID
$SMSClients = Get-WmiObject -Query "SELECT * FROM SMS_FullCollectionMembership WHERE CollectionID='$collectionID' order by name" -ComputerName $SCCMServer -Namespace "ROOT\SMS\site_$sitename"
#//looping construct to loop through all the colection members
ForEach ($SMSclient in $SMSclients) {
#// Obtains and deletes the SCCM computer records one at a time using a ForEachloop
Get-WmiObject -query "select * from SMS_R_SYSTEM WHERE Name='$($smsclient.name)'" -computername $SCCMServer -namespace "ROOT\SMS\site_$sitename" |
ForEach-Object { $_.Delete() }

Similar Messages

  • I need a shell script to move latest archivelogs from one server to another server..

    Hi,
         I need a shell script to move latest archivelogs from one server to another server..
    Thanks&Regards,
    Vel

    ea816fb9-f9ea-45ac-906f-36a8315970d0 wrote:
    Thanks it's really helpfull..
    Now i have pasted a shell script which generates archivelog and shows latest archivelog time..
    just check let me know the answer, that how i need to execute it..
    # Force a logswitch to get the last archivelog to the standby host
    ORACLE_SID=ORCL
    ORAENV_ASK=NO
    . oraenv >/dev/null 2>&1
    SwitchLogfile()
      # Do logswitch 
      RESULT=`echo "Alter system switch logfile;" | sqlplus -S / as sysdba | grep 'System altered'`
      if [ "$RESULT" = "System altered." ]
      then
      export RETURN=1
      else
      export RETURN=0
      fi
      # Do we need to do something with this return value?
      export RETURN
    GetArchiveTime()
      CURYEAR=`date +%Y`
      echo "set heading off;" > temp.sql
      echo "set termout off;" >> temp.sql
      echo "select to_char(first_time,'YYYY-MM-DD HH24:MI:SS') from v\$archived_log where sequence#=(select sequence# - 1 from v\$log where status='CURRENT');" >> temp.sql
      sqlplus -S / as sysdba <
    spool tempres.txt
    @temp.sql
    quit
    EOF
    cat tempres.txt | grep ${CURYEAR} | grep -v grep | awk '{print $1" "$2}'
    #rm -f temp.sql  tempres.sql
    SwitchLogfile
    GetArchiveTime
    You seem to have ignored Dude's VERY good advice and continue to press down this ill-advised path.  If you continue this approach, you WILL have problems at the very time you do not need any additional problems.  Trying to recover your production database at 2:00 in the morning is not the time to be getting errors from rman because it can't find what it needs - because you decided to move them around yourself.
    Please reconsider.

  • Skeleton Shell script needed to start jClient from prompt

    Hi,
    we like to call a class which uses an application module directly from command line. I wrote a little shell script which wraps the direct "java myClass" call (later on, we plan to use cron for automatic calls).
    We use the Configuration.createRootApplicationModule method for creation of our application module (the class and the bc4j.xcfg are both packed in the same jar).
    We run into some issues concerning setting the correct classpath:
    I suppose our classpath isn't set properly.
    Can anyone give me a list of BC4J jars (and other standard Oracle JARS) that must be in the classpath in that specific order? (incl. location where to find)
    Or maybe an extract of your shell script if any exists.
    Many thanks,
    Stefan

    Hi Arno,
    thank you for your help.
    @All:
    Below please find a working script to start a batch job(which uses an application module in local mode) under a linux environment where Oracle 10g iAS is installed.
    Have fun.
    Stefan
    # set up your directory where iAS 10g is installed
    IAS_HOME=/usr/bin/oracle/product/appserv
    export IAS_HOME
    # set path for proper lookup of java.bin
    export PATH=$PATH:$IAS_HOME/jdk/bin
    # minimum amount of jars to start an application module
    CLASSPATH=$CLASSPATH:$IAS_HOME/BC4J/lib/bc4jmt.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/BC4J/lib/bc4jct.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/BC4J/lib/bc4domorcl.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/BC4J/lib/collections.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/BC4J/lib/bc4jimdomains.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/BC4J/jlib/bc4jdomgnrc.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/jdbc/lib/classes12.zip
    CLASSPATH=$CLASSPATH:$IAS_HOME/lib/xmlparserv2.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/jlib/jdev-cm.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/jlib/ojmisc.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/jlib/share.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/j2ee/home/lib/ojsp.jar
    CLASSPATH=$CLASSPATH:$IAS_HOME/j2ee/home/jsp/lib/taglib/ojsputil.jar
    # define further project specific APIs here (e.g. Batch-Job JARs, Apache Jakarta FOP JARs)
    export CLASSPATH
    # set java options (here: allow minimum of 512 Mb and a max. of 1 GB of heap memory) and start Batch-Job
    java -Xms512m -Xmx1g MyBatchJob

  • [Solved] Shell script to read unhashed lines from file.

    Hello.
    I want to write a shell script  (it can be bash,sh,ksh,csh or zsh) that will be:
    1.Read unhashed lines from file named mirrors.conf.
    2.Put them in ~/.profile as PKG_PATH=line catted from mirrors.conf.
    Just like as mirrors.conf file for pacman.
    Now it can cat lines but how to put them in files as PKG_PATH?
    Thanks for answers.
    Last edited by SpeedVin (2010-03-01 17:33:20)

    res wrote:
    ^ IFS is not necessary here; it won't mess with the white space:
    $ echo 'args with formatted spaces ' | while read -r; do echo "$REPLY"; done
    args with formatted spaces
    It matters for leading/trailing whitespace:
    $ echo ' after some ' | while read -r line; do echo "<$line>"; done
    <after some>
    $ echo ' after some ' | while IFS= read -r line; do echo "<$line>"; done
    < after some >

  • Running a shell script in a Cocoa-Applescript, from the Resources folder?

    Hello!
    I need to use a bash script, but the script must be IN the application. I placed them in the "Supporting files", but i am not able to find them using "do shell script"
    Thanks!

    If you stick the script in the Resources folder you can get it by
    path to resource "Bash Script"
    If you want to put it in the folder Supporting files you need to construct the path
    (path to me as string) & "Contents:Resources:Supporting files:Bash Script"
    (where Bash Script is the name of your script)
    Don;t know if there is a shorter way for the second case.

  • Deleted computer object from SCCM console, so why is it still appearing in SSRS reports?

    We recently divested about 400 computers from our network. I got a list of these computers and deleted them from both Active Directory and in the SCCM Console. I know the deletes were successful because when I search via device name in the SCCM console
    they no longer show up. Yet when I run one of our inventory reports in SSRS I still see several of the devices that I deleted listed there. I thought SSRS represented a" live view" of the SCCM database. If that's true then how can a computer object
    that I deleted in the console still be present in the database? Is there something I'm missing? 

    Okay you are saying to select from v_R_System_Valid instead of v_R_System in my query and that will automatically filter out items I removed in the console? Okay that sounds like what I want, the only problem is my query is selecting form v_GS_COMPUTER_SYSTEM.
    Can I just add "_Valid" to the end of that and achieve the same result?
    Update - Yeah no I tried that and it did not work. Clearly I have a very limited understanding of the SQL views. Interestingly enough Torsten I see you posted a linbk on your blog to a new Microsoft article that documents the SQL views in SCCM 2012. Looking
    at it now...

  • Executing a shell script from a Trigger

    All,
    I have to write a script to do the following requirement.
    There is a file called BUSINESS_DATE.TXT.
    This file get updated once the oracle partition created. In Oracle, Partition will be created every day. There is a seperate script scheduled to take care ORACLE partition creation.
    The above file will have only one row. i.e
    03092012
    If Oracle partition creation job failed, the above file won't be updated.
    My requirement is,
    I have to check whether the BUSINESS_DATE file is updated today or not. If yes, I will have to move the files from common area to input file directory to process those files.
    All file name will amend with current date.
    i.e
    LIDDIFD03092012.TXT
    The key part is to check the BUSINESS_DATE.TXT file is updated properly or not.
    We don't know what time the file will get updated. So we are planning to schedule the new script to run for every 15 mins to check whether the file is updated or not
    But...I just thougt instead of writing a shell script to do the above one, Why shouldn't I capture the date in a table (New table needs to be created) and use ORACLE TRIGGER to run the shell script to move the files from common area to input file directory to process those files?
    My Proposal in ORACLE :
    Create table business_date
    rep_date varchar(15),
    curr_timestamp timestamp
    Once the oracle partition created , one row will be inserted into the above table. This adjustment needs to be implemented partition script.
    Once this table get record, TRIGGER should call SHELL SCRIPT to move the files from common area to input area.
    If I implement ORACLE TRIGGER, The script which will check whether the file got updated or not for 15 mins is not required. Right? Inputs from experts are welcome!

    >
    But...I just thougt instead of writing a shell script to do the above one, Why shouldn't I capture the date in a table (New table needs to be created) and use ORACLE TRIGGER to run the shell script to move the files from common area to input file directory to process those files?
    >
    Triggers should not be used to do transactional work. There is no COMMIT in a trigger. What happens if the trigger runs the shell script and then a ROLLBACK occurs? You will have run the shell script when it shouldn't run.
    Create a stored procedure to run the shell script. Call the stored procedure when the partition is created.
    If you were using 11g and interval paritioning you wouldn't need to create the partitions manually. Oracle could create the partitions automatically.

  • Unix shell script wont execute from ODI

    Hi All.
    I have an interface that calls a shell script to append a record number to a flat file. The shell script is  called by the Execute OS command action.
    This works fine in our dev environment as we have migrated the code to a new environment it no longer works.
    The error I'm getting from the session task is "wrong process code: 127" and from the session step
    ODI-1226: Step Append Record Number into the file fails after 1 attempt
    ODI-1242: Operating System command execution fails
    I'n calling the shell script as below:
    sh xxc_rms_append_record_number.sh
    The shell is in the same directory as the agent i.e. agent/bin
    Thanks in adavance
    Guy

    Hi ,
    I assume you are using ODI 11g.
    Please try / check the below steps --
    1> Try to use OdiOsCommand instead of OSCommand .
    2> Try to execute the shell script in the directory in the path you want to run (not from ODI)
    3> Recheck the path whether you should run in that directory or not (Environment wise directory can be changed)
    Thanks

  • Call Unix Shell Script From OBIEE

    Hi All,
    Is it possible to do a call to a Unix Shell Script with the Action Framework from OBIEE.
    Thanks in Advance

    I dont think so but we can go for it instead of BI side. Try to port the same functionality on shell script side, so that the script can identify your report using tail of nqquery log and execute the rest of your lines in shell script.
    This can doable and works as expected. If at all you are going with my suggestion you can go for a small key word to identify your report instead of that lengthy logical query.
    Pls mark if helps

  • Passing password from shell script to Java

    Hi there,
    I have a shell script which has user id and password stored in variables. I call a java program from this shell script. I tried accessing this environment variable from java using system.getproperty and java is not getting the values. I have used export USERID PASSWORD
    and java classname to call it.
    I do not want to pass it as arguments because of security reasons. can anybody help me please.
    Thanks a bunch.

    Hi there,
    I have a shell script which has user id and
    password stored in variables. I call a javaprogram
    from this shell script. I tried accessing this
    environment variable from java using
    system.getproperty and java is not getting the
    values. I have used export USERID PASSWORD
    nd java classname to call it.
    Presumably you are using one of the newer java
    versions.
    Questions
    1. What statements are you using to set, export and
    run java?
    2. What shell are you using?
    3. How are you accessing the vars in java?
    I do not want to pass it as arguments because of
    security reasons. can anybody help me please.
    That is nonsensical. Putting it in env vars exposes
    it more than passing it as args.Thanks for replying jschell.
    1. I am using newer version java 1.5
    2. shell scripts gets it's variables from oracle reports through webservices.
    3. to run java i use java javaclassname3. I used EXPORT variablename and in java called system.getproperty(variablename)But system.getproperty is getting a null.
    And the decision about not passing it as args was made by our client. They think it's not safe to pass password.
    are they wrong??
    Please help me.

  • New to shell script need help for script

    Hi,
    I have following shell script which takes database name from file sql.config. this file has names of all staging database. I want to modify this script to run below analyze index commands if database is staging and if its production database then i want to run different set of commands say analyze user schemas. How can i implement this in below script (something like if then else)?
    connstr=`grep "gemsit_staging" /cronacle/tools/informatica/sql.config`
    sqlplus -S<<EOF1
    $connstr
    whenever sqlerror exit failure;
    ANALYZE TABLE GEMSIT_STAGING.AR_TRANS_DETAIL_STG COMPUTE STATISTICS;
    ANALYZE TABLE GEMSIT_STAGING.GLOBAL_SET_S COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_DEL_TRANS_DETAIL_STG_PK COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_DEL_TRANS_DETAIL_STG_01 COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG_PK COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG01_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG02_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG03_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG04_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG05_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG06_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.AR_TRANS_DETAIL_STG07_IX COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.GLOBAL_SET_S_PK COMPUTE STATISTICS;
    ANALYZE INDEX GEMSIT_STAGING.GLOBAL_SET_S_PK1 COMPUTE STATISTICS;
    EOF1
    thanks

    if test $? -ne 0 ; then
                                    echo 'Processing Error' >> $Log_Dir/$Log_File
                                     exit 1
                            else
                                    echo 'Processing Completed' >> $Log_Dir/$Log_File
                                    rm -f  $Script_Dir/$Flag_File
                                     exit 0
                            ficreate two sql files one form test and for prod say test.sql and prod.sql with relevant sql statements
    this is a sample if else construct, you nned to get the env using "host"/"hostname" cmd on linux and assign this to a variable say envname
    if envname $? -ne 'PR' ; then
                                    echo 'Processing Test SQL' >> $Log_Dir/$Log_File
                                     <call the test sql here>
                                     exit 1
                            else
                                    echo 'Processing Prod SQL' >> $Log_Dir/$Log_File
                                   <call the Prod sql here>
                            fi

  • Shell Script not getting invoked in File adapter

    Hi all,
    Requirement:
    PI need to pick the file from source directory and send it to target directory using SFTP.
    I'm using SCP command for this purpose.
    When I run the shell script (with simple SCP command) from command prompt, script is working fine.
    Same script is called from PI File adapter but script is not getting invoked.
    In the communication channel logs, "Executed OS command" is available. There are no Error/Warning messages in the log.
    NFS transport protocol is used in the File communication channel.
    Complete directory path of the shell script is mentioned in File channel -> Run Operating System command after message processing.
    Even the following simple command is not working from PI receiver file channel:
    echo "Test file" >> /data/test.txt
    Please let me know if I'm missing out something.
    Thanks,
    Geetha

    Hi Geetha,
    I think the syntax u are using is not correct. Please follow the below syntax:
    /path/<script_name> %F
    for ex: /staging/Interface/XI/Script/FTPData %F
    use the above in the communication channel.
    %F should be after a space.
    FTPData is the script name
    /staging/Interface/XI/Script/ is the location where the script is present
    Cheers,
    Souvik
    Edited by: Souvik Chatterjee on Apr 14, 2011 3:38 PM

  • PL/SQL function - unix shell script

    Hello,
    I have an application that calls a unix shell script This unix shell script calls a oracle function in the PL/SQL package. For example,
    In package pkg_test, there is function f_test. This function returns pls_interger.
    How can I write a unix shell script to return the value from the oracle function, so that the application can get the value from the unix shell script?
    Many thanks.

    Thank you for your response.
    The Oracle functuion pkg_name.proc_name will return different values, 0, 1, 2, 3 in diffefrent conditions.
    The unix script, myscript.ksh calls pkg_name.proc_name.
    The other application will call myscript.ksh and this application will need to get the values 0, 1, 2, 3 from myscript.ksh.
    Can we make it without using the unix shelll function?
    Thanks.
    Edited by: slsam01 on Jun 2, 2009 9:21 PM

  • Using shell scripts on Unix machine within Servlet or JSP

    Hi,
    I have to write a web application that lists all print jobs on a Unix machine and allows them to be deleted.
    There will be two shell scripts on the Unix machine: list_printjobs and delete_printjobs which recieve parameters and return exit values if suceeded or not.
    My question now is, how can I use those shell scripts on the Unix machine from within a Servlet or JSP?
    Thanks,
    Frank

    In order to run any shell command you need to look at the Runtime.exec() method.
    Check out [this article|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]

  • Executing shell script using OSLinetoken fetchlet

    Hii,
    I do have a requirement. I need to use a shell script in the OSLineToken fetchlet. In response metric i will be checking whether the directory exists or not on the server. In order to check the existence of the directory, i have created a shell script. But how can i relate its result with the Response metric? The shell script is as follows:
    Shell Script:
    if test -d $1 ; then
    echo "DIR exist"
    else
    echo "false"
    fi
    The Response metric for the same will be:
    <QueryDescriptor FETCHLET_ID="OSLineToken">
         <Property NAME="command" SCOPE="GLOBAL">
              sh {dir_name where the shell script is uploaded}/{shell script file name} {dir_name_parameter} </Property>
         <Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
         <Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
    </QueryDescriptor>
    Please suggest what is the use of em_result here?
    once the existence of the directory is checked, if it up then i need to call another shell script in order concatenate the contents of all the files with extension .log(this will be the parameter of shell script). Get the output from shell script and display it into custom management plug-in. As i am using cat *.log>>consolidatefile command to concatenate the data, i need to read consolidatefile file from the server and return this concatenated file data into plug-in. Again, how can i read the content of consolidatefile file in EMF? I will be creating another matric for this purpose say "read_content". the querydesciptor of the same will be as follows:
    <QueryDescriptor FETCHLET_ID="OSLineToken">
         <Property NAME="command" SCOPE="GLOBAL">
              sh {dir_name where the shell script is uploaded}/{shell script file name} {dir_name_parameter} {extension of the files to concatenated} </Property>
         <Property NAME="startsWith" SCOPE="GLOBAL">em_result=</Property>
         <Property NAME="delimiter" SCOPE="GLOBAL">|</Property>
    </QueryDescriptor>
    I am not sure which all properties to be used in this case..I have seen multiple sample files some of them uses perbin, scriptsdir but some of them does not..The related pdf also does not say anyhting about such kind of properties. Please suggest.
    I hope the explaination of the problem is not so cumbersome. Please let me know if you have any query to understand.
    Thanks,
    AS

    If you notice, localScriptsDir is a directory within scriptsDir. If you package your plug-in up and deploy it through the UI, any scripts you create will go into %scriptsDir%/emx/<target_type>. So localScriptsDir just specifies that directory for you. You don't need it but then in the command paramater you'll have something like:
    sh %scriptsDir%/emx/yourtargettype/yourscript...
    So whether you specify it in the command or another property (localScriptsDir) doesn't really matter.
    You can create your own properties in the QueryDescriptor. Just make sure you have the correct scope specified and it should be fine (options for scope are described in the Enterprise Manager DTD section of the Extensibility Guide).
    Metric collection isn't really meant for dynamic specification of input parameters. I can think of a few solutions:
    1) Create a target instance for each log directory. When you create the instance, the directory is specified. If you need to monitor a different directory, you can just create another instance. Upside is that it's flexible and scalable, and also, when you get an error you'll know exactly which directory it is based on which instance throws the error. Downside is that you have to have a separate instance for each directory.
    2) If the log directories are well known and finite (and won't change names), hardcode them into the target metadata. Have a different metric collect for each log directory, so you'll have as many metrics as log directories you want to monitor. Even if the names of the directories are different, you can use instance properties to map them, so if you know there will always be 5 log directories you want to monitor, you can have 5 instance properties to map the names into the metrics, although this won't work if you don't have the same number each time. Upside is that there is only a single target instance. Downside is that it's not as flexible.
    3) Use a job rather than a target type to find out this information. You could create a new job type which scans the logs for information and have the directory as an input parameter to the job. You could have this job on a repeating schedule to duplicate the effect you are trying to get out of creating a target type. The upside is that you can start the job whenever you want from the UI and specify exactly which directory whenever you run it. The downside is that the job system is centered on the OMS rather than the agent, so every time it runs it will have to contact the agent to do the work. In the case of the target type, the agent acts autonomously without contact from the OMS.
    There are probably other options, but these are the quick ones off the top of my head.
    Chris

Maybe you are looking for

  • In app photos how do you delete pictures ipad 2

    In apps photos how do you delete pictures ipad 2 ?

  • Manage Passwords List Empty

    Starting about 1 week ago all of the passwords in my "Manage Password" list under client security are gone.  I know I didn't back them up, so I started to enter some of the passwords back fully intent when I had at least 10 or 15 passwords to back it

  • Tango svg icons in KDE not correct

    How do i fix this. I use the Tango icon set (in kde 3.5.3) because the icons are easy to recognize, especially at 16x16. if you look at this: [URL=http://img121.imageshack.us/my.php?image=tangoinkde7wy.png][/URL] i enlarged the icons for the purpose

  • Can't 'Delete Rejected Photos' (since Lightroom 5.6?) - just removes from catalog, not disk

    I use Lightroom 5 (64-bit) on Windows. Recently (possibly since the 5.6 upgrade?) I can't delete rejected photos from the catalog. Instead of asking if I want to delete from the disk or just the catalog or cancel, like it used to, it now asks if I wa

  • Working with Agilent 54XX VIs, want to change control style

    I'm writing a master control VI for an Agilent 54624A oscilloscope that uses a USB/GPIB connection, using the VI libraries that LabVIEW has.  When I create a control for one of the VIs by right-clicking on an input terminal, the master VI drops down