PowerShell

PowerShell Basics : Find commands by using Get-Command cmdlet.

  Sometimes, the more we do advance things, the more we keep forgetting the  basics. Today while working on some script, I forget the command  which I need to use. I do know the module name of the command which it belongs to… So I just my little helpful cmdlet Get-Command –Module MoDuleName and it… Continue reading PowerShell Basics : Find commands by using Get-Command cmdlet.

PowerShell

PowerShell Tips : How to find all DSC related cmdlets

  It’s very easy to find the PowerShell “Desired State Configuration” cmdlets. Just run the below command , and it will show you all DSC related Cmdlets. Get-Command -Module PSDesiredStateConfiguration     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… Continue reading PowerShell Tips : How to find all DSC related cmdlets

PowerShell

Working with PowerShell Preference Variables: $OFS (Output field Separator).

  When you open PowerShell console, type $ and start pressing ‘tab’, you will amaze that there are many pre-built variables exists there. One of the variable is $OFS, this is a preference variable and full meaning of $OFS is ‘Output Fields Separator’. What it does? It specified the character to use as separator while… Continue reading Working with PowerShell Preference Variables: $OFS (Output field Separator).

PowerShell

PowerShell Tip : Find Default Printer Installed using Powershell.

The job of System Administrators are very adventurous, sometime you have to find a little-little settings and sometime you have to write a big-big,  hundred’s of line’s scripts. Today, my task was to find a default printer installed on laptops. To solve it , i used the Win32_Printer class. You can run the below query… Continue reading PowerShell Tip : Find Default Printer Installed using Powershell.

PowerShell

Powershell Tips : Use Only Powershell V2 cmdlets , with PowershellV3 Installed.

I use Windows 7 (64 bit) with Powershell V3 installed on it. Most of our users are still on PowerShell v2, Sometime when I am writing scripts for them i use some PowerShell v3 cmdlets accidently. Normally I write the initially version of all scripts on PowerShell console and I do test my all script… Continue reading Powershell Tips : Use Only Powershell V2 cmdlets , with PowershellV3 Installed.

PowerShell

Getting Last Installation Success Date and Last Search Success date of Windows Updates using Powershell.

  Everyday is a new day , with new problems and new issues, sometime at users side and sometime at Server side. The life in IT is quite happening. These new issues and problems leads to new solutions and new scripts. In my environment I asked few users to run their windows updates, but as… Continue reading Getting Last Installation Success Date and Last Search Success date of Windows Updates using Powershell.

PowerShell

Powershell Techniques : Lock Your Workstation using Powershell.

In my previous post, I created test button on Login Screen changer GUI,  when you clicked on them it lock your workstation. I got few queries that which code I used behind the above Test button.  I used the below code to lock the workstation.  $shell = New-Object -com “Wscript.Shell”  $shell.Run(“%windir%\System32\rundll32.exe user32.dll,LockWorkStation”) Just shoot the… Continue reading Powershell Techniques : Lock Your Workstation using Powershell.