Tuesday 25 November 2014

Listing Configuration Manager Security Scopes Assigned to a Task Sequence

Today I had a problem. I wanted to create a spreadsheet that included the following information about task sequences in a customer's System Center 2012 SP1 Configuration Manager environment:

- Task sequence name
- Task sequence description
- Task sequence security scope

When listing this information to the screen it was OK, but when sending it to a .csv file, the 'SecuredScopeNames' was being recorded as 'SystemString' and not the actual value I wanted.

A colleague spent 20 minutes looking at this for me as I was lost and he figured it out. This is what he did. Pretty cool:


$ts = Get-CMTaskSequence

$ts | `
Select-Object Name, @{Name="SecuredScopeNames";Expression={($_.SecuredScopeNames -Join ",")}}, Description | `
Export-CSV `
  -Path "C:\Temp\Scopes-Task-Sequences.csv" `
  -Delimiter ";"  

No comments:

Post a Comment