Today i would like to publish some useful powershell commands that can use it at daily tasks and get quick your info that need.
Some of these commands already have publish in previous articles but it's better to have it central in one place instead to search articles to find what you want.
The specific Article i will keep it up to date and add commands as often it's possible.
I want to create a central base that everyone can find quick and easy commands that need the specific time.
Any feedback or recommendation will be accepted to improve the functionality and search of the article.
Now Let's take a look in the first commands of the Article.
Exchange Server
Use Exchange Management Shell
Get all users that are in Litigation Hold and Size of Recoverable Items, Purge, Deletions and Versions
Get-Mailbox -ResultSize Unlimited -Filter {LitigationHoldEnabled -eq $true} | Get-MailboxFolder Statistics -FolderScope RecoverableItems | Format-Table Identity,FolderAndSubfolderSize –Auto
Workstations or Servers Info
Retrieve Hard Disk info from Remote PC
Get-CIMInstance Win32_Logicaldisk -filter "deviceid='C:'" -Computer <computername>
Retrieve CPU Type info from Remote PC
Get-CIMInstance Win32_processor -Computer <computername>
Retrieve RAM info from Remote PC
Get-CIMInstance Win32_physicalmemory -Computer <computername>
View all the processes from remote PC
Invoke-Command -Computername <computername1,computername2> -ScriptBlock { Get-Process }
Active Directory Users Info
Get Name Email Address and Title from all users in Active Directory
Get Display Name Email Address and Title for all users in Active Directory
Get Usernames from all users in Active Directory
Get-ADUser -Filter * -Properties userprincipalName | select userprincipalName
Have a nice Weekend!!
Write your feedback, experience or comment and share it with other IT Pro in our commented system.