Powershell script to list out all Date Definitions and their dates

Follow

\his script will list all custom date definitions and the dates that have been defined for them.  This is useful for being able to easily confirm whether all of the proper dates for the calendar have been defined.

### Import Module and Add JAMS Drive
Import-Module JAMS
New-PSDrive JD JAMS Localhost

### CD into Dates folder
CD JD:\Dates
Get-ChildItem | Out-Default

### Get all of the dates
$dates = Get-ChildItem 
Write-Output $dates | Select -Property Name,Description

### Loop through each calendar and display their dates for each
ForEach($calendar in $dates){

Set-Location $calendar.Name
$calendarDates = Get-Childitem 
Write-Output $calendarDates | out-Default
Set-Location JD:\Dates 

}
Have more questions? Submit a request

Comments