1

The reason is that I have a Python script running on Linux that needs to access our DHCP which is on a Windows Server. I know I can do it with Powersell with a command:

Get-DhcpServerv4Lease -ComputerName WinServer -ScopeId 192.168.0.0 | Select-Object -Property ClientID, HostName, IPAddress

But I'd prefer to do it with Python on Linux so I can expand my existing script.

IDEtoSATA
  • 11
  • 1
  • One could use [WMI](https://pypi.org/project/WMI/) calls, but as WMI is deprecated, it's not a good direction. I'd say the best option is to bite the bullet and [call Powershell from Python](https://stackoverflow.com/q/21944895/503046). – vonPryz Aug 19 '21 at 09:21

0 Answers0