Export a list's values
Hi, is there an easy way to export the values of a list, let's say the Incident Classification list in one of these ways:
Through the portal UI
Through the SCSM Console UI
Using a dashboard widget or oData query
Using powershell
Best Answer
-
Geoff_Ross Cireson Consultant O.G.
Hi Stephane,
Try this guy for size...
$SCSMServer = "localhost" $EnumName = "IncidentClassificationEnum$" ######## $SCSM = @{ComputerName = $SCSMServer} $Enum = Get-SCSMEnumeration -Name $EnumName @SCSM $i = -1 Write-Host "`n" Write-Host "List Values for $EnumName" (0..("List Values for $EnumName".Length - 1)) | % {Write-Host "-" -NoNewline} Write-Host "`n`n" -NoNewline Function Get-Enums ($ParentEnum) { $Enums = Get-SCSMChildEnumeration -Enumeration $ParentEnum -Depth OneLevel @SCSM | Sort-Object -Property Ordinal $i++ ForEach ($Enum in $Enums) { (0..$i) | % {Write-Host "`t" -NoNewline} Write-Host $Enum.DisplayName -NoNewline Write-Host "`n" -NoNewline Get-Enums -ParentEnum $Enum } } Get-Enums -ParentEnum $Enum
Geoff
5
Answers
Hi Stephane,
Try this guy for size...
Geoff
Nice one, exactly what I need :)