I would need to run a powershell script to get services info on remote PCs. The script runs on MYPC, on the same subnet of the others. no domain, same subnet. local administrator for each PCs.
An example of what I wun in my script:
$ComputerName = "PC1","PC2","PC3","PC4","PC5"
$ServiceName = "Service1","Service2","Service3","Service4"
foreach ($Computer in $ComputerName)
{
foreach ($Service in $ServiceName)
{
#Get current service type (automatic/manual)
$CurrentType = Get-Service -Name $Service -ComputerName $Computer | Where{$_.StartType -eq "Manual"}
...
But I got errors since before I have to remotely login the remote PC with administrator user.
Once loggedin, the script runs fine.
just to be clear, I login to the remote PC, simply typing, on MYPC:
\\PC1
hit then Enter
on the login window inserting then the local PC1 Admin credentials
As a workround, instead of manually inserting the commands to remotely login each PCS, I run a DOS script like this:
NET USE \\PC1\IPC$ adminpwd /USER:Administrator /PERSISTENT:YES
NET USE \\PC2\IPC$ adminpwd /USER:Administrator /PERSISTENT:YES
NET USE \\PC3\IPC$ adminpwd /USER:Administrator /PERSISTENT:YES
...