由于供应商对自己应用程序卸载过程的质量缺乏重视,我正在尝试通过脚本自动删除特定产品的WinSock提供程序。
用于获取所有提供程序的列表和删除提供程序的命令都缺少本机PowerShell对应物,这意味着输出来自内置的旧式控制台应用程序(netsh)。输出格式需要PowerShell魔术才能正确解析(而且我不知道如何使用PowerShell进行解析)。
我需要获取任何带有包含字符串'Sophos'的'描述'的WinSock提供程序的'Catalog Entry ID'编号,并将该编号反馈给执行删除WinSock提供程序的命令。
netsh winsock show catalog
netsh winsock remove provider #
Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type: Layered Chain Entry
Description: Sophos Web Intelligence IFSLSP over [RSVP UDP Service Provider]
Provider ID: {22E7B629-EC8B-46CC-864B-CEF6A6766A51}
Provider Path: C:\ProgramData\Sophos\Web Intelligence\swi_ifslsp_64.dll
Catalog Entry ID: 1056
Version: 2
Address Family: 2
Max Address Length: 16
Min Address Length: 16
Socket Type: 2
Protocol: 17
Service Flags: 0x22609
Protocol Chain Length: 2
Protocol Chain: 1047 : 1010
Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type: Base Service Provider
Description: MSAFD Tcpip [TCP/IPv6]
Provider ID: {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path: %SystemRoot%\system32\mswsock.dll
Catalog Entry ID: 1001
Version: 2
Address Family: 23
Max Address Length: 28
Min Address Length: 28
Socket Type: 1
Protocol: 6
Service Flags: 0x20066
Protocol Chain Length: 1
Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type: Base Service Provider
Description: MSAFD Tcpip [UDP/IPv6]
Provider ID: {F9EAB0C0-26D4-11D0-BBBF-00AA006C34E4}
Provider Path: %SystemRoot%\system32\mswsock.dll
Catalog Entry ID: 1002
Version: 2
Address Family: 23
Max Address Length: 28
Min Address Length: 28
Socket Type: 2
Protocol: 17
Service Flags: 0x20609
Protocol Chain Length: 1
使用来自Quickest way to organize categorized data in a text file and convert to CSV的信息,我精心编写了以下命令,以给我WinSock提供程序列表的“干净”输出:
(netsh winsock show catalog | find /V "Name Space Provider Entry" | find /V "Winsock Catalog Provider Entry" | find /V "------------------------------------------------------")>"C:\Temp\Sophos\catalog.txt"
然后,在PowerShell中执行以下行:
$data = Get-Content 'C:\Temp\Sophos\catalog.txt' -Raw
$data -replace ':\t', '=' -split '\r?\n\r?\n' | ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Export-Csv 'C:\Temp\Sophos\catalog.csv' -NoType
但是,除了空的CSV文件之外,我还遇到以下PowerShell错误:
PS C:\WINDOWS\system32> $data = Get-Content 'C:\Temp\Sophos\catalog.txt' -Raw
PS C:\WINDOWS\system32> $data -replace ':\t', '=' -split '\r?\n\r?\n' | ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Export-Csv 'C:\Temp\Sophos\catalog.csv' -NoType
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Entry Type: Base Service Provider (32)' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: E-mail Naming Shim Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: PNRP Cloud Namespace Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: PNRP Name Namespace Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: Network Location Awareness Legacy (NLAv1) Namespace' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: Tcpip' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: NTDS' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: Bluetooth Namespace' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: E-mail Naming Shim Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: PNRP Cloud Namespace Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: PNRP Name Namespace Provider' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: Network Location Awareness Legacy (NLAv1) Namespace' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: Tcpip' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: NTDS' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand
ConvertFrom-StringData : Data line 'Description: Bluetooth Namespace' is not in 'name=value' format.
At line:1 char:87
+ ... ForEach-Object {[PSCustomObject]($_ | ConvertFrom-StringData)} | Exp ...
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [ConvertFrom-StringData], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ConvertFromStringDataCommand