Wednesday, February 10, 2016

PowerShell Tips : Finding last boot time by using PowerShell.

 

Want to find out when the last your server/laptop boot up? We have a simple solution for it ;) use the below class ...

 

Get-CimInstance -ClassName win32_operatingsystem 

 

OR

Get-CimInstance -ClassName win32_operatingsystem | select  lastbootuptime

 

8

 

With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.

Tuesday, February 9, 2016

PowerShell Tips : Useful class for getting information on Software licenses information on Windows by using PowerShell.


Looking for finding software licencing information of Windows or other products, try the below command and try to add filters as per your requirements.
You are gonna love it.
Get-CimInstance -ClassName SoftwareLicensingProduct

OR try it.
Get-CimInstance -ClassName SoftwareLicensingProduct |Where{$_.PartialProductKey -and $_.Name -like "*Windows*"}



With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.

Monday, February 8, 2016

PowerShell Tips : Minimise your Desktop using PoweShell.

 

This is soo cool tip :) , We all love "Windows + D " shortcut combination to minimize the all applications those are open on the desktop. If you wanna do the same using PowerShell commnad.

Try the below ;o) .

 

$myDesk = New-Object -ComObject Shell.Application

$myDesk.ToggleDesktop()

7

With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.