Search the Community
Showing results for tags 'wmic'.
Found 1 result
Hello, I'm having a lot of issues around security access denied messages lately. I've beaten myself up every which way with UAC, and enabling the local token filter policy in the registry. Attempting to use wmic commands, powershell (ver 2 and ver3) and keep getting hit with the access denied, return code 5, etc. When you run a command from the Tools - CMD prompt, I need to know - does this actually run from the local agent, and therefore as a 'local' command, or does it actually run from another machine, and therefore is 'remote'?? I have been trying to use this method to test out the commands lately, since they also fail from the script. Running them from the cmd tools menu is faster that re-editing the script each failure. What am I actually trying to run? A simple rename computer command. I've tried several variants of it. The only one I have NOT tried yet, is to use one that allows me to also submit the domain credentials for an account authorized to change the PC's hostname on a domain. On this note, is there a way to pass the domain credentials into the powershell script using the labtech script parameters? So that a tech can be required to enter in the needed credentials each time the script is run? (I was trying to turn the PS commands I found for this into a single line. Could be that is where I'm going wrong here.) I tried using -DomainCredential, followed by manually entering in domain\user, password, but this failed as well. I have seen some 3 line code examples that break down the -DomainCredential into pieces, and then concatenates them together - the only direction I haven't tried, that I have seen. This was my last attempt, from the tools cmd: %windir%\system32> ~RENAME-COMPUTER admin10 -force -PassThru RENAME-COMPUTER : Fail to rename computer 'admbx10' to 'admin10' due to the following exception: Access is denied. At line:1 char:1 + RENAME-COMPUTER admin10 -force -PassThru + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (admbx10:String) [Rename-Compu ter], InvalidOperationException + FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Comman ds.RenameComputerCommand HasSucceeded OldComputerName NewComputerName ------------ --------------- --------------- False admbx10 admin10 Any tips? Thanks in advance.