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"
}
```
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! π