Use msdb go select distinct j.Name as "Job Name", --j.job_id, case j.enabled when 1 then 'Enable' when 0 then 'Disable' end as "Job Status", jh.run_date as [Last_Run_Date(YY-MM-DD)] , case jh.run_status when 0 then 'Failed' when 1 then 'Successful' when 2 then 'Retry' when 3 then 'Cancelled' when 4 then 'In Progress' end as Job_Execution_Status from sysJobHistory jh, sysJobs j where j.job_id = jh.job_id and jh.run_date = (select max(hi.run_date) from sysJobHistory hi where jh.job_id = hi.job_id )-- to get latest date
The below PowerShell script retrieves the following for the given SharePoint Online Site All the Sub-site's URL Security group attached with each Sub-site with their permission level Prerequisites: This PowerShell script uses the latest version of SharePoint Online PnP Module. Download the installer from https://github.com/SharePoint/PnP-PowerShell/releases Install-Module SharePointPnPPowerShellOnline Install-Module - Name ' SharePointPnP.PowerShell.Commands.Files.Recurse ' function connect - site( $webs , $creds ){ Connect - PNPonline - Url $webs - Credentials $cred } function get - sitepermission( $web , $cred ){ $rec =@() connect - site - webs $web - creds $cred if ( $web - eq $parentsitename ) { #Write-Host "Parent site permission" $web $Pgroups =G...
Comentarios