Last Executed: This script has not yet been executed.

Recently had a problem with a Powershell script that was configured via Group to deploy at start up.

The problem I had was that no matter what the script would never run. Doing a GPResult /z it would show me the script is being applied but with the following message:

Last Executed: This script has not yet been executed.

After much searching and testing I found that the script would run if I removed the spaces in the script name.

I know its a simple mistake but the server did not tell me that it could not find the file.

 

 

Enable Powershell remoting and connect

I’ve had to search around a bit to find all the commands to enable remotely connecting to Server 2012 using powershell.

#To enable remote connections on the server:

Enable-PSremoting

#To connect remotely from your workstation

Enter-PSSession -computername Server_Name -Credential administrator

Remember you have to use the server name and not the IP address otherwise it will deny you access.