powershell active directory 48min
This commit is contained in:
@@ -102,3 +102,52 @@ Set-ADUser -Identity "jpage" -Email "jimmy.page@mrsh.org" -OfficePhone "800-555-
|
|||||||
|
|
||||||
Set-ADUser -Identity 'jpage' -Enabled:$false
|
Set-ADUser -Identity 'jpage' -Enabled:$false
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Set-ADAccountPassowrd
|
||||||
|
|
||||||
|
How to change password of an account
|
||||||
|
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Set-ADAccountPassowrd -Identity "jpage" -Reset -NewPassword (ConvertTo-SecureString "NewPassqord1" -AsPlainText -Force)
|
||||||
|
#for security the user have to set a new password at logon
|
||||||
|
Set-ADUser -Identity "jpage" -ChangePasswordAtLogon $true
|
||||||
|
```
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
### Unlock-ADAccount
|
||||||
|
|
||||||
|
Unlock a Active directory user
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Unlock-ADAccount -Identity 'jpage'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Group
|
||||||
|
|
||||||
|
In Active Directory, groups are used to organize users, computers,
|
||||||
|
and other objects so administrators can manage permissions
|
||||||
|
and access more efficiently.
|
||||||
|
By assigning permissions to a group rather than to individual users,
|
||||||
|
changes can be made quickly by adding or removing members from the group.
|
||||||
|
Active Directory supports different group scopes and types, allowing
|
||||||
|
organizations to control access to resources such as files,
|
||||||
|
applications, and network services in a structured and scalable way.
|
||||||
|
|
||||||
|
### New-ADGroup
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
New-ADGroup -Name "Guitar" -Path "OU=Students, OU=Rock, DC=mrsh, DC=org -GroupScope Gloabal"
|
||||||
|
```
|
||||||
|
### Add-ADGroupMember
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
Add-ADGroupMember -Identity "Guitar" -Members "jpage"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get-ADGroup
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$Group = Get-ADGroup -Identity 'Guitar'
|
||||||
|
```
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
My note from the series of Video by The Powershell Engineer
|
My note from the series of Video by The Powershell Engineer
|
||||||
|
|
||||||
|
PowerShell is a powerful task automation and configuration management
|
||||||
|
framework developed by Microsoft, built on the .NET platform.
|
||||||
|
It combines a command-line shell with a scripting language,
|
||||||
|
allowing users to automate administrative tasks, manage system configurations,
|
||||||
|
and control both local and remote machines efficiently.
|
||||||
|
Unlike traditional command-line tools that work mainly with text,
|
||||||
|
PowerShell works with objects, making it easier to filter, manipulate,
|
||||||
|
and pass data between commands.
|
||||||
|
It is widely used by system administrators, IT professionals, and
|
||||||
|
developers to manage Windows systems, cloud services,
|
||||||
|
and cross-platform environments through PowerShell Core.
|
||||||
|
|
||||||
## 1. Basic
|
## 1. Basic
|
||||||
|
|
||||||
for the learning the basic of the syntax and multiple commands
|
for the learning the basic of the syntax and multiple commands
|
||||||
|
|||||||
Reference in New Issue
Block a user