So i'm fairly new to this, so my appologies if i ask a stupid question but we all need to learn.
I've been googleing
I want to export a txt file with all memberships for a user i've selected in a inputbox.
the inputbox is up and running but now i have a small gap to connect the input to the get aduser userid
if ($result -eq [System.Windows.Forms.DialogResult]::OK)
{
$x = $textBox.Text
$x
}
(get-aduser userid -Properties MemberOf | select MemberOf).MemberOf | % {$_.split(",")[0].replace("CN=","")}