U.S.
asked on
AD SCRIPT THAT PROMPTS FOR GROUP NAME AND OUTPUTS FILE
Attempting to create a script that prompts for a specified AD group name to verify if user accounts are disabled and create an output file with the output displayed from PowerShell. So far this is what I have but I am receiving an blank output.
[void][System.Reflection.A ssembly]:: LoadWithPa rtialName( 'Microsoft .VisualBas ic')
$group = [Microsoft.VisualBasic.Int eraction]: :InputBox( "Please enter group name", "Group", "$env:username")
Get-ADGroupMember -identity "$group" | get-aduser | Where {$_.Enabled -eq $false} | format-table name -autosize
Out-File -Force "C:\AD_output.txt"
[void][System.Reflection.A
$group = [Microsoft.VisualBasic.Int
Get-ADGroupMember -identity "$group" | get-aduser | Where {$_.Enabled -eq $false} | format-table name -autosize
Out-File -Force "C:\AD_output.txt"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER