I've not found the help I need on this one. I'm attempting to create a folder on a remote machine using the IP address and using credentials. The sniplet I have is:
$username = 'user\someuser'
$password = 'Some Password'
$cred = New-Object System.Management.Automation.PSCredential -ArgumentList @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force))
new-item -itemtype directory -path "\\123.45.67.890\c$\Junk" -credential $cred -force
This seems to be an incorrect syntax - as well as several others I've attempted. Has anyone insight on this?
Thx - kgkidd
kgkidd