Hi – I am new to Powershell (I am using v3.0 ISE, running as Administrator, in W7 environment), but not to scripting in general. I have also been a c# programmer in a past life, so am reasonably comfortable with Object-Oriented principles.
I am initially just trying to access each PC in our office (all on a common domain, and most are on the same subnet). I have not done anything special on any of the PCs (i.e. I haven't run 'Enable-PSRemoting' on them), and my little script appears to be able to access almost all of them straight away. Great!!
However, there is at least one PC that my script baulks at, that I know is connected and powered on. I even went and ran the 'Enable-PSRemoting' cmdlet on it (as local Administrator). It turns out, this happens to be one of the few PCs on a different subnet – so I suspect that without getting into firewall configuration, there is little I can do about this particular PC.
My main question though is whether there is a subtle difference between accessing a remote computer, and the term 'remoting'… My script is just doing a simple Test-Path to \$ComputerNamec$ to check if the computers are reachable, and in most cases, they are. I can then use 'Set-Location' to navigate around their systems, and even get into their registries and do untold damage 😉
But, when I have tried the 'Test-WSMan' cmdlet from my PC to these 'accessible' PCs, it returns an error, presumably because the WinRM service is not running at the far end (and the various other things that Enable-PSRemoting turns on for us). So, even though I can 'access' the computers, what does this lack of 'remoting' mean I can't do.
Given that I can access the computers to some degree, can I emulate running the 'Enable-PSRemoting' on each PC, from my PC, without having to go out and visit each one (which is the whole point of me wanting to learn Powershell in the first place)?