OK this is a bit complicated to explain but i will try my best
i am running a powershell script from my machine which has novell client installed which causes issues with setting windows file permissions on a network share hosted on linux samba share. i cant use get-acl as it errors it does not recognize the Unix users and groups. my solution is to use icacls.
icacls does not seem to work form my machine probably because of the novel client
what i want to do is use the invoke-command -computername server1 -script block{icacls.exe}-cred mydomain\me
but when i do i get access denied to \\samba\share
so my solution is to write to a text file on server1 which then has a scheduled task to run every 5 minutes checks the text file and if there is text run the command which works fine but is messy as if the server is down or the task stop running the task is running with the same account mydomain\me
I remember reading awhile ago about permission to a network share when using the invoke command as the network share need credentials, but these are not passed on when using the invoke command
i was thinking of using runas but i dont think you can spefify a password
anyway i would still like to use the invoke command anyone know how i can get this to work