< Back

Get-FutureList

Wed Jul 15, 2020 5:53 pm

NAME
Get-FutureList

SYNOPSIS
Finds all users with extensionAttribute4 (flight) set for a selection of OUs, and exports that data to an Excel document


SYNTAX
Get-FutureList -Path <System.IO.FileInfo> [-Show <switch>] -OU <array> [-Logding <switch>] [<CommonParameters>]

Get-FutureList -Path <System.IO.FileInfo> [-Show <switch>] -OU <array> [-Logding <switch>] [-Operations <switch>] [<CommonParameters>]

Get-FutureList -Path <System.IO.FileInfo> [-Show <switch>] -OU <array> [-Logding <switch>] [-WorkPhone <switch>] [<CommonParameters>]

Get-FutureList -Path <System.IO.FileInfo> [-Show <switch>] -OU <array> [-Logding <switch>] [-Pager <switch>] [<CommonParameters>]


DESCRIPTION
Searches secected OUs for users with extensionAttribute4 (flight) set, then exports the SamAccountName, Name, Flight, Dorm, Room, Phone, DaySleeper, Pager, WorkPhone, and Title into an Excel
document. This allows assigned administrators to update the users AD information using the Set-FutureRoom function.
AD attribute employeeType = DaySleeper
AD attribute extensionAttribute10 = Dorm
AD attribute extensionAttribute11 = Room
AD attribute extensionAttribute12 = Phone
AD attribute extensionAttribute4 = Flight
AD attribute facsimileTelephoneNumber = WorkPhone
AD attribute Name = Name
AD attribute pager = Pager
AD attribute SamAccountName = SamAccountName
AD attribute title = Title


PARAMETERS
-Path <System.IO.FileInfo>
Path and name of where to save the Excel document. Later use this same path in the function Set-FutureRoom to update the users active directory attributes.

Required? true
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Show [<switch>]
Opens the Excel file immediately after creation. Convenient for viewing the results instantly without having to search for the file first. Excel must be installed on the system opening the
document.

Required? false
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-OU <array>
Specifies an Active Directory path to search. (DistinguishedName)

Required? true
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Logding [<switch>]
Hides the Excel columns not related to Lodging.

Required? false
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Operations [<switch>]
Hides the Excel columns not related to Operations.

Required? false
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WorkPhone [<switch>]
Hides the Excel columns not related to work phones.

Required? false
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Pager [<switch>]
Hides the Excel columns not related to pagers.

Required? false
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
System.IO.File



NOTES


Requires the module ImportExcel (By Douglas Finke) and Active Directory
Install-Module -Name ImportExcel

===========================================================================
Created on: 8/16/2019 4:55 PM
Created by: Craig Moore (McMurdo Sr Systems Administrator)
Organization: United States Antarctic Program
Filename: Get-FutureList.ps1
===========================================================================

-------------------------- EXAMPLE 1 --------------------------

PS C:\> Get-FutureList -Path "C:\Temp\List.xlsx" -OU "DC=FABRIKAM,DC=COM"

Finds all users with extensionAttribute4 -like "*" within the given OU and records all identified information. Saves Excel document to C:\Temp\List.xlsx
-------------------------- EXAMPLE 2 --------------------------

PS C:\> Get-FutureList -Path "C:\Temp\List.xlsx" -OU "DC=FABRIKAM,DC=COM" -Show

Finds all users with extensionAttribute4 -like "*" within the given OU and records all identified information. Saves Excel document to C:\Temp\List.xlsx and opens the Excel file.
-------------------------- EXAMPLE 3 --------------------------

PS C:\> Get-FutureList -Path "C:\Temp\List.xlsx" -OU "DC=FABRIKAM,DC=COM" -Logding -Show

Finds all users with extensionAttribute4 -like "*" within the given OU and records all Lodging information. Saves Excel document to C:\Temp\List.xlsx and opens the Excel file.
-------------------------- EXAMPLE 4 --------------------------

PS C:\> Get-FutureList -Path "C:\Temp\List.xlsx" -OU "DC=FABRIKAM,DC=COM" -Operations -Show

Finds all users with extensionAttribute4 -like "*" within the given OU and records all Operations information. Saves Excel document to C:\Temp\List.xlsx and opens the Excel file.
-------------------------- EXAMPLE 5 --------------------------

PS C:\> $OU = "OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM","OU=Marketing,OU=UserAccounts,DC=FABRIKAM,DC=COM"

$Path = "\\File-Server\Update\List.xlsx"
Get-FutureList -Path $Path -OU $OU -Operations
Finds all users with extensionAttribute4 -like "*" within the given two given OUs set bey $OU and records all Operations information. Saves Excel document to $Path

RELATED LINKS