• PowerShell add days to Date
    28 June

    PowerShell Add Days to Date

    Before we start, knowing how dates are stored in PowerShell is essential. Dates are stored as DateTime, which contains both a date and a time. The dates are in the MM/DD/YYYY format. Let’s continue learning different ways to add days to date in PowerShell. Using AddDays() Method Use the AddDays() method to add days to […]

  • PowerShell compare lastwritetime of two files
    06 May

    PowerShell Compare LastWriteTime of Two Files

    Using LastWriteTime property To compare LastWriteTime of two files in PowerShell: Use Get-Item to get items. Use the if-else block to compare LastWriteTime of both files. [crayon-662d180a7c0c1204660310/] [crayon-662d180a7c0c8173982557/] Using Compare-Object Cmdlet To compare the LastWriteTime of two files in PowerShell: Use Get-Item to get items. Use the Compare-Object cmdlet to compare the LastWriteTime of two […]

  • PowerShell convert epoch time to DateTime
    14 April

    PowerShell Convert Epoch Time to DateTime

    Before moving towards various solutions to convert the Epoch time to Datetime, it is essential to know the Epoch time. Epoch time, POSIX time or Unix time is the system for denoting a point in time to a single number. This single number is the number of seconds (not counting leap seconds) that have elapsed […]