It works in a PowerShell window, but I cannot figure out what I am missing in the built-in editor.
Const Quote = """"
Dim cmd
cmd = "powershell.exe " & Quote & "Get-ADPrincipalGroupMembership (Get-ADComputer " & Input.Column("OS PC Name") & ") | Select-object name" & quote
Where-Object (name -like "FM Microsoft Bitlocker") | Sort Name
'Create process object and execute PowerShell
Set proc = Internal.CreateObject("process")
proc.execute(cmd)
'Check process exit code
If proc.ExitCode = 0 Then
'Traverse output lines
For Each line in proc.output
Output.Write Line
Next
Else
Output.Write "Exit code " & proc.ExitCode
End If
Thanks