Hi All,
Firstly I appologise if this is really easy or I explain it really bad, but I am new to all this powershell / database gubbins - using for about 1 week...
I am trying to pull out the call logs - user comments, analyst comments etc from a table of a call logging system (Service Centre System Manager). I can find all the details i need for the call and can get it to pull out the information when there is a single log attached, but when there are multiple logs the procedure fails.
example 1-
get-scsmobject -class $actionlogclass -computername d-sm01| where-object {$_.DisplayName -match "ef4982e9-4f95-4d11-9c21- b4d27ccca3b1"} |format-list Description, EnteredBy, EnteredDate
returns
Description : Please can you look into this incident ASAP. Thanks
EnteredBy : Ashley Elms
EnteredDate : 31/01/2012 15:53:51
Where there are multiple logs attached to a single call, I have found all the ID's for the logs and defined them as a variable $Log.
So $Log looks like this
ef4982e9-4f95-4d11-9c21-b4d27ccca3b1
bd4ad5bc-367f-4ad5-beb3-7806daa116d6
37d4edf3-d31e-4e83-9150-4731effee75d
and I was hoping I could have simply replaced the specific ID on the above example with $Log
example2
get-scsmobject -class $actionlogclass -computername d-sm01| where-object {$_.DisplayName -match $log} |format-list Description,
EnteredBy, EnteredDate
returns nothing
However, if $log = "ef4982e9-4f95-4d11-9c21-b4d27ccca3b1" - the value specified in example1, it returns as expected...
Description : Please can you look into this incident ASAP. Thanks
EnteredBy : Ashley Elms
EnteredDate : 31/01/2012 15:53:51
therefore I know it works with single values
So,
how do iget it to loop through the $log variable to return all the deteils of the call log we want?
Any help is greatly apprecaited
Thanks
Ed