time to time while working with SCCM application virtualization, i come across several issues in troubleshooting why the virtual apps doesn't load correctly /why they don't go way when you say not applicable/not needed for someone using very powerful command WMIC.
Here are some of the WMIC commands :
What is WMIC : WMIC is Windows Management Instrumentation Command-line (WMIC), which uses the power of Windows Management Instrumentation (WMI) to enable systems management from the command line. WMIC extends WMI for operation from several command-line interfaces and through batch scripts. Before WMIC, you used WMI-based applications (such as SMS), the WMI Scripting API, or tools such as CIM Studio to manage WMI-enabled computers. Without a firm grasp on a programming language such as C++ or a scripting language such as VBScript and a basic understanding of the WMI namespace, do-it-yourself systems management with WMI was difficult. WMIC changes this situation by giving you a powerful, user-friendly interface to the WMI namespace.
More info ,please read http://technet.microsoft.com/en-us/library/bb742610 and http://ss64.com/nt/wmic.html
If you have referred my previous post in fixing issues on Virtual apps are not removing http://eskonr.com/2012/06/sccm-removal-of-app-v-applications-from-client-machines-script-based/,some command lines used in the script.
Run the below command line on target computer with administrative rights either manually or remotely using psexec tool .
The Basic command line syntax for all the below queries is :
WMIC /node: āComputernameā /namespace:where the information located path classes name Get xxxx,xxxx,xxxx
If you are running the above command line on local computer,you can simply delete /node .
where the information located : It is the namespace for which information being stored.in this case,it is \\root\microsoft\appvirt\client
classes name : For each instances name,you will have n number classes could be of static or dynamic . in this case, it is package.
XXXX is what information you need.
List Virtual Apps - Name and SftPath
WMIC /namespace:\\root\microsoft\appvirt\client path Package Get Name,SftPath >C:\listapps.txt
List Virtual Apps - Name
WMIC /namespace:\\root\microsoft\appvirt\client path Package Get Name >c:\virtualapps.txt
List Virtual Apps - Name and SftPath (Remote Machine)
WMIC /node:"%MACHINE%" /namespace:\\root\microsoft\appvirt\client path Package Get Name,SftPath >C:\remotevirtualapps.txt
List Virtual Apps - Name (Remote Machine)
WMIC /node:"%MACHINE%" /namespace:\\root\microsoft\appvirt\client path Package Get Name >C:\remotevirtualapps.TXT
List Virtual Apps - Name (Remote Machine) with Condition
WMIC /node:"MACHINE%" /namespace:\\root\microsoft\appvirt\client path Package Where Name="adobe reader" Get Name,SftPath /format:csv
more information about format command line,refer http://msdn.microsoft.com/en-us/library/windows/desktop/aa394531%28v=vs.85%29.aspx
List Virtual Apps - Name (Remote Machine) with Condition
WMIC /node:"MACHINE%" /namespace:\\root\microsoft\appvirt\client path Package Where Name="Adobe Reader" Get Name,SftPath /format:csv
List Virtual Apps - Name (Client List)
WMIC /node:@clients.txt /namespace:\\root\microsoft\appvirt\client path Package Get Name,SftPath /format:csv
List Virtual Apps - Name (Client List)
WMIC /node:@clients.txt /namespace:\\root\microsoft\appvirt\client path Package Where Name="Adobe Reader" Get Name,SftPath /format:csv
List Virtual Apps - Name (Remote Machine) from SCCM
WMIC /node:"ESKONR" /namespace:\\root\sms\site_P01 Path SMS_Package where PackageType=7 Get PackageID,Name,PkgSourcePath >C:\listallapps-SCCM.txt
ESKONR : SCCM server name
P01: Site code of SCCM server name
Name: Adobe reader which is application name
machine : Remote computer name
Clients.txt : list of computers and full path should be given here in the command line.
I really like the last command which gives us list apps created in SCCM server with package source path rather looking at reports.
Hope it helps to someone š