I’m trying to do a quick inventory of what startup account each of my servers is using. I wrote the following script, but its not working. Can someone help?<\/p>\n
It doesn’t appear to like the $line varible after the -computername. If I put just one server name in there it works<\/p>","upvoteCount":2,"answerCount":17,"datePublished":"2013-09-06T11:31:13.000Z","author":{"@type":"Person","name":"nsanford8922","url":"https://community.spiceworks.com/u/nsanford8922"},"acceptedAnswer":{"@type":"Answer","text":"
The Get-content in the script is the default value so you don’t need to specify anything in -ComputerName. If you want to do a different path you would use -ComputerName (Get-Content myfullpath\\mytextfile.txt)<\/p>\n
Have to surround in paranthesis, otherwise Powershell will get confused with what parameter goes to what command.<\/p>","upvoteCount":2,"datePublished":"2013-09-06T14:21:02.000Z","url":"https://community.spiceworks.com/t/get-a-list-of-services-and-their-startup-account/237680/13","author":{"@type":"Person","name":"martin9700","url":"https://community.spiceworks.com/u/martin9700"}},"suggestedAnswer":[{"@type":"Answer","text":"
I’m trying to do a quick inventory of what startup account each of my servers is using. I wrote the following script, but its not working. Can someone help?<\/p>\n
It doesn’t appear to like the $line varible after the -computername. If I put just one server name in there it works<\/p>","upvoteCount":2,"datePublished":"2013-09-06T11:31:13.000Z","url":"https://community.spiceworks.com/t/get-a-list-of-services-and-their-startup-account/237680/1","author":{"@type":"Person","name":"nsanford8922","url":"https://community.spiceworks.com/u/nsanford8922"}},{"@type":"Answer","text":"
This is the article you will want to take a look at:<\/p>\n