r/PowerShell•
crazyjockey

Trying to modify WMI with CIM cmdlets

Hi everyone,

I'm trying to enable NETBIOS over TCP/IP with Powershell. This is easy to do with the WMI cmdlets;

$NetAdapter = Get-WmiObject -ClassName Win32_NetworkAdapterConfiguration -Filter "IPEnabled=$true"
$NetAdapter.SetTcpipNetbios(1)

However, the Get-CimInstance cmdlet doesn't have a method for that namespace which I can use, and the TcpipNetbiosOptions property is read-only. Thus, the following doesn't work;

$NetAdapter = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter "IPEnabled=$true"
$NetAdapter.TcpipNetbiosOptions = 1
Set-CimInstance -InputObject $NetAdapter

Can anyone give me any clues about how I can achieve this with the CIM cmdlets?

Thanks!

Posted Feb 17, 2017, 3:45 AM UTC

1110
Loading comments…