Tag Info

Hot answers tagged

4

PowerShell is a turing-complete scripting language. You can, in theory, write a program in PowerShell to do anything. WMIC is a command-line program for interacting with WMI. By itself, it has no constructs for branching and looping, variable manipulation, or any of the nice things that a programming language has. It's just a tool, basically, for ...


3

I want to detect if the disc is a CD, DVD, BD, RW, DL... etc. In Windows GUI under Computer we can see the information according to the icon displayed for the optical drive. You have the right command, the information you seek is under the "Caption" field. So for: wmic cdrom get /format:lis In your example, in the Caption field you can see it is ...


2

for one citrix has its own deployment technology, secondly are you saying that your deployment method fails in someway? If so I expect it to be an impersonation issue. But I can't really tell from your explanation. the following is a shortcut to all the code that you have 1st copy file.msi \citrixservername\c$\pathtoyourfile wmic /node:citrixservername ...


2

I don't know why WMIC wont work, but the powershell version does work: $cred = get-credential tech1\xxxxx (gwmi -comp 10.162.x.x -cred $cred Win32_OperatingSystem).Shutdown() You'll be prompted for the password, there's no way around it prompting you for the password.


2

It's ye olde Cygwin pty vs native console app issue. Rxvt is based on a "pseudo terminal device" (pty), which Cygwin implements using Windows pipes. Non-Cygwin apps only see the Windows pipes though, which makes some of them think that they should enter non-interactive mode without a prompt. (More specifically, the isatty() function returns false when ...


1

One way I have gotten past this error is to use runas. If you have access to a command line, then use /runas:<domain>\<domainadmin> cmd.exe. You will get a second command line that runs with domain admin credentials. (Note: to perform on windows 7, you may have to elevate past the UAC.) Once you have your domain admin command line, continue on ...


1

There are many ways to automate (un)installation of MSIs, WMIC being one of them. Have you thought about a simpler approach, like a batch file that does: rem Uninstall old program: msiexec /qb /x {05EC21B8-4593-3037-A781-A6B5AFFCB19D} rem Install new program: msiexec /qb /i MyNewProgram.msi (of course, replacing the GUID above with your program's GUID or ...


1

Depending on the version of Cygwin you are using, you may have to leverage the < /dev/null. I believe I am using 1.7 and I no longer must use < /dev/null on most versions of Windows (the exception is Windows 2003 R2, you still must use < /dev/null.) Here is an example: wmic bios (works on almost all versions of Windows) wmic bios < /dev/null ...


1

-2147023582 is error 0x80070522, or "A required privilege is not held by the client". I suspect that your script is being run with a limited user token rather than with an Adminsitrator token. You might try the script from an "Administrator" token (i.e. "Run as Administrator", from an Administrator CMD session, etc) and see how it goes. I think you'll find ...


1

Try an echo wmic service where 'caption like "%documentum%"' get name, caption and you can see what's going on. You can also do echo %documentum%. (It should echo the exact command back, including the %documentum%) Maybe you have an environment variable named documentum. (environment variables have precedence over the command parameters. So if they are ...



Only top voted, non community-wiki answers of a minimum length are eligible