Category Archives: PowerShell v4

PowerShell package management on PowerShell 3 and 4

PowerShell 5.0 introduced PackageManagement (Oneget) – for managing software installation packages and PowerShellGet for managing PowerShell modules. Those features are now available on PowerShell 3 and 4 https://blogs.msdn.microsoft.com/powershell/2016/03/08/package-management-preview-march-2016-for-powershell-4-3-is-now-available/ Advertisements

Posted in PowerShell V3, PowerShell v4, PowerShell v5 | Leave a comment

WMF 4.0 Updates available downlevel

The WMF 4.0 Updates that were released in November 2014 for Windows 8.1 and Windows Server 2012 R2 are now available for: Windows Server 2012 Windows Server 2008 R2 SP1 Windows 7 SP1 You need WMF 4.0 installed to install … Continue reading

Posted in PowerShell v4 | Leave a comment

Creating NIC team without knowing the team members

I was asked how to create a NIC team only using the 1GB adapters without knowing how many 1gb NICs were on the server.   I think this should solve the problem   New-NetLbfoTeam -TeamMembers (Get-NetAdapter | where Speed -ge … Continue reading

Posted in Networking, PowerShell V3, PowerShell v4 | 1 Comment

Creating a DHCP reservation

For my demo at the PowerShell Summit I wanted to use DHCP for the Linux machine but guarantee that it had a specific IP address.  Time to create a DHCP reservation   The DHCP module in Windows Server 2012 and … Continue reading

Posted in DHCP, PowerShell v4, Windows Server 2012 R2 | Leave a comment

Authorising a DHCP server and creating a scope

I recently re-built my test lab and now need to authorise the DHCP server. You can test the DHCP server: £> Get-DhcpServerSetting IsDomainJoined            : TrueIsAuthorized              : FalseDynamicBootp              : TrueRestoreStatus             : FalseConflictDetectionAttempts : 0NpsUnreachableAction      : FullNapEnabled                : FalseActivatePolicies          : True Authorisation … Continue reading

Posted in DHCP, PowerShell v4, Windows Server 2012 R2 | Leave a comment

CIM or WMI – – accessing remote machines

I much prefer the CIM cmdlets for accessing remote machines. The WMI cmdlets use DCOM which is firewall unfriendly and can often be unavailable of a server – cue the dreaded RPC server is unavailable error messages. By contrast the … Continue reading

Posted in CIM, PowerShell and WMI, PowerShell V3, PowerShell v4 | Leave a comment

CIM or WMI – – using methods

The CIM and WMI cmdlets both provide a way to use the methods on CIM classes namely Invoke-CimMethod and Invoke-WmiMethod. The cmdlets are very similar in operation. $vol = Get-WmiObject -Class Win32_Volume -Filter “DriveLetter = ‘D:’” Invoke-WmiMethod -InputObject $vol -Name … Continue reading

Posted in PowerShell and WMI, PowerShell V3, PowerShell v4 | Leave a comment