Skip to content

Assia-Elguerch/PowerShell-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PowerShell Scripts Documentation πŸ“œ

Process Management Script πŸ”„

Overview This PowerShell script allows you to manage processes on a Windows system.

Instructions

πŸš€ Run the script. πŸ–‹οΈ Enter the name of the process. πŸ”’ Enter the ID of the process. πŸ› οΈ Choose an action (case-sensitive): 'stop': Stop the specified process. 'start': Start a new process. 'wait': Wait for a process to complete. Example

powershell Copy code Get-Process

```powershell
$NAME = Read-Host "The name of the process "
$ID = Read-Host "The ID of the process"
$action = Read-Host "Choose an action: stop - start - wait"

if ($action -eq "stop") {
    Stop-Process -id $ID -Force
} ElseIf ($action -eq "start") {
    Start-Process $NAME
} ElseIf ($action -eq "wait") {
    Wait-Process $NAME
} Else {
    Write-Host "Enter a valid action or a valid process name"
}
```

User and Group Management Script πŸ‘₯

Overview This PowerShell script allows you to manage local users and groups on a Windows system.

Instructions

πŸš€ Run the script. πŸ” Choose to manage Users or Groups (case-sensitive). πŸ› οΈ Based on the selection, perform the desired action. πŸš€User Management Options

πŸ”’ Disable a User πŸ”“ Enable a User βž• Add a User βž– Remove a User πŸ”„ Rename a User πŸ‘€ Show all users πŸš€Group Management Options

πŸ‘₯ Show users in a group βž• Add a member to a group βž• Add a group βž– Remove a group πŸ”„ Rename a group πŸ‘€ Show all groups βž– Remove a user from a group Example

```powershell
$Type = Read-Host "Choose Users to manage users or Groups to manage groups"

if ($Type -eq "Users") {
    # User management logic...
} ElseIf ($Type -eq "Groups") {
    # Group management logic...
} Else {
    Write-Host "Enter Users or Groups; it is case-sensitive"
}
```

Note

πŸ“ Please follow the on-screen prompts to provide necessary information for each operation. πŸ”’ For security-related actions, such as password entry, the script uses secure string input. Feel free to customize and enhance these scripts based on your specific requirements! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published