The scenario is I have to read an XML file on about 60 PC's on our network. I need to get two pieces of data out of that xml file. Last I need to put that data into a network location from that possession.
My problem is I am always getting this error trying to write to the network location
out-File : Access to the path '\\server\share\folder\file.txt' is denied.
My code is as follows
$s = New-PSSession -ComputerName pcname -Credential domain\userid
Enter-PSSession -Session $s
New-PSDrive -Name Z -PSProvider FileSystem -Root '\\server\share\folder'