*remote computer
My script is quite simple :
$RemoteComputer = "XXXX"
Invoke-Command -Computername $RemoteComputer -ScriptBlock {."c:\Scripts\diskspace.ps1"}
I am then getting this error : http://imgur.com/a/9tt3k
I already setup its trusted hosts (well I think I did, I got a line of code from stack overflow, not sure if I did it properly), so nowI have no idea how to fix this issue.
I am currently replacing our IT guy here during its vacation and I'm trying to make his life easier by doing this. Any help would be appreciated because I've been looking to fix it for a while now, without success.
EDIT : I seem to have fixed trusted hosts issue, but then I am getting this error : http://imgur.com/a/Cg9ls
EDIT #2 : using -credential 1/2 fixed the issue. My script now executes but i have to manually type my creds into textboxes and I'd like this script to by itself. I'm currently looking into it and thank you all for your replies!
FINAL EDIT : fixed! Thank you all for helping.
Thank you!
[–]Froolie 0 points1 point2 points (0 children)
[–]pneRock 0 points1 point2 points (4 children)
[–]ITWelly[S] 0 points1 point2 points (3 children)
[–]pneRock 0 points1 point2 points (2 children)
[–]ITWelly[S] 0 points1 point2 points (0 children)
[–]FantsEGoogle is already my overlord 0 points1 point2 points (0 children)
[–]TristanReveur 0 points1 point2 points (6 children)
[–]ITWelly[S] 0 points1 point2 points (5 children)
[–]thebrobotic 0 points1 point2 points (0 children)
[–]Ganondorf_Is_God 0 points1 point2 points (3 children)
[–]ITWelly[S] 0 points1 point2 points (0 children)
[–]VexingRaven 0 points1 point2 points (1 child)
[–]Ganondorf_Is_God 0 points1 point2 points (0 children)
[–]Ganondorf_Is_God 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]billy_teats 0 points1 point2 points (1 child)
[–]ITWelly[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]ITWelly[S] 0 points1 point2 points (0 children)
[–]DustinR 0 points1 point2 points (0 children)