- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Chirag Nagrekar has Published 465 Articles
Chirag Nagrekar
5K+ Views
To remove a member from the local group using PowerShell, we can use the RemoveLocalGroupMember command. This command is available in the module Microsoft.PowerShell.LocalAccounts in and above PowerShell version 5.1.To use this command, we need to provide two parameter values. One is the -Group (Local Group Name) and the second ... Read More
Chirag Nagrekar
807 Views
To create a new local group on the local or the remote system using PowerShell, we can use the NewLocalGroup command. ExampleNew-LocalGroup -Name "TestGroup" -Description "Test Group"OutputName Description ---- ----------- TestGroup Test GroupYou can verify it from the Computer Management GUI.To create the local group on ... Read More
Chirag Nagrekar
3K+ Views
To add users to the local groups using PowerShell, we need to use the Add-LocalGroupMember command (Module − Microsoft.PowerShell.LocalAccounts).Add-LocalGroupMember -Group "Administrators" -Member "NewLocalUser", "labdomain\Alpha", "Labdomain\ITSecurity"The above command adds 2 users (NewLocalUser (Local) and Alpha (Domain)) and one Domain Security Group ITSecurity to the Local Administrators group.You can also use the other ... Read More
Chirag Nagrekar
12K+ Views
To get the local groups on the windows system using PowerShell, you can use the Get-LocalGroup (Module: Microsoft.PowerShell.LocalAccounts) command. This command will list down all the groups on the particular system.If we check the properties of this command, it supports Name, Description, ObjectClass (user or group), PrincipalSource (ComputerName – Local ... Read More
Chirag Nagrekar
102 Views
In part-1 we have seen the PowerShell pipeline functionality using the ValueFromPipeline property. There is another cmdlet property known as ValueFromPipelineByPropertyName, which is also useful to know the PowerShell pipeline functionality.Like part-1 command, we can get this property name using the same Get-Command but the filter parameter we will use ... Read More
Chirag Nagrekar
118 Views
PowerShell is made easier with the Pipeline structure. With the Pipeline structure, we can pass the input of the left side command output or string to the right side of the command as the input. For example, Get-Service | Out-File c:\services.txtIn the above example, we are passing Get-Service output as ... Read More
Chirag Nagrekar
3K+ Views
To block the port using PowerShell on the Windows OS, we need to change the firewall settings using the New-NetFirewallRule command.ExampleWe need to block the port 5985 on the computer. The below code will block all TCP Incoming requests on the 5985 port on the local computer.New-NetFirewallRule -DisplayName "Block WINRM HTTP Port" ` ... Read More
Chirag Nagrekar
2K+ Views
To open a port in the Windows Operating system, we need to know a few things. LikeFor which Profile we need to open port (Public, private, or Domain)? - OptionalWhich port do we need to open (port Number)?The direction of the port – Inbound (i.e Incoming requests) or Outbound (i.e. ... Read More
Chirag Nagrekar
8K+ Views
There are multiple files and folders attribute supported by the Windows Operating System. To check which attributes that files and folders support use DOS command attrib /?You can see the attributes listed like Read-Only, Archive, etc. You can set the attribute using PowerShell.For example, we have a file called TestFile.txt ... Read More
Chirag Nagrekar
2K+ Views
To retrieve files and folders attributes using PowerShell, you can use Get-Item or Get-ChildItem command. For example, We have a file called testfile.txt to get its attributes, PS C:\> Get-ChildItem C:\Temp\TestFile.txt |Select Name, Attributes Name Attributes ---- ... Read More