Category: Powershell

Hi All, A quick powershell script, that if you update the path (either a network machine/server or local) and specifiy location to copy items, it will copy with a date range, current default is 01/01/2017 – 01/01/2019. Please feel free to copy and update to use accordingly. ################################## # )___/( # # {(@)v(@)} # # […]

Read more

Script I have updated and can send alerts when servers hit below a certain space threshold. Please feel free to copy and edit the variables as needed. Use task scheduler to run daily. [cc lang=”Powershell”] ################################## # )\___/( # # {(@)v(@)} # # {|~~~|} # # {/^^^\} # # `m-m` # ################################## # WiseOwl Scripts […]

Read more

List all Local Accounts on a Server Copy the following Below into text pad and save as a .ps1, run script accordingly. Update network path if required. Echo “Input computer name: ” $Computer = Read-Host $Credential = Get-Credential Get-WmiObject -Class Win32_UserAccount -Filter  “LocalAccount=’True’” | Select PSComputername, Name, Status, Disabled, AccountType, Lockout, PasswordRequired, PasswordChangeable, SID | […]

Read more

Disabled Users with LastLogOnDate and OU Structure Copy the Script below it will produce an output file with the results where you have ran the script, you can add a network path if preferred. Script will show Disabled accounts with Last login Date and location of the account. Echo “Input computer name: ” $Computer = […]

Read more

Very small and basic script that pulls last logon times. Copy the code and save as a .ps1 “Get-ADUser -Filter * -Properties * | Select-Object Name, @{Name=”Last Successful Logon”;Expression={[datetime]::FromFileTime($_.’lastLogonTimeStamp’)}} | Sort-Object “Last Successful Logon””  

Read more