Get-DhcpServerv4Lease is not available in Windows 10. Remove the reference or update the text.
Get-DhcpServerv4Lease : The term 'Get-DhcpServerv4Lease' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ CategoryInfo : ObjectNotFound: (Get-DhcpServerv4Lease:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Ensure "RSAT: DHCP Server Tools" has already been added under the "Manage optional Features" setting. If not, add this feature and retry.
If this feature has already been added and the cmdlet is still not recognized, open the DHCP desktop app to see if its having issues as well and troubleshoot accordingly.