Hello all,
I am beginner with powershell and struggling to get this around with the help from different sites, My requirement and scenario is
I have a windows server 2008(rktdepy) with power shell installed and i have packaged application with a .cmd file. When i click this .cmd file the application will be deployed
The server name is **rktdepy** and i want to create a powershell script which will connect to other servers in the network (the server names should be picked up from a txt files) and install the application accessing the file remotely from **rktdepy** server. The files are not supposed to be copied to any server and should not use psxec for security reason.
So far i have used invoke and ,apping the network drive but still i have issues
*******************************************************************************************
****$Comsession = Get-content c:\adminfiles\scripts\deploy.txt |new-pssession -throttlelimit 50
Invoke-command -computername RKTDEPLY54 -scriptblock { (new-object -comobject wscript.network).mapnetworkdrive("R:", "\\rktdepy\deploy", $true) }
Invoke-command -session $comsession -scriptblock {"CMD /C r:\QR_DEPLOY.CMD"}****
*******************************************************************************************
The above script throws error,
I dont want to use any password in the script and it should fetch the current logged in user password from **rktdepy** server. I is ok if the scripts prompts for a user name and password which will have admin access to all servers.
Please guys someone help me out!!!!!!!!! I do really rely on you guys!!!!!!!!!!!!!
Thanks in advance
I am beginner with powershell and struggling to get this around with the help from different sites, My requirement and scenario is
I have a windows server 2008(rktdepy) with power shell installed and i have packaged application with a .cmd file. When i click this .cmd file the application will be deployed
The server name is **rktdepy** and i want to create a powershell script which will connect to other servers in the network (the server names should be picked up from a txt files) and install the application accessing the file remotely from **rktdepy** server. The files are not supposed to be copied to any server and should not use psxec for security reason.
So far i have used invoke and ,apping the network drive but still i have issues
*******************************************************************************************
****$Comsession = Get-content c:\adminfiles\scripts\deploy.txt |new-pssession -throttlelimit 50
Invoke-command -computername RKTDEPLY54 -scriptblock { (new-object -comobject wscript.network).mapnetworkdrive("R:", "\\rktdepy\deploy", $true) }
Invoke-command -session $comsession -scriptblock {"CMD /C r:\QR_DEPLOY.CMD"}****
*******************************************************************************************
The above script throws error,
I dont want to use any password in the script and it should fetch the current logged in user password from **rktdepy** server. I is ok if the scripts prompts for a user name and password which will have admin access to all servers.
Please guys someone help me out!!!!!!!!! I do really rely on you guys!!!!!!!!!!!!!
Thanks in advance