The two functions use WMI to create a similar output to standard Windows 8 CIM functions. The Windows 8 equilivant functions are Get-Volume and
Get-NetAdapter. The functions use Win32_Volume and Win32_NetworkAdapter to provide this capability. Copy the code to a file with the extension of .ps1 in a location that is easily accessible. Prior to this, the script execution policy in PowerShell should be set to permit scripts to run. RemoteSigned is a good place to start for this. You can dot source the script containing the functions by doing something like this . c:\fso\mytwofunctions.ps1. Once this is done, the functions are accessible just like regular cmdlets. This is covered in Hey Scripting Guy blog on May 14, 2013.

# ----------------------------------------------------------------------------- 
# Script: TwoWmiFunctions.ps1 
# Author: ed wilson, msft 
# Date: 05/08/2013 11:17:12 
# Keywords: Function, Scripting Techniques, WMI 
# comments:  
# HSG-5-14-2013 
# ----------------------------------------------------------------------------- 
Function Get-Volume 
 Param($cn = $env:computername) 
 Get-WmiObject -class win32_volume -ComputerName $cn|  
 Select-Object driveletter, @{LABEL='FileSystemLabel';EXPRESSION={$_.label}},  
  @{LABEL="Size";EXPRESSION={"{0:N2} Gigabytes" -f ($_.capacity/1GB) }},  
  @{LABEL="SizeRemaining";EXPRESSION={"{0:N2} Gigabytes" -f ($_.freespace/1GB) }} 
 } #end function Get-Volume 
Function Get-NetAdapter 
 Param($cn = $env:computername) 
  Get-WmiObject win32_networkadapter |  
   Where-Object {$_.netconnectionstatus} | 
    Select-Object name,  
      If($_.netconnectionstatus -eq 2){"not present"} 
      If($_.netconnectionstatus -eq 4){"up"}}} 
 } # end function get-NetAdapter