If a script is not running or hanging when running task scheduler may indicate a 0x1 or 0x41301.
Try to change the -ExecutionPolicy parameter
powershell.exe -ExecutionPolicy Unrestricted -NonInteractive -NoProfile -File c:\scripts\script.ps1
If a user is given a temporary profile whilst logging onto Windows you can try the following to remedy the problem.
1. Log in using an account with administrative rights
2. Delete the key associated with the corrupt user in HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList
3. Delete the key associated with the corrupt user in HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileGuid
4. Rename corrupt user folder in c:\users\[user]
5. Restart machine and log on with problem user
If you have lost the only admin password for your Mac OS you can try this:
This may not work if protection has been put in place.
On boot hold [Command-S] for single-user mode this will display a terminal prompt as root.
At the terminal type:
mount -uw / rm /var/db/.AppleSetupDone shutdown -h now
Tested on MacOS 10
When using Windows RDP you may encounter the error message ‘The terminal server has exceeded the maximum number of allowed connections’. You can delete open sessions or use the admin switch to administer the server.
At the command prompt:
To administer the server:
mstsc /v:<server> /admin
To obtain a list of current sessions:
query session /server:<server>
To close a session – [ID] can be found from session list
reset session [ID] /server:<server>