I had never tried this previously and hence why I only just noticed it. I am far from completely competent with powershell yet, still picking up lot's.
Scenario:-
I have a vmware network at work, x2 2003 servers, both on same subnet/network.
The server I am running this script from isn't assigned to any domain yet and just sit's in a workgroup. The other server is a AD DC 2003.
The script:-
$a = Get-Content "C:\Scripts\pclist.txt"
foreach ($i in $a)
{
remove-item \\$i\C$\Scripts\remove -recurse
}
The pclist contains the computer name of both servers.
I ran the script expecting it not to work on the AD DC 2003 server, but it did. My thoughts were:-
a) The script surely shouldn't be able to be run this remove-item cmdlet on a remote server, especially when there are no matching windows user authentication to perform this task.
b) I havent tried this on other platforms yet but I am completely clueless.
Anyone that can explain?
Cheers,