Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Software & Coding Articles
Page 79 of 83
How to get services based on multiple conditional parameters in PowerShell?
To filter out services with both start-type “Automatic” and Status “stopped” we need to use the -AND comparison operator. Here, services will be displayed only when both conditions are matching.CommandGet-Service | where{($_.StartType -eq "Automatic") -and ($_.Status -eq "Stopped")} | Select Name, StartType, StatusOutputName StartType Status ---- --------- ------ gpsvc Automatic Stopped gupdate Automatic Stopped MapsBroker Automatic StoppedCommandTo get services with start-type manual or disabled we will use -OR operator.Get-Service | where{($_.StartType -eq "Manual") -or ($_.StartType -eq "Disabled")} | Sort-Object Starttype | Select Name, StartType, StatusOutputLxpSvc ...
Read MoreHow to search for the specific service in PowerShell?
You can get the specific service-related information using –name parameter and you just need to provide the service name.CommandGet-Service –Name "Spooler"OutputStatus Name DisplayName ------ ---- ----------- Running Spooler Print SpoolerCommandSimilarly, you can search for more than one service with the –name parameter.Get-Service –Name "Spooler", "RemoteAccess" OutputStatus Name DisplayName ------ ---- ----------- Stopped remoteaccess Routing and Remote Access Running Spooler Print SpoolerYou can also use the wildcard character (*) in service name so the console can fetch the entire name.When wildcard character (*) is used at the end of the name then debug console will check the starting string of the ...
Read MoreHow to display specific properties from Get-Service output in PowerShell?
To display the other properties of the services than the default ones (which are supported by Get-Member), you need to pipeline the Select-Object (alias Select) command. For example, in the below command we will display theService name, start type and status of the service.CommandGet-Service | Select-Object Name, StartType, StatusOutputName StartType Status ---- ...
Read MoreHow to get all properties and methods available for the service in PowerShell?
To display all the properties and methods available for the get-service cmdlet you need to pipeline Get-Member (alias gm). MemberType ‘Property’ is to display the specific property like machinename, servicename, etc. and with the MemberType ‘Method’ you can perform specific operations on the object, for example, Start, Stop, Pause the service, etc.CommandThe below command is to display all the members (properties, methods) the Get-Service.Get-Service | Get-MemberOutputName MemberType ---- ---------- Name ...
Read MoreHow to get the services on a local computer with PowerShell?
To get the services on the local computers you need to use Get-Services cmdlet. This command will give you all the services which have running, stopped, stop pending or start pending status, and which has startup type is Automatic, Manual or Disabled.The output of the default table will display Status, Name, and DisplayName three columns.CommandGet-ServiceOutputStatus Name DisplayName ------ ---- ----------- Stopped AarSvc_158379 Agent Activation Runtime_158379 Running AdobeARMservice Adobe Acrobat Update Service Stopped AdobeFlashPlaye... Adobe Flash Player Update ...
Read MoreHow to Enable and Install Third Party Packages Using EPEL Repository on CentOS/RHEL
In this article we shall try to learn, how to add EPEL Repository for Linux. EPEL (Extra Package for Enterprise Linux) is an open source and free community based repository from the Fedora community team which provides high quality and good add-on software’s for Linux distributions. It has Red Hat Enter Linux, CentOS, Scientific Linux and most of the repositories which are maintained by the Fedora team only.Why we use EPEL Repositories for PackagesProvides a lot of open source packages which are installed using yum.EPEL repositories are open source and they are 100% free to use.There will not be any ...
Read MoreDifference between green and native thread
Green threads are created and scheduled by Virtual machine without using OS libraries. “Green” was the project code name of the thread project which was developed by the Java, therefore the name of the thread is “Green”. It can not make use of multiprocessor.On the other hand, Native threads are created and scheduled by Kernel of operating system. It can swap between threads from running thread to non-running thread. All modern OS supports native thread. Sr. No.KeyGreen ThreadNative Thread1Basic Green threads are created and scheduled by Virtual machine without using OS librariesNative threads are created and scheduled by Kernel of operating system2Platform Dependent It ...
Read MoreHow to Add Cron Jobs to A Specific User in a Linux System
This article we will teach you to schedule a cron job to be executed at a specific time in a day.General Syntax of a Cron JobMIN HOUR Day of month Month Day of Week Command 0-59 0-23 1-31 1-12 0-6 linux command or scriptTo see the list of cron jobs which exists on the machine, run the below command# crontab -u test1 -l no crontab for test1To Add the New Cron Job to Test1 User, run the below Command #crontab -u test1 ...
Read MoreLearn How to Manage Various Logs using Logrotate in Linux
Logrotate is designed for administration of Ubuntu systems that generate giant numbers of log records. It allows automatic rotation, compression, removal, and mailing of log records. Each log file could also be handled every day, weekly, monthly, or when it grows. This article explains about -“Learn how to manage various log using logrotate in Linux”To install logrotate, use the following command –$ sudo apt-get install logrotateThe sample output should be like this –Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libecap3 squid-common squid-langpack Use 'sudo apt ...
Read MoreHow To Set-Up Apache to use Password Authentication on Ubuntu 16.04
In this article, we will learn about how to setup and configure the Apache Web server to restrict from visitors without authentication where we can hide some important and critical information to the un-authenticated users.PrerequisitesWe needed an Ubuntu machine with a non-root user with Sudo privileges.An Apache2 web server installed on the machine.Installing the Apache UtilitiesWe needed to install an Apache2 utility package called ‘htpasswd’ where this utility is a part of ‘apache2-utils’ packages.This will help us to create and manage the username and password which is needed to access the restricted part of the website.Below is the command to ...
Read More