Author: Mehvish Ashiq
- 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-6767f6a6ca9a3491373461/] [crayon-6767f6a6ca9aa883654378/] 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 […]
- 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-6767f6a6cb919801521091/] [crayon-6767f6a6cb91f631900101/] First, we initialized the $username variable with the Administrator; this was the […]
- 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 […]
- 03 June
PowerShell Round to Whole Number
Using [Math]::Round Method Use the [Math]::Round to round number to whole number in PowerShell. [crayon-6767f6a6cbdb6151932358/] [crayon-6767f6a6cbdba494722208/] 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, […]