Description invalid query как исправить

Because of a messed up group policy object, multiple computers have TightVNC installed when they shouldn’t. The GPO is gone, so just removing the software from there isn’t an option that I’m aware of. Therefore, I’m scripting things in order to remove PowerShell from a list of computers.

This is my script:

if ($args.length -ne 1) {
    Write-Warning "Must pass computer name, ending script.";
    break
}

$pc = $args[0]

Write-Output "Scanning $pc for TightVNC...."
$prod = wmic /node:$pc product get name | where {$_ -match "TightVNC"}
if ($prod) {
    Write-Output "Found TightVNC, attempting uninstall...."
    wmic /node:$pc product where name="TightVNC" call uninstall
} else {
    Write-Warning "Could not find TightVNC on $pc."
}
Write-Output "Done."

Now, my output is as follows:

Scanning [computer] for TightVNC....
Found TightVNC, attempting uninstall....
ERROR:
Description = Invalid query
Done.

However, if I copy and paste the second wmic line into an elevated command prompt and replace $pc with [computer], it works just fine. My PowerShell window is elevated.

Does anyone know why my script would be having a fit about this? I know that it does take quite a long time for the first wmic command to complete (>=5 minutes), but it does as well in the second command window where it actually works. I’d appreciate any insight into this.

NOTE: I am using wmic because the computers here aren’t properly configured for remote PowerShell access. It’s on my list of things to do.

Содержание

  1. Error description invalid query
  2. Answered by:
  3. Question
  4. Answers
  5. All replies
  6. Error description invalid query
  7. Answered by:
  8. Question
  9. Как исправить ошибку <«error»:»invalid_request»,»error_description»:»Security Error»>?

Error description invalid query

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

When I run the command

wmic product where InstallLocation=»C:Program Files (x86)AdobeAcrobat 8.0» call uninstall

I get the message

Description = Invalid query

Could someone help me?

Answers

I got! I ran the following command:

wmic product where «InstallLocation=’C:\Program Files (x86)\Adobe\Acrobat 8.0\’» call uninstall

What are you trying to do?
Why use WMI instead of the Control Panel?

I’m trying to uninstall a program via a script.

Try using name instead of InstallLocation eg

wmic product where name = «Adobe Acrobat 8» call uninstall

To check you are using the right name use

wmic product get name

and find the program name in the generated list

The problem is that the command «wmic product get . » usually takes a lot to run.

So I get the installation folder of the program via registry and I inform it in the command «wmic product where InstallLocation=. » (the name in the registry does not always hit with wmic).

Why the verb InstallLocation does not work?

I got! I ran the following command:

wmic product where «InstallLocation=’C:\Program Files (x86)\Adobe\Acrobat 8.0\’» call uninstall

Источник

Error description invalid query

This forum is closed. Thank you for your contributions.

Answered by:

Question

I’m looking for a one-line command to acquire the Asset Tag (NOT the Service Tag) of a PC, and save it as an environment variable. I realize a script can do things like this, but I’m purposefully looking for a one-line command to include in an Unattend.xml file. I do not use WDS, or any other third-party deployment solution suite. I capture my images with an answer file and deploy them with the most basic GhostCast app — NOT a full GSS server — if I need to multicast. I have one command that can accomplish this for the Service Tag already:

The problem is if I change the middle part to: ‘wmic bios get tag’ it returns my customized Asset Tag value along with an error code, like this:

I’ve played around with using «tokens=3, delims= » to try and snag only the third section of the first line, but that doesn’t appear to do anything, presumably because it’s an error code and not a returned value. is that right? My goal is to query «tag» from wmic, store it as %ASSET% permanent environment variable, and then have the Unattend.xml file either use %ASSET% to name the machine when binding to the domain, or to call another command during the Specialize pass to name the machine, like so:

Again, I understand that a script run after the OOBE phase is complete would probably do all this «better», but I’m using this as an educational exercise to understand better how all these components work — please excuse me if I’m intentionally making things difficult, but I am a novice just beginning to deep-dive with image creation. Any advice would be greatly appreciated!

Источник

Как исправить ошибку <«error»:»invalid_request»,»error_description»:»Security Error»>?

В сегодняшней статье мы рассмотрим с вами ошибку <«error»:»invalid_request»,»error_description»:»Security Error»>, которая наводит на многих пользователей шок, в первую очередь, благодаря своей ужасной длине.

Возникает данная ошибка всякий раз, когда кто-то попытается выполнить авторизацию с помощью социальной сети ВКонтакте где-нибудь на другом веб-ресурсе, а таких сейчас ужасно много. Причем, стоит заметить, ошибка эта прежде всего возникает у пользователей браузера Google Chrome, впрочем, и на других браузерах ее появление также возможно.

Причина ошибки <«error»:»invalid_request»,»error_description»:»Security Error»>– выполненный ранее вход в учетную запись ВК. По крайней мере, так утверждает сама техническая поддержка ВКонтакте. И, как показала практика, это действительно так.

Если вы и сами повстречались с ошибкой <«error»:»invalid_request»,»error_description»:»Security Error»>, то вам нужно сделать следующее:

  • выйдите из свой учетной записи ВК в браузере;
  • затем снова войдите в нее;
  • далее переходим на нужный вам сайт и проводим авторизацию с помощью ВК – проблема решена.

Как видите, ошибка <«error»:»invalid_request»,»error_description»:»Security Error»>решается буквально за пару-тройку минут, после чего вы можете заходить на любые веб-ресурсы в сети через учетку ВКонтакте. Мы надеемся, что данный материал помог вам устранить проблему.

Источник

Because of a messed up group policy object, multiple computers have TightVNC installed when they shouldn’t. The GPO is gone, so just removing the software from there isn’t an option that I’m aware of. Therefore, I’m scripting things in order to remove PowerShell from a list of computers.

This is my script:

if ($args.length -ne 1) {
    Write-Warning "Must pass computer name, ending script.";
    break
}

$pc = $args[0]

Write-Output "Scanning $pc for TightVNC...."
$prod = wmic /node:$pc product get name | where {$_ -match "TightVNC"}
if ($prod) {
    Write-Output "Found TightVNC, attempting uninstall...."
    wmic /node:$pc product where name="TightVNC" call uninstall
} else {
    Write-Warning "Could not find TightVNC on $pc."
}
Write-Output "Done."

Now, my output is as follows:

Scanning [computer] for TightVNC....
Found TightVNC, attempting uninstall....
ERROR:
Description = Invalid query
Done.

However, if I copy and paste the second wmic line into an elevated command prompt and replace $pc with [computer], it works just fine. My PowerShell window is elevated.

Does anyone know why my script would be having a fit about this? I know that it does take quite a long time for the first wmic command to complete (>=5 minutes), but it does as well in the second command window where it actually works. I’d appreciate any insight into this.

NOTE: I am using wmic because the computers here aren’t properly configured for remote PowerShell access. It’s on my list of things to do.

I’m preparing a Hyper-V two-nodes cluster where to create a test environment of our current Active-Directory domain for DC upgrades to Windows Server 2008 R2 simulation scenarios. To keep resources for child partitions I have installed Windows Server 2008 R2 Enterprise Core edition as base OS on the nodes. One of the common tasks I use to run after the base installation is tuning the virtual memory and moving the page file to a dedicated partition to avoid fragmentation.

The method described in Microsoft’s article Administering a Server Core installation; and in several blogs around like Server Core – Move that Swap/Page File didn’t helped me so much; sometimes a there was a missing command, some are omitting steps; and always I was getting the Description = Invalid query error code when executing the following command:

wmic pagefileset where name=”[path/filename]” set InitialSize=[initialsize],MaximumSize=[maxsize]

So, if you are on the same situation as me, simply follow this steps which worked like a charm for me:

  1. First of all check your settings by executing the following commands:

    wmic.exe pagefile list /format:list (to see system’s page file when automatically managed)
    wmic.exe pagefileset list /format:list (to see your defined page files when manually managed)

  2. Deactivate the automatic page file management by executing the following command:

    wmic.exe computersystem set AutomaticManagedPagefile=False

  3. Create the page file in destination partition, by executing:

    wmic.exe pagefileset create name=”D:pagefile.sys”

  4. At this point you need to delete the old page file prior to set InitialSize and MaximumSize values for the new one, so execute:

    wmic.exe pagefileset where name=”C:\pagefile.sys” delete

  5. Now you just have your new page file and now you can execute the following to set your values to your needs:

    wmic.exe pagefileset set InitialSize=9192,MaximumSize=9192

  6. Reboot your server.

    Shutdown /r /t 0

I recommend you to set Initial and Maximum value to the same value to avoid I/O activity while extending the page file. So, after all your page file configuration should looks like the following one:

image

RRS feed

  • Remove From My Forums
  • Question

  • Hello

    When I run the command

    wmic product where InstallLocation=”C:Program Files (x86)AdobeAcrobat 8.0″ call uninstall

    I get the message

    ERROR:

    Description = Invalid query

    Could someone help me?

    Thank you

Answers

  • I got! I ran the following command:

    wmic product where “InstallLocation=’C:\Program Files (x86)\Adobe\Acrobat 8.0\'” call uninstall

    • Marked as answer by
      Karen Hu
      Thursday, April 17, 2014 9:15 AM

All replies

  • What are you trying to do?
    Why use WMI instead of the Control Panel?

  • I’m trying to uninstall a program via a script.

    • Edited by
      Darien93
      Tuesday, April 15, 2014 5:51 PM

  • Try using name instead of InstallLocation eg

    wmic product where name = “Adobe Acrobat 8” call uninstall

    To check you are using the right name use

    wmic product get name

    and find the program name in the generated list

  • The problem is that the command “wmic product get …” usually takes a lot to run.

    So I get the installation folder of the program via registry and I inform it in the command “wmic product where InstallLocation=…” (the name in the registry does not always hit with wmic).

    Why the verb InstallLocation does not work?

  • I got! I ran the following command:

    wmic product where “InstallLocation=’C:\Program Files (x86)\Adobe\Acrobat 8.0\'” call uninstall

    • Marked as answer by
      Karen Hu
      Thursday, April 17, 2014 9:15 AM

Добавить комментарий