# encoding: ascii
# api: powershell
# title: More PSDrives
# description: Two functions for create and remove additional drives.
# version: 0.1
# type: function
# author: greg zakharov
# license: CC0
# function: Mount-UserDrives
# x-poshcode-id: 3983
# x-archived: 2013-02-27T05:27:24
# x-published: 2013-02-21T14:10:00
#
#
function Mount-UserDrives {
  <#
    .Synopsis
        Create additional user drives.
    .Description
        To remove drives created with this function use Remove-UserDrives.
    .Link
        New-PSDrive
        Remove-UserDrives
  #>
  [Enum]::GetNames([Environment+SpecialFolder]) | % {
    New-PSDrive -n $_ -ps FileSystem -r $([Environment]::GetFolderPath($_)) -s Global | Out-Null
  }
}

function Remove-UserDrives {
  <#
    .Synopsis
        Remove additional user drives.
    .Description
        Dismount drives which mounted with Mount-UserDrives.
    .Link
        Remove-PSDrive
        Mount-UserDrives
  #>
  [Enum]::GetNames([Environment+SpecialFolder]) | % {
    Remove-PSDrive -n $_ -ps FileSystem -s Global
  }
}
