Powershell multiple credential setup
问题 I just setup a powershell to collect disk space info among a group of servers. but I encounter an issue that while I try to authenticate from one server to another, it require different credential info. E.g. SQLServer01 ID: domain1\sqladmin1 PW: 123456 SQLServer02 ID: domain2\sqladmin2 PW: 654321 right now i manage to setup first one with limited power-shell experience. $comp= Get-Content "C:\disk_info\Computers.txt" $diskvalue = @() #$cre = get-Credential $username = "domain1\sqladmin1"