Questions tagged [wmi]

Windows Management Instrumentation

Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers but WMI also supplies management data to other parts of the operating system and products, for example System Center Operations Manager, formerly Microsoft Operations Manager (MOM), or Windows Remote Management (WinRM).

396 questions
4
votes
3 answers

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 = Get-WMIObject Win32_NetworkAdapterConfiguration |…
Derrick
  • 143
  • 1
  • 1
  • 5
4
votes
1 answer

Can I apply a Group Policy only to systems that have specific software installed?

If I wanted to setup a group policy that installed Java, this would be no problem. But is it possible for the group policy to only apply to systems that have Mozilla Firefox installed? I don't know much about WMI, but I imagine if it can be done, it…
Ingram
  • 153
  • 1
  • 2
  • 7
4
votes
2 answers

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 ----------- ---- …
Andrew J. Brehm
  • 1,611
  • 7
  • 37
  • 57
4
votes
1 answer

The RPC server is unavailable from .NET over AWS

I am trying to access EC2 machines remotely to get some info using C#. I wrote code as below:- ConnectionOptions options = new ConnectionOptions { Username = serverspace.ServerIP + @"\xxxxxx", Password = "xxxxxxx", Impersonation =…
Bassam Gamal
  • 250
  • 4
  • 12
4
votes
6 answers

How to get the IP Address for your Local Area Connection on Windows Server?

I want to create a batch or vbs file that will put together a url and executed. Part of that url needs to be the actual ip address of the machine. How I am able to get that IP address in a variable to include it on the script? EDIT 1: I found out…
Geo
  • 3,071
  • 11
  • 42
  • 52
4
votes
1 answer

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 searched around but I can't find anything about…
bwerks
  • 752
  • 3
  • 10
  • 22
4
votes
1 answer

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 that underlies the partition. The trouble is that…
Barry Kelly
  • 154
  • 2
  • 9
4
votes
2 answers

How to check if WMI is broken or not?

I'm looking for a way to check whether WMI is running properly on a Windows Server 2008 machine. I'd prefer to do this by running a command. Is there any?
Hakan
  • 225
  • 1
  • 3
  • 8
4
votes
1 answer

Prevalence of WMI enabled in real Windows Server networks

Hi I would like to get opinions from systems administrators, on how common it is that WMI functionality is actually enabled in corporate networks. I am writing an enterprise network application that could benefit from the features of WMI, but I…
TripleAntigen
  • 201
  • 3
  • 8
4
votes
4 answers

How can I get WMI to return info on physical disks in Dell Poweredge server with RAID enabled?

I'm using WMI to gather stats on some of our servers, and I'm trying to get details of the physical disks that are installed in each server. The servers are various Dell PowerEdge models. Windows' built-in providers is reporting on the RAID volumes…
Dylan Beattie
  • 576
  • 3
  • 9
  • 24
4
votes
1 answer

Use WMI to detect a USB drive was connected, regardless of whether it was mounted?

I am writing a script that uses MS KB 823732 to temporarily prevent users from plugging in new USB storage devices. This works fine, and the HKLM\...\Services\UsbStor registry key successfully blocks newly-connected devices from being accessed. Is…
4
votes
2 answers

What is the WMI class to manage BitLockerToGo

I am working on a script that will be used to audit some machines. I can check whether or not volumes are encrypted using the Win32_EncryptableVolume class in root\cimv2\Security\EncryptableVolume. What class can I can query for info on…
Andy Schneider
  • 1,543
  • 5
  • 19
  • 28
4
votes
2 answers

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 software by name? PS: I know the perfect method…
Oleksandr G
  • 143
  • 1
  • 1
  • 6
3
votes
1 answer

Windows SMTP: Script Outbound Security

Building a config script in PowerShell to configure web servers' SMTP service to use the AWS SES (simple email service) for outbound mail delivery. Easy to do manually, but as we enter a load-balanced world, I'm having a helluva time getting it…
Chris_K
  • 3,444
  • 6
  • 43
  • 45
3
votes
2 answers

Is Microsoft moving away from WMI?

I've using Linux for years and recently I've joined new organisation who's entire infrastructure is based on Windows Server 2012R2. Ever since then, I've been learning PowerShell and I find it is very powerful, the notion of everything in OS is an…
Dilshad Abduwali
  • 175
  • 1
  • 3
  • 7