![]() I'm not digging into how to provide both the username AND password in this as I don't like passwords stored in plaintext and don't feel like figuring out how to store it into a secure string for this little command. Alternatively, replace it with "(Get-Credential)" to prompt for both the username and password each time. ![]() Replace "DOMAIN\ADMINUSERNAME" with a Domain Admin account and you should be golden. Then run it: C:pathtoscriptSpoolerScript.ps1 ComputerName. For example, save it as: SpoolerScript.ps1. but just save it and then run it from powershell. Powershell -noprofile -ExecutionPolicy bypass -command "& How to stop a Print spooler remotely and delete the temp files than restart the sprint spooler. I also "turned on the safety" by checking that confirmation checkbox.Įxpected behavior is that it will ask for confirmation, then pop up a powershell window, then pop up asking for the password for your given admin user account. I placed it at the bottom of the list of built-in commands with "(PS)" added to the description. For more information about Windows fast startup, see Distinguishing Fast Startup from Wake-from-Hibernation. To disable fast startup, run the following command: Powercfg -h off. Examples Example 1 - Show time since last boot. I found a quick and simple powershell command and then adapted it into a Custom Action. The Get-Uptime cmdlet was introduced in PowerShell 6.0. I had an issue where I needed to remotely restart a computer but wasn't currently logged into a Domain Administrator account.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |