Q 1. You have a task to find all correct IP address in text log file with your PowerShell script. Which of the following regex expressions will help you?
You have written a script that gathers some file parameters with the following command:
Get-ChildItem –Path -Filter *.mkv -Recurse | Select-Object directoryname, basename, length
After that, you use Export-CSV. At the end of your script, you have to open your CSV file in Excel application. Which command should be used?
You have a task to block domain users in OU Managers and subOU’s with last login older than 90 days. You are writing the first part of the script. What should you write after pipe?
$DaysInactive = 90
$InactiveDate = (Get-Date).Adddays(-($DaysInactive))
Get-ADUser -SearchBase "OU=Managers,DC=Domain,DC=com" -Filter * |