Hi,
the Account which started a Orchestrator Runbook through Web Services in column 'Createdby' from table [Microsoft.SystemCenter.Orchestrator.Runtime.Internal].Jobs.
You can get this SID using this Query:
declare
@CreatedByJobsTemp nvarchar(50)
,@RunbookIdJobsTemp uniqueidentifier
,@ParentIdJobsTemp uniqueidentifier
,@IdJobsTemp uniqueidentifier
,@ProcessIDInstanceTemp int
select
@CreatedByJobsTemp = Jobs.CreatedBy
,@RunbookIdJobsTemp = Jobs.RunbookId
,@ParentIdJobsTemp = Jobs.ParentId
,@IdJobsTemp = Jobs.Id
,@ProcessIDInstanceTemp = Instance.ProcessID
from
[Microsoft.SystemCenter.Orchestrator.Runtime].[Jobs] as Jobs with (nolock)
inner join
[POLICIES] as Runbooks with (nolock)
on Jobs.RunbookId = Runbooks.UniqueID
inner join
[POLICYINSTANCES] as Instance with (nolock)
on Instance.JobId = Jobs.Id
where
Jobs.Status = 'Running'
and Runbooks.Name = '`d.T.~Ed/{941F35C3-B853-463B-8C55-CC15F600F64A}.{484FE830-C6EA-44EE-85DF-B050364FBCE6}`d.T.~Ed/'
and Instance.ProcessID = '`d.T.~Ed/{941F35C3-B853-463B-8C55-CC15F600F64A}.{9D8A22DF-4B23-4DF5-8857-D502E8D9DE32}`d.T.~Ed/'
while
(select @ParentIdJobsTemp) is not null
begin
declare @ParentIdJobsTest uniqueidentifier
select @ParentIdJobsTest = @ParentIdJobsTemp
select
@CreatedByJobsTemp = Jobs.CreatedBy
,@RunbookIdJobsTemp = Jobs.RunbookId
,@ParentIdJobsTemp = Jobs.ParentId
,@IdJobsTemp = Jobs.Id
,@ProcessIDInstanceTemp = Instance.ProcessID
from
[Microsoft.SystemCenter.Orchestrator.Runtime].[Jobs] as Jobs with (nolock)
inner join
[POLICIES] as Runbooks with (nolock)
on Jobs.RunbookId = Runbooks.UniqueID
inner join
[POLICYINSTANCES] as instance with (nolock)
on Instance.JobId = Jobs.Id
where
Jobs.Id = @ParentIdJobsTest
end
select
@CreatedByJobsTemp
Where the Pulished Data are the RunbookName and the Published Data from a previous Acrivity.
You can get the Acount from the SID with Powershell:
$objSID = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-21-4224239753-3541631238-4107968523-500")
$objUser = $objSID.Translate( [System.Security.Principal.NTAccount])
$samaccountname=($objUser.Value).split('\')[1]
Regard,
Stefan