Hi hope someone can help i have a list of users and instances they have access to in a text file like below.
SQL-UAT-DB domain\testuser SQL-Prod-DB domain\Joe.bloggs SQL-Train-DB domain\Mary.smith
I want to pass this file into DBtools powershell command "Remove-DbaLogin" https://docs.dbatools.io/Remove-DbaLogin
example of remove-dbalogin is below where you can state the instance and then login i know i can pass 2 separate files to this one for users and one for instances but i want it to pick both up from one file instead.
Remove-DbaLogin -SqlInstance $instances -Login $userlist
How can i pass this one list to this command and have it remove the login based on each line in the file.