Some Useful cmdlets for PowerShell

The Linux operating system has long offered more power and flexibility to its administrators through shell scripting. Microsoft Windows did not have this flexibility due to limited command line capabilities.

Για να ξεπεράσει αυτόν τον περιορισμό, η Microsoft εισήγαγε το PowerShell για να αυτοματοποιήσει αποτελεσματικά τις εργασίες και να διαχειριστεί τις ρυθμίσεις. Ει χτισμένο με .NET Framework και παρέχει πλήρη πρόσβαση σε COM και WMI.

Το PowerShell είναι ένα εργαλείο για δέσμες ενεργειών και αυτοματοποίηση εργασιών σε συστήματα με Windows. Το PowerShell από προ έχει cmdlets, τα οποία εκτελούν προκαθορισμένες εργασίες.

There are hundreds of cmdlets for PowerShell available, designed to perform various administrative tasks.

1. stop-process

This will forcefully shut down the Firefox browser if it is running.

Mandate: Stop-Process -Name Firefox

2. Get-Process

This will display all the processes currently running on the system in table format.

Command: Get-Process | Format-Table

3. Get-EventLog

It will display all the logs related to "Security" from the current system.

Mandate: Get-EventLog -Log “Security”

4. Export-CSV

It will display all "Security" related events in the security.csv file on drive E.

Mandate: Get-EventLog -Log “Security” | Export-Csv E: \ security.csv

5. Get-Service

It will display a list of all services in the current system and their status, in tabular form.

Command: Get-Service | Format-Table

6. Get-Help

It will display detailed usage information about the Format-Table cmdlet.

Command: Get-Help Format-Table

7. Get-CimInstance

This will get details about the operating system that is installed.

Command: Get-CimInstance CIM_OperatingSystem

8. Get-WmiObject

Lists all local users on the current system.

Mandate: Get-WmiObject -Class Win32_UserAccount -Filter "LocalAccount = 'True" " The Best Technology Site in Greecefgns

Subscribe to Blog by Email

Subscribe to this blog and receive notifications of new posts by email.

Written by Anastasis Vasileiadis

Translations are like women. When they are beautiful they are not faithful and when they are faithful they are not beautiful.

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).