By "all details", I assume you mean the default output seen when you run Get-NetConnectionProfile:
PS C:\Temp> Get-NetConnectionProfile
Name : E12345
InterfaceAlias : Wi-Fi
InterfaceIndex : 15
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : Internet
Program 1 is a pure PowerShell solution using WinForms
I tried to execute Get-NetConnectionProfile from c# (see Creating an InitialSessionState but got a `Provider load failure' and could not solve the issue (This is the PowerShell class solution mentioned by boxdog).
Note: I have had success with executing PowerShell cmdlets from a C# program (see How do I login to a XEN session from a C# program using a secure string password? so I know its possible
Program 1
#region functions
Function ButtonGo_Click
{
$output = Get-NetConnectionProfile
$textBoxDisplay.Text = ("Name="+$output.Name.ToString() + [Environment]::NewLine)
$textBoxDisplay.Text = $textBoxDisplay.Text + ("InterfaceAlias="+$output.InterfaceAlias.ToString() + [Environment]::NewLine)
$textBoxDisplay.Text = $textBoxDisplay.Text + ("InterfaceIndex="+$output.InterfaceIndex.ToString() + [Environment]::NewLine)
$textBoxDisplay.Text = $textBoxDisplay.Text + ("NetworkCategory="+$output.NetworkCategory.ToString() + [Environment]::NewLine)
$textBoxDisplay.Text = $textBoxDisplay.Text + ("IPv4Connectivity="+$output.IPv4Connectivity.ToString() + [Environment]::NewLine)
$textBoxDisplay.Text = $textBoxDisplay.Text + "IPv6Connectivity="+$output.IPv6Connectivity.ToString()
}
#endregion
#region designer
[System.Windows.Forms.Application]::EnableVisualStyles()
$buttonGo = New-Object 'System.Windows.Forms.Button'
$buttonGo.Location = '10, 10'
$buttonGo.Name = "buttonGo"
$buttonGo.Size = '75, 25'
$buttonGo.TabIndex = 0
$buttonGo.Text = "&Go"
$buttonGo.UseVisualStyleBackColor = $true
$buttonGo.Add_Click({ButtonGo_Click})
$textBoxDisplay = New-Object 'System.Windows.Forms.TextBox'
$textBoxDisplay.Location = '12, 50'
$textBoxDisplay.Multiline = $true
$textBoxDisplay.Name = "textBoxDisplay"
$textBoxDisplay.Size = '470, 150'
$textBoxDisplay.TabIndex = 1
$mainForm = New-Object 'System.Windows.Forms.Form'
$mainForm.Size = '500, 250'
$mainForm.Controls.Add($buttonGo)
$mainForm.Controls.Add($textBoxDisplay)
$mainForm.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedDialog
$mainForm.Name = "mainForm"
$mainForm.Text = "Show Get-NetConnectionProfile Output"
#endregion designer
cls
$mainForm.ShowDialog()
Output
