Can someone help me to get the simple script to check the credentials for multiple windows machines. and also if possible is their any script where credentials will be taken from notepad and check the credentials by its own instead of manual enter.
The Get-Credential cmdlet supports the -ComputerName parameter, which will allow you to run it against a remote system. A simple application of Foreach would allow you to loop through many remote systems.
Test-Cred is an example of a script written to do exactly what you want - test the credentials of a user on remote systems. It can also store the credential for use within the same session. You would want to modify that script so that it passes the credential information to whatever other tasks you need to perform.
However, this:
is a very bad idea. You should never store credential information of any kind in static, un-encrypted files. Doing so effectively breaks your security. Think of it like making a copy of your house key and then leaving it lying around where other people can find it - you might as well just take the lock off your door.
[quote quote=193315]The Get-Credential cmdlet supports the -ComputerName parameter, which will allow you to run it against a remote system. A simple application of Foreach would allow you to loop through many remote systems.
Test-Cred is an example of a script written to do exactly what you want – test the credentials of a user on remote systems. It can also store the credential for use within the same session. You would want to modify that script so that it passes the credential information to whatever other tasks you need to perform.
and also if possible is their any script where credentials will be taken from notepad and check the credentials by its own instead of manual enter.
is a very bad idea. You should never store credential information of any kind in static, un-encrypted files. Doing so effectively breaks your security. Think of it like making a copy of your house key and then leaving it lying around where other people can find it – you might as well just take the lock off your door.
[/quote]
I agree for your point but if we have bulk machines with different Passwords how to work on it. If you have any script at least that should for me to enter once my credentials and get the output whether machines are able to connect or not.