3
votes
1answer
73 views

I am getting Invalid class errors for my PowerShell script

When I run this script, I get this error Get-WmiObject : Invalid class “Msvm_ImageManagementService” and Get-WmiObject : Invalid class "MSPower_DeviceEnable" and Get-WmiObject : Invalid class ...
0
votes
1answer
101 views

What rights should non-admin user have to run Get-WmiObject?

I am trying to monitor windows machine with the help of wmi and powershell remoting. I managed to successfully start remote session with that machine throught non-admin user account, but now I have a ...
3
votes
1answer
174 views

What is causing the Collateral damage when deleting old profiles?

#Get user names that have logged onto workstation $Users = gwmi win32_networkloginprofile | where {$_.name -match "EXP\\"} | where {$_.name -notmatch "srvtasksched"} $Users | foreach{ $Name = ...
6
votes
3answers
869 views

How to find the creation date of a local user account?

I would like to get the creation date of a local user account (Win 7 if it matters). I've looked at the following WMI objects (and google of course): Win32_UserAccount Win32_NetworkLoginProfile The ...
8
votes
1answer
264 views

How to accept EULAs for Software updates deployed through SCCM using Powershell

I'm trying to use the Start-CMSoftwareUpdateDeployment cmdlet to deploy a software update group to an existing collection. PS WHO:\> Start-CMSoftwareUpdateDeployment -SoftwareUpdateGroupName ...
3
votes
2answers
302 views

Can you use WMI to determine if a connection gets its DNS servers from DHCP?

The DNS server search order for a network interface can be read from Win32_NetworkAdapterConfiguration like this in Powershell, or programmatically using .Net ManagementObjects: > $NICs = ...
0
votes
2answers
723 views

“HP Insight Management WBEM Providers” download

I am trying to query a Proliant Server's health thru Powershell. But I can't find a place to download the HP Insight Management WBEM Providers from here. Is there any other Powershell equivalent of ...
4
votes
2answers
289 views

How do I identify a volume in WMI from a volume name reported in the event log?

I have a Windows 2008R2 server that's reporting the following error: The file system structure on the disk is corrupt and unusable. Please run the chkdsk utility on the volume ...
3
votes
1answer
335 views

SCCM WMI Get Patches that require reboot

How can i get all patches that require a reboot before running the install process using WMI and SCCM. So far i have this wmi query that lists all the available patches but none of the properties ...
1
vote
1answer
204 views

How can I retrieve the data types of properties when querying WMI via Winrm

Winrm allows me to query WMI via the WS-MAN protocol as opposed to DCOM. However, in the DCOM implementation I can retrieve the data types of the various properties of the various classes I query. ...
2
votes
1answer
274 views

Use WMI to remove a page file

I can modify page file settings via WMI like this PS D:\> gwmi win32_pagefilesetting MaximumSize Name Caption ...
-1
votes
1answer
46 views

How to loop specific powershell script

I need to uninstall Java from several computers in my network. After almost all day of Googling it seems the best way to do this is with a Powershell script. I found one that I have tested on a few ...
0
votes
0answers
81 views

Powershell script to retrieve the same kind of info reported by DMDIAG for dynamic disks

This article about windows partition alignment explains that checking the alignment offset of dynamic disks can be done with the DMDIAG tool to get the "relative sectors" property. With dynamic ...
6
votes
2answers
676 views

powershell: How to check if S.M.A.R.T is enabled on remote machines

I was attempting to get disk info of remote machines, including whether or not SMART is enabled on the drive by using the win32_diskdrive class. This is trickier than I thought. While it's easy ...
3
votes
1answer
178 views

Windows PowerShell Select removing columns

I am a linux guy so I'm used to "grep". With grep it keeps the columns, however in powershell it changes the output. For example: Get-WmiObject -List | Select-String -Pattern "Win32_LogicalDisk$" ...
3
votes
2answers
756 views

Delete Shadow Copies Remotely

I currently use DISKSHADOW to remove shadow copies from our Hyper-V servers. To do this I have to log onto the server but psexec doesn't work. psexec \\hyper-v-server diskshadow DISKSHADOW> Error ...
0
votes
1answer
606 views

Exception Enumerating SQL Server Instances with SMO WMI ManagedComputer

I'm trying to use the SMO WMI API/objects in PowerShell 2.0 on Windows 7 with SQL Server 2008 R2 installed to get a list of SQL Server instances on the local computer using the Managed Comuter object. ...
0
votes
2answers
783 views

Update content on an application with Powershell or WMI in Microsoft SCMM 2012 SP1

While right-clicking an applications deployment type(s), we can select Update Content. Is there a way of doing this action using Powershell or a WMI-method?
2
votes
1answer
156 views

Remote disk monitoring with WMI without admin rights

I am setting up a restricted WMI group that should be able to read WMI information from my remote hosts. I have the group set up as member of the remote DCOM and performance monitor groups. I also ...
2
votes
2answers
469 views

PowerShell to reset local Administrator account password. 5% failures

I have the responsibility for changing the local administrator account password on my environment of 16,000 servers; I wrote a PowerShell script, but it took too long, so I added multi-threading using ...
0
votes
1answer
85 views

Pinging the hostname of the server I'm on does not reach out to DNS, responds with 'lowest' numerical IP

For example: Server: server1.contoso.com IPs present on server: Initially configured statically with 10.10.20.100, it had two additional IPs added to the same NIC, 10.10.20.20 and 10.10.20.102. A ...
0
votes
1answer
487 views

Use SCOM 2012, WMI, or Powershell to identify all servers that have hyper threading turned off

We recently setup SCOM 2012 and deployed agents to all of our servers. We also have noticed that a number of these servers do not have hyper threading enabled, which they should. Is there any way we ...
4
votes
1answer
100 views

Is it easy or even possible yet to manage windows firewall with powershell?

I'm doing some POC testing on a server 2012 environment, and during initial firewall configuration I find myself going to the GUI repeatedly when I'd really much rather be able to write a script. I've ...
0
votes
1answer
3k views

How to get cluster information remotely via Powershell?

I've been trying to find a good way to gather various pieces of a windows cluster setup remotely, preferably via WMI, as we are not yet at a point where Powershell remoting is implemented (and I know ...
0
votes
1answer
610 views

Remote Administer Local Groups with PowerShell and WMI

How do I administer local groups on a remote server with PowerShell and WMI? For example, I would like to add and remove domain AD groups from the "Remote Desktop Users" group. This article provides ...
1
vote
1answer
497 views

Obtain device driver version and associated GUID using PowerShell?

Right now, I am getting two separate objects A Win32_NetworkAdapter WMI object A Win32_PnpSignedDriver WMI object In my previous scripts, I've made sure I was calling separate objects, and ...
1
vote
2answers
1k views

Get detailed network adapter information using PowerShell

Is there an alternative to Get-NetAdapterRss that can be used on Windows Server 08/03/etc.? I'm looking to query NIC information from servers with a powershell script, but cannot seem to find how to ...
0
votes
0answers
4k views

List ALL Printers using Powershell

I'm having issues listing all the printers on a computer using Powershell. We have a batch script that will add/remove/list "per computer" printers using PrintUI. I can use PrintUI to list the ...
4
votes
1answer
2k views

How to get physical partition name from iSCSI details on Windows?

I've got a piece of software that needs the name of a partition in \Device\Harddisk2\Partition1 style, as shown e.g. in WinObj. I want to get this partition name from details of the iSCSI connection ...
0
votes
1answer
525 views

How to retrieve names of all private MSMQ queues - efficiently?

How can I retrieve the names of all of the private MSMQ queues on the local machine, without using System.Messaging.MessageQueue.GetPrivateQueuesByMachine(".")? I'm using PowerShell so any solution ...
2
votes
2answers
3k views

Powershell or WMI to pull Printer Properties and Additional Drivers?

What I am trying to accomplish: Use a powershell script (WMI or cmdlets directly, or a combination) to query a 2003 or 2008 server with the PrintServer role, enumerate the printers shared, then list ...
1
vote
1answer
550 views

Using Win32_FileSpecification WMI instances

I am trying to get a checksum of a remote file using Win32_FileSpecification class via WMI, but am running into a few problems. It uses CheckID as the key, which looks to be similar to the path with ...
5
votes
1answer
248 views

identify / fingerprint a Windows Server core installation versus full

Seems like this should be easy, but I am not finding any information on how to remotely identify a Windows Server "core" installation as such, via WMI, Powershell or other method that can query lots ...
1
vote
2answers
450 views

How to put laptop to sleep with powershell/vbs/wmi/…?

I'd like to be able to put my laptop to sleep from the command line. According to Microsoft, the Win32_Battery WMI class has a SetPowerState method that looks like it should be able to do this, ...
0
votes
1answer
467 views

Has anyone used WMI_OfflineFilesCache::RenameItem to rename offline files?

The reason I ask is that I have been researching how to rename items once an offline files target has been changed. It seems that so far there are two options: CSCCMD.exe - Which appears to be a ...
2
votes
3answers
724 views

Rename file in folder whenever it's created?

I need to find a way to automatically rename all files that are created within a specific directory on a Windows 2008r2 file server. This needs to be done more or less instantanously, so I can't have ...
0
votes
0answers
324 views

Win32_Process Create returns error 3 - Insufficient Privileges. Options

I've been trying to remotely create a process using WMI (through PowerShell) and i'm experiencing some trouble : The details : Remote Server : Windows 2003 R2 (Domain controller). Local ...
2
votes
1answer
560 views

Converting WMI from vbscript to powershell

I'm trying to follow the guides for accessing IIS 6 using WMI but I'm having trouble working out how to translate the Get method of SWbemServices as Get-WmiObject doesn't seem to use the same path ...
2
votes
1answer
560 views

How do I uninstall an ActiveX control via Powershell

I have to constantly switch back and forth between two installations of a web app with two different versions of an ActiveX control. Therefore I'd like to script the ability to uninstall this control. ...
1
vote
2answers
1k views

How can I update HTTP custom headers in IIS6 using Powershell?

I have the following Powershell script which uses WMI to update the HTTP custom headers on a website in IIS 6. The script seems to work fine, no errors generated, and the resultant $website object ...
1
vote
2answers
262 views

Listing services on remote machine locks me out of the machine

I run a powershell command to list all of the services on a remote matchine: $b = 0; get-wmiobject win32_service -computer $computerName -credential $cred | select-object Name, ...
0
votes
1answer
2k views

I get Get-WmiObject : Generic Failure error on an XP Machine. What needs to be done to get rid of this?

I am trying make an uninstall app which removes an application X on a regular basis. The starting point to access applications installed in a Windows machine is through retrieving them from a WMI ...
0
votes
3answers
3k views

Export a list of installed features on a Windows 2008 server

I have been asked to specify the features which are installed on a production web server so a replica test environment can be created. I could point and click my way to the solution but I am curious ...
3
votes
3answers
2k views

Detect corrupted WMI

When WMI is corrupted it will fail in the strangest ways, certain queries (most of them) will work, some will throw exceptions, others will time out and a few will simply return no (or ...
0
votes
1answer
255 views

VBScript Array Help for Select Statement

I'm using a select statement to show all services on a system currently set to Auto (automatic). The trouble is the list of service I do not want to see is growing. While still not larger than the ...
2
votes
1answer
3k views

Remote installing an msi on citrix servers using WMI

OK, I'm a C# programmer that is trying to streamline the deployment of a custom windows form app I inherited and built an installer for with WiX (this app will need to be reinstalled regularly as I'm ...
1
vote
1answer
2k views

How to troubleshoot a remote wmi query/access failure?

I'm using Powershell to query a remote computer in a domain for a wmi object, eg: "gwmi -computer test -class win32_bios". I get this error message: Value does not fall within the expected range ...
3
votes
2answers
11k views

How to uninstall software using batch file

I want to uninstall a software by calling a bat file. It must be automatically, without entering any parameters during the uninstallation. How to make the bat file which would be able to uninstall ...
2
votes
1answer
2k views

Determine Users Accessing a Shared Folder Using PowerShell

I need to determine the users/sessions accessing a shared folder on a Windows XP (SP2) machine using a PowerShell script (v 1.0). This is the information displayed using Computer Management | System ...
2
votes
1answer
7k views

Scripting inventory of machine name, current username, Operating System using WMIC or powershell

I have a text file of every machine in our Windows Active Directory domain, and I would like to determine the currently logged in user (if any) and operating system of each machine using WMIC: WMIC ...