• PowerShell get password expiration date
    16 August

    Get Password Expiration Date in PowerShell

    Using Get-ADUser Cmdlet Use the Get-ADUser cmdlet to get the password expiration date for one specific user in an Active Directory. [crayon-663d601921718077948461/] [crayon-663d601921724803498704/] The Get-ADUser cmdlet is used to get one or multiple users from an active directory. We used it with the -Identity parameter to only get the Administrator user with SamAccountName and msDS-UserPasswordExpiryTimeComputed […]

  • PowerShell get ad user home directory and home drive
    16 August

    Get AD User Home Directory and Home Drive in PowerShell

    Using Get-ADUser Cmdlet We use Get-ADUser differently based on various use cases; let’s explore a few of them below. Get Home Directory & Drive for One User Use the Get-ADUser cmdlet to get the ad user’s home directory and home drive. [crayon-663d601921c61450437124/] [crayon-663d601921c6b083466760/] First, we initialized the $username variable with the Administrator; this was the […]

  • Bash Check if boolean is true
    02 August

    Check If Boolean Is True in Bash

    Using if Statement We can use an if statement with different variations to determine whether the provided Boolean variable is true. Note that the examples covered in this section will be similar. We will learn the first example in Use if with true Condition in detail, but later, we will discuss the section which will […]

  • PowerShell round to whole number
    03 June

    PowerShell Round to Whole Number

    Using [Math]::Round Method Use the [Math]::Round to round number to whole number in PowerShell. [crayon-663d601922c70402266493/] [crayon-663d601922c7b806366313/] We can observe the [Math]::Round method rounds a decimal number to the nearest whole number. In PowerShell, the [Math]::Round method takes two arguments: The number that you want to round. The number of decimal places to round to. Here, […]