Skip to content

Commit 781fafb

Browse files
Removed Remove-UserFromLocalGroup
1 parent 44dbe1a commit 781fafb

10 files changed

+13
-348
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- Issue #44 Remove Get-LocalUserAccounts
2121
- Issue #45 Remove New-LocalUser
2222
- Issue #46 Remove Remove-LocalUser
23+
- Issue #50 Remove Remove-UserFromLocalGroup
2324

2425
## [1.0.0.0] - 2020-09-13
2526
### Added

ComputerManagement/ComputerManagement.psd1

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,15 @@ Description = 'A PowerShell module for working with the local computer'
6969
# NestedModules = @()
7070

7171
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72-
FunctionsToExport = 'New-LocalUser', 'Set-Pass', 'Add-LocalUserToGroup',
73-
'New-ScheduledTask', 'Remove-UserFromLocalGroup', 'Get-CimService',
74-
'Get-NonStandardServiceAccount', 'Remove-LocalUser',
75-
'Get-LocalUserAccounts', 'Get-PendingUpdates', 'Get-ServiceTag',
76-
'Backup-EventLogs', 'Export-EventLog', 'Get-PaperCutLogs',
77-
'Set-ShutdownMethod', 'Get-PrinterLogs', 'Get-OpenSessions',
78-
'Get-OpenFiles', 'Get-RDPLoginEvents', 'Get-InvalidLogonAttempts',
79-
'Get-MappedDrives', 'Get-DiskUsage', 'Get-Namespace', 'New-Password',
80-
'Connect-Rdp', 'Get-NetShare', 'Get-WinEventTail', 'Open-CdDrive',
81-
'Grant-RegistryPermission', 'New-Credential'
72+
FunctionsToExport = 'Set-Pass', 'New-ScheduledTask', 'Get-CimService',
73+
'Get-NonStandardServiceAccount', 'Get-PendingUpdates',
74+
'Get-ServiceTag', 'Backup-EventLogs', 'Export-EventLog',
75+
'Get-PaperCutLogs', 'Set-ShutdownMethod', 'Get-PrinterLogs',
76+
'Get-OpenSessions', 'Get-OpenFiles', 'Get-RDPLoginEvents',
77+
'Get-InvalidLogonAttempts', 'Get-MappedDrives', 'Get-DiskUsage',
78+
'Get-Namespace', 'New-Password', 'Connect-Rdp', 'Get-NetShare',
79+
'Get-WinEventTail', 'Open-CdDrive', 'Grant-RegistryPermission',
80+
'New-Credential'
8281

8382
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
8483
CmdletsToExport = @()
@@ -122,7 +121,7 @@ PrivateData = @{
122121
# ExternalModuleDependencies = ''
123122

124123
} # End of PSData hashtable
125-
124+
126125
} # End of PrivateData hashtable
127126

128127
# HelpInfo URI of this module

ComputerManagement/ComputerManagement.psm1

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -62,33 +62,6 @@ Function New-ScheduledTask {
6262
Return $?
6363
}
6464
}
65-
Function Remove-UserFromLocalGroup {
66-
[CmdletBinding(HelpURI = 'https://github.com/mod-posh/ComputerManagement/blob/master/docs/Remove-UserFromLocalGroup.md#remove-userfromlocalgroup',
67-
SupportsShouldProcess,
68-
ConfirmImpact = 'Medium')]
69-
Param
70-
(
71-
[Parameter(Mandatory = $true)]
72-
[string]$ComputerName,
73-
[Parameter(Mandatory = $true)]
74-
[string]$UserName,
75-
[Parameter(Mandatory = $true)]
76-
[string]$GroupName
77-
)
78-
Begin {
79-
}
80-
Process {
81-
if ($PSCmdlet.ShouldProcess("Remove", "Remove $($Username) from $($GroupName)")) {
82-
$Computer = [ADSI]("WinNT://$($ComputerName)");
83-
$User = [adsi]("WinNT://$ComputerName/$UserName, user")
84-
$Group = $Computer.psbase.children.find($GroupName)
85-
$Group.Remove("WinNT://$Computer/$User")
86-
}
87-
}
88-
End {
89-
Return $?
90-
}
91-
}
9265
Function Get-CimService {
9366
[CmdletBinding(HelpURI = 'https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-CimService.md#get-cimservice')]
9467
Param

ComputerManagement/en-us/ComputerManagement-help.xml

Lines changed: 0 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,177 +2965,6 @@ Type : CD Drive</dev:code>
29652965
</maml:navigationLink>
29662966
</command:relatedLinks>
29672967
</command:command>
2968-
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
2969-
<command:details>
2970-
<command:name>Remove-UserFromLocalGroup</command:name>
2971-
<command:verb>Remove</command:verb>
2972-
<command:noun>UserFromLocalGroup</command:noun>
2973-
<maml:description>
2974-
<maml:para>Removes a user/group from a local computer group.</maml:para>
2975-
</maml:description>
2976-
</command:details>
2977-
<maml:description>
2978-
<maml:para>This example removes a user from the local users group.</maml:para>
2979-
</maml:description>
2980-
<command:syntax>
2981-
<command:syntaxItem>
2982-
<maml:name>Remove-UserFromLocalGroup</maml:name>
2983-
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
2984-
<maml:name>ComputerName</maml:name>
2985-
<maml:Description>
2986-
<maml:para>{{ Fill ComputerName Description }}</maml:para>
2987-
</maml:Description>
2988-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
2989-
<dev:type>
2990-
<maml:name>String</maml:name>
2991-
<maml:uri />
2992-
</dev:type>
2993-
<dev:defaultValue>None</dev:defaultValue>
2994-
</command:parameter>
2995-
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
2996-
<maml:name>UserName</maml:name>
2997-
<maml:Description>
2998-
<maml:para>{{ Fill UserName Description }}</maml:para>
2999-
</maml:Description>
3000-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
3001-
<dev:type>
3002-
<maml:name>String</maml:name>
3003-
<maml:uri />
3004-
</dev:type>
3005-
<dev:defaultValue>None</dev:defaultValue>
3006-
</command:parameter>
3007-
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none">
3008-
<maml:name>GroupName</maml:name>
3009-
<maml:Description>
3010-
<maml:para>Name of the group where that the user/group is a member of.</maml:para>
3011-
</maml:Description>
3012-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
3013-
<dev:type>
3014-
<maml:name>String</maml:name>
3015-
<maml:uri />
3016-
</dev:type>
3017-
<dev:defaultValue>None</dev:defaultValue>
3018-
</command:parameter>
3019-
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf">
3020-
<maml:name>Confirm</maml:name>
3021-
<maml:Description>
3022-
<maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
3023-
</maml:Description>
3024-
<dev:type>
3025-
<maml:name>SwitchParameter</maml:name>
3026-
<maml:uri />
3027-
</dev:type>
3028-
<dev:defaultValue>False</dev:defaultValue>
3029-
</command:parameter>
3030-
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi">
3031-
<maml:name>WhatIf</maml:name>
3032-
<maml:Description>
3033-
<maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
3034-
</maml:Description>
3035-
<dev:type>
3036-
<maml:name>SwitchParameter</maml:name>
3037-
<maml:uri />
3038-
</dev:type>
3039-
<dev:defaultValue>False</dev:defaultValue>
3040-
</command:parameter>
3041-
</command:syntaxItem>
3042-
</command:syntax>
3043-
<command:parameters>
3044-
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
3045-
<maml:name>ComputerName</maml:name>
3046-
<maml:Description>
3047-
<maml:para>{{ Fill ComputerName Description }}</maml:para>
3048-
</maml:Description>
3049-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
3050-
<dev:type>
3051-
<maml:name>String</maml:name>
3052-
<maml:uri />
3053-
</dev:type>
3054-
<dev:defaultValue>None</dev:defaultValue>
3055-
</command:parameter>
3056-
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none">
3057-
<maml:name>GroupName</maml:name>
3058-
<maml:Description>
3059-
<maml:para>Name of the group where that the user/group is a member of.</maml:para>
3060-
</maml:Description>
3061-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
3062-
<dev:type>
3063-
<maml:name>String</maml:name>
3064-
<maml:uri />
3065-
</dev:type>
3066-
<dev:defaultValue>None</dev:defaultValue>
3067-
</command:parameter>
3068-
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
3069-
<maml:name>UserName</maml:name>
3070-
<maml:Description>
3071-
<maml:para>{{ Fill UserName Description }}</maml:para>
3072-
</maml:Description>
3073-
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
3074-
<dev:type>
3075-
<maml:name>String</maml:name>
3076-
<maml:uri />
3077-
</dev:type>
3078-
<dev:defaultValue>None</dev:defaultValue>
3079-
</command:parameter>
3080-
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf">
3081-
<maml:name>Confirm</maml:name>
3082-
<maml:Description>
3083-
<maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
3084-
</maml:Description>
3085-
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
3086-
<dev:type>
3087-
<maml:name>SwitchParameter</maml:name>
3088-
<maml:uri />
3089-
</dev:type>
3090-
<dev:defaultValue>False</dev:defaultValue>
3091-
</command:parameter>
3092-
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi">
3093-
<maml:name>WhatIf</maml:name>
3094-
<maml:Description>
3095-
<maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
3096-
</maml:Description>
3097-
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
3098-
<dev:type>
3099-
<maml:name>SwitchParameter</maml:name>
3100-
<maml:uri />
3101-
</dev:type>
3102-
<dev:defaultValue>False</dev:defaultValue>
3103-
</command:parameter>
3104-
</command:parameters>
3105-
<command:inputTypes />
3106-
<command:returnValues />
3107-
<maml:alertSet>
3108-
<maml:alert>
3109-
<maml:para>You will need to run this with either UAC disabled or from an elevated prompt.</maml:para>
3110-
</maml:alert>
3111-
</maml:alertSet>
3112-
<command:examples>
3113-
<command:example>
3114-
<maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
3115-
<dev:code>Remove-UserFromLocalGroup -ComputerName MyComputer -UserName RandomUser</dev:code>
3116-
<dev:remarks>
3117-
<maml:para>Description ----------- This example removes a user from the local administrators group.</maml:para>
3118-
</dev:remarks>
3119-
</command:example>
3120-
<command:example>
3121-
<maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
3122-
<dev:code>Remove-UserFromLocalGroup -ComputerName MyComputer -UserName RandomUser -GroupName Users</dev:code>
3123-
<dev:remarks>
3124-
<maml:para></maml:para>
3125-
</dev:remarks>
3126-
</command:example>
3127-
</command:examples>
3128-
<command:relatedLinks>
3129-
<maml:navigationLink>
3130-
<maml:linkText>Online Version:</maml:linkText>
3131-
<maml:uri>https://github.com/mod-posh/ComputerManagement/blob/master/docs/Remove-UserFromLocalGroup.md#remove-userfromlocalgroup</maml:uri>
3132-
</maml:navigationLink>
3133-
<maml:navigationLink>
3134-
<maml:linkText>https://github.com/jeffpatton1971/mod-posh/wiki/ComputerManagement#Remove-UserFromLocalGroup</maml:linkText>
3135-
<maml:uri>https://github.com/jeffpatton1971/mod-posh/wiki/ComputerManagement#Remove-UserFromLocalGroup</maml:uri>
3136-
</maml:navigationLink>
3137-
</command:relatedLinks>
3138-
</command:command>
31392968
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
31402969
<command:details>
31412970
<command:name>Set-Pass</command:name>

README.md

-10.1 KB

Open-CdDrive


NAME
    Open-CdDrive
    
SYNOPSIS
    A function to eject the CD Drive
    
    
SYNTAX
    Open-CdDrive [[-Drive] <String>] [<CommonParameters>]
    Open-CdDrive [[-Drive] <System.String>] [<CommonParameters>]
    
    
DESCRIPTION
    This function uses the shell.application comObject to eject one or more CD rom drives. I had the need to eject several CDroms from servers and wanted an easier way to do it. I found a sample in the Technet gallery (see link) and 
    modified to suite my needs.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Open-CdDrive.md#open-cddrive
    Technet Gallery https://gallery.technet.microsoft.com/scriptcenter/7d81af29-1cae-4dbb-8027-cd96a985f311

REMARKS
    To see the examples, type: "get-help Open-CdDrive -examples".
    For more information, type: "get-help Open-CdDrive -detailed".
    For technical information, type: "get-help Open-CdDrive -full".
    For online help, type: "get-help Open-CdDrive -online"

Get-CimService

NAME
    Get-CimService
    
SYNOPSIS
    Get a list of services
    
    
SYNTAX
    Get-CimService [[-Computer] <String>] [[-Credential] <PSCredential>] [[-State] <String>] [[-StartMode] <String>] [<CommonParameters>]
    Get-CimService [[-Computer] <System.String>] [[-Credential] <System.Management.Automation.PSCredential>] [[-State] <System.String>] [[-StartMode] <System.String>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns a list of services on a given computer. This list can be filtered based on the given StartMode  (ie. Running, Stopped) as well as filtered on StartMode (ie. Auto, Manual).
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/get-cimservice.md#get-cimservice

REMARKS
    To see the examples, type: "get-help Get-CimService -examples".
    For more information, type: "get-help Get-CimService -detailed".
    For technical information, type: "get-help Get-CimService -full".
    For online help, type: "get-help Get-CimService -online"

New-Credential

NAME
    New-Credential
    
SYNOPSIS
    Create a Credential Object
    
    
SYNTAX
    New-Credential [-Username] <String> [-Password] <SecureString> [-Confirm] [-WhatIf] [<CommonParameters>]
    New-Credential [-Username] <System.String> [-Password] <System.Security.SecureString> [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    This function creates a new Credential Object for use in Scripts or cmdlets.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/New-Credential.md#new-credential

REMARKS
    To see the examples, type: "get-help New-Credential -examples".
    For more information, type: "get-help New-Credential -detailed".
    For technical information, type: "get-help New-Credential -full".
    For online help, type: "get-help New-Credential -online"

Get-DiskUsage

NAME
    Get-DiskUsage
    
SYNOPSIS
    Get the disk usage of a given path
    
    
SYNTAX
    Get-DiskUsage [[-Path] <String>] [<CommonParameters>]
    Get-DiskUsage [[-Path] <System.String>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns the disk usage of a given path
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-DiskUsage.md#get-diskusage

REMARKS
    To see the examples, type: "get-help Get-DiskUsage -examples".
    For more information, type: "get-help Get-DiskUsage -detailed".
    For technical information, type: "get-help Get-DiskUsage -full".
    For online help, type: "get-help Get-DiskUsage -online"

Export-EventLog

NAME
    Export-EventLog
    
SYNOPSIS
    Export an Eventlog from a local or remote computer
    
    
SYNTAX
    Export-EventLog [[-ComputerName] <Object>] [[-Credential] <PSCredential>] [[-LogName] <Object>] [[-Destination] <Object>] [-ListLog] [<CommonParameters>]
    Export-EventLog [[-ComputerName] <System.Object>] [[-Credential] <System.Management.Automation.PSCredential>] [[-LogName] <System.Object>] [[-Destination] <System.Object>] [-ListLog] [<CommonParameters>]
    
    
DESCRIPTION
    This function will export the logname you specify to the folder and filename that you provide. The exported file is in the native format for Event logs.
    
    This function leverages the System.Diagnostics.Eventing.Reader class to export the log of the local or remote computer.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Export-EventLog.md#export-eventlog

REMARKS
    To see the examples, type: "get-help Export-EventLog -examples".
    For more information, type: "get-help Export-EventLog -detailed".
    For technical information, type: "get-help Export-EventLog -full".
    For online help, type: "get-help Export-EventLog -online"

Backup-EventLogs

NAME
    Backup-EventLogs
    
SYNOPSIS
    Backup Eventlogs from remote computer
    
    
SYNTAX
    Backup-EventLogs [[-ComputerName] <String>] [[-LogPath] <String>] [[-BackupPath] <String>] [<CommonParameters>]
    Backup-EventLogs [[-ComputerName] <System.String>] [[-LogPath] <System.String>] [[-BackupPath] <System.String>] [<CommonParameters>]
    
    
DESCRIPTION
    This function copies event log files from a remote computer to a backup location.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Backup-EventLogs.md#backup-eventlogs

REMARKS
    To see the examples, type: "get-help Backup-EventLogs -examples".
    For more information, type: "get-help Backup-EventLogs -detailed".
    For technical information, type: "get-help Backup-EventLogs -full".
    For online help, type: "get-help Backup-EventLogs -online"

Get-InvalidLogonAttempts

NAME
    Get-InvalidLogonAttempts
    
SYNOPSIS
    Return a list of invalid logon attempts.
    
    
SYNTAX
    Get-InvalidLogonAttempts [-ComputerName] <Object> [[-LogName] <Object>] [[-EventID] <Object>] [<CommonParameters>]
    Get-InvalidLogonAttempts [-ComputerName] <System.Object> [[-LogName] <System.Object>] [[-EventID] <System.Object>] [<CommonParameters>]
    
    
DESCRIPTION
    This function queries the security log of a given computer and retrieves Event ID 4625, failed logon attempt.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-InvalidLogonAttempts.md#get-invalidlogonattempts

REMARKS
    To see the examples, type: "get-help Get-InvalidLogonAttempts -examples".
    For more information, type: "get-help Get-InvalidLogonAttempts -detailed".
    For technical information, type: "get-help Get-InvalidLogonAttempts -full".
    For online help, type: "get-help Get-InvalidLogonAttempts -online"

New-LocalUser

NAME
    New-LocalUser
    
SYNOPSIS
    Create a new user account on the local computer.
    
    
SYNTAX
    New-LocalUser [-ComputerName] <System.String> [-User] <System.String> [-Password] <System.Security.SecureString> [[-Description] <System.String>] [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    Creates a user named MyUserAccount on MyComputer.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/New-LocalUser.md#new-localuser

REMARKS
    To see the examples, type: "get-help New-LocalUser -examples".
    For more information, type: "get-help New-LocalUser -detailed".
    For technical information, type: "get-help New-LocalUser -full".
    For online help, type: "get-help New-LocalUser -online"

Remove-LocalUser

NAME
    Remove-LocalUser
    
SYNOPSIS
    Delete a user account from the local computer.
    
    
SYNTAX
    Remove-LocalUser [-ComputerName] <System.Object> [-UserName] <System.Object> [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    Basic syntax of the command.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Remove-LocalUser.md#remove-localuser

REMARKS
    To see the examples, type: "get-help Remove-LocalUser -examples".
    For more information, type: "get-help Remove-LocalUser -detailed".
    For technical information, type: "get-help Remove-LocalUser -full".
    For online help, type: "get-help Remove-LocalUser -online"

Get-LocalUserAccounts

NAME
    Get-LocalUserAccounts
    
SYNOPSIS
    Return a list of local user accounts.
    
    
SYNTAX
    Get-LocalUserAccounts [[-ComputerName] <System.String>] [[-Credentials] <System.Management.Automation.PSCredential>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns the Name and SID of any local user accounts that are found on the remote computer.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-LocalUserAccounts.md#get-localuseraccounts

REMARKS
    To see the examples, type: "get-help Get-LocalUserAccounts -examples".
    For more information, type: "get-help Get-LocalUserAccounts -detailed".
    For technical information, type: "get-help Get-LocalUserAccounts -full".
    For online help, type: "get-help Get-LocalUserAccounts -online"

Add-LocalUserToGroup

NAME
    Add-LocalUserToGroup
    
SYNOPSIS
    Add an existing user to a local group.
    
    
SYNTAX
    Add-LocalUserToGroup [-ComputerName] <System.String> [-User] <System.String> [-Group] <System.String> [<CommonParameters>]
    
    
DESCRIPTION
    This function will add an existing user to an existing group.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Add-LocalUserToGroup.md#add-localusertogroup

REMARKS
    To see the examples, type: "get-help Add-LocalUserToGroup -examples".
    For more information, type: "get-help Add-LocalUserToGroup -detailed".
    For technical information, type: "get-help Add-LocalUserToGroup -full".
    For online help, type: "get-help Add-LocalUserToGroup -online"

Get-MappedDrives

NAME
    Get-MappedDrives
    
SYNOPSIS
    Return a list of mapped network drives on the computer
    
    
SYNTAX
    Get-MappedDrives [[-ComputerName] <String>] [[-Credentials] <PSCredential>] [<CommonParameters>]
    Get-MappedDrives [[-ComputerName] <System.String>] [[-Credentials] <System.Management.Automation.PSCredential>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns a list of mapped network drives from the local or remote computer.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-MappedDrives.md#get-mappeddrives

REMARKS
    To see the examples, type: "get-help Get-MappedDrives -examples".
    For more information, type: "get-help Get-MappedDrives -detailed".
    For technical information, type: "get-help Get-MappedDrives -full".
    For online help, type: "get-help Get-MappedDrives -online"

Get-Namespace

NAME
    Get-Namespace
    
SYNOPSIS
    Return a collection of classes from a namespace
    
    
SYNTAX
    Get-Namespace [-Namespace] <String> [-ComputerName] <String> [<CommonParameters>]
    Get-Namespace [-Namespace] <System.String> [-ComputerName] <System.String> [<CommonParameters>]
    
    
DESCRIPTION
    This function will return a collection of classes from the provided namespace. This method uses SWbemLocator to connect to a computer, the resulting SWbemServices object is used to return the SubclassesOf() the given namespace.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-Namespace.md#get-namespace

REMARKS
    To see the examples, type: "get-help Get-Namespace -examples".
    For more information, type: "get-help Get-Namespace -detailed".
    For technical information, type: "get-help Get-Namespace -full".
    For online help, type: "get-help Get-Namespace -online"

Get-NetShare

NAME
    Get-NetShare
    
SYNOPSIS
    Return a list of shares without using WMI
    
    
SYNTAX
    Get-NetShare [-ComputerName] <String> [-Type] <String> [<CommonParameters>]
    Get-NetShare [-ComputerName] <System.String> [-Type] <System.String> [<CommonParameters>]
    
    
DESCRIPTION
    This function returns a list of shares using the old net view command. This works well in situations where a fierwall may be blocking access.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-NetShare.md#get-netshare

REMARKS
    To see the examples, type: "get-help Get-NetShare -examples".
    For more information, type: "get-help Get-NetShare -detailed".
    For technical information, type: "get-help Get-NetShare -full".
    For online help, type: "get-help Get-NetShare -online"

Get-NonStandardServiceAccount

NAME
    Get-NonStandardServiceAccount
    
SYNOPSIS
    Return a list of services using Non-Standard accounts.
    
    
SYNTAX
    Get-NonStandardServiceAccount [[-Computer] <String>] [[-Credentials] <PSCredential>] [[-Filter] <String>] [<CommonParameters>]
    Get-NonStandardServiceAccount [[-Computer] <System.String>] [[-Credentials] <System.Management.Automation.PSCredential>] [[-Filter] <System.String>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns a list of services from local or remote coputers that have non-standard user accounts for logon credentials.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-NonStandardServiceAccount.md#get-nonstandardserviceaccount

REMARKS
    To see the examples, type: "get-help Get-NonStandardServiceAccount -examples".
    For more information, type: "get-help Get-NonStandardServiceAccount -detailed".
    For technical information, type: "get-help Get-NonStandardServiceAccount -full".
    For online help, type: "get-help Get-NonStandardServiceAccount -online"

Get-OpenFiles

NAME
    Get-OpenFiles
    
SYNOPSIS
    Get a list of files open on the server
    
    
SYNTAX
    Get-OpenFiles [[-ComputerName] <Object>] [<CommonParameters>]
    Get-OpenFiles [[-ComputerName] <System.Object>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns a list of files open on a given server. The output is similar to that of the Manage Open Files from the Share and Storage Management console.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-OpenFiles.md#get-openfiles

REMARKS
    To see the examples, type: "get-help Get-OpenFiles -examples".
    For more information, type: "get-help Get-OpenFiles -detailed".
    For technical information, type: "get-help Get-OpenFiles -full".
    For online help, type: "get-help Get-OpenFiles -online"

Get-OpenSessions

NAME
    Get-OpenSessions
    
SYNOPSIS
    Return a list of open sessions
    
    
SYNTAX
    Get-OpenSessions [[-ComputerName] <Object>] [<CommonParameters>]
    Get-OpenSessions [[-ComputerName] <System.Object>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns a list of open session on a given server. The output is similar to that of the Manage Open Sessions dialog in the Share and Storage Management console.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-OpenSessions.md#get-opensessions

REMARKS
    To see the examples, type: "get-help Get-OpenSessions -examples".
    For more information, type: "get-help Get-OpenSessions -detailed".
    For technical information, type: "get-help Get-OpenSessions -full".
    For online help, type: "get-help Get-OpenSessions -online"

Get-PaperCutLogs

NAME
    Get-PaperCutLogs
    
SYNOPSIS
    Get PaperCut logs from all print servers
    
    
SYNTAX
    Get-PaperCutLogs [[-PrintServers] <Object>] [<CommonParameters>]
    Get-PaperCutLogs [[-PrintServers] <System.Object>] [<CommonParameters>]
    
    
DESCRIPTION
    Return the PaperCut logs from all print servers.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-PaperCutLogs.md#get-papercutlogs

REMARKS
    To see the examples, type: "get-help Get-PaperCutLogs -examples".
    For more information, type: "get-help Get-PaperCutLogs -detailed".
    For technical information, type: "get-help Get-PaperCutLogs -full".
    For online help, type: "get-help Get-PaperCutLogs -online"

Set-Pass

NAME
    Set-Pass
    
SYNOPSIS
    Change the password of an existing user account.
    
    
SYNTAX
    Set-Pass [-ComputerName] <String> [-UserName] <String> [-Password] <SecureString> [-Confirm] [-WhatIf] [<CommonParameters>]
    Set-Pass [-ComputerName] <System.String> [-UserName] <System.String> [-Password] <System.Security.SecureString> [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    This function will change the password for an existing user account.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Set-Pass.md#set-pass

REMARKS
    To see the examples, type: "get-help Set-Pass -examples".
    For more information, type: "get-help Set-Pass -detailed".
    For technical information, type: "get-help Set-Pass -full".
    For online help, type: "get-help Set-Pass -online"

New-Password

NAME
    New-Password
    
SYNOPSIS
    Create a new password
    
    
SYNTAX
    New-Password [[-Length] <Int32>] [[-Count] <Int32>] [-asSecureString] [-Strong] [-Confirm] [-WhatIf] [<CommonParameters>]
    New-Password [[-Length] <System.Int32>] [[-Count] <System.Int32>] [-asSecureString] [-Strong] [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    This function creates a password using the cryptographic Random Number Generator see the MSDN link for more details.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/New-Password.md#new-password
    PowerShell Password Generator http://www.peterprovost.org/blog/2007/06/22/Quick-n-Dirty-PowerShell-Password-Generator/
    MSDN RNG Crypto Service Provider http://msdn.microsoft.com/en-us/library/system.security.cryptography.rngcryptoserviceprovider.aspx

REMARKS
    To see the examples, type: "get-help New-Password -examples".
    For more information, type: "get-help New-Password -detailed".
    For technical information, type: "get-help New-Password -full".
    For online help, type: "get-help New-Password -online"

Get-PendingUpdates

NAME
    Get-PendingUpdates
    
SYNOPSIS
    Retrieves the updates waiting to be installed from WSUS
    
    
SYNTAX
    Get-PendingUpdates [[-ComputerName] <String>] [<CommonParameters>]
    Get-PendingUpdates [[-ComputerName] <System.String>] [<CommonParameters>]
    
    
DESCRIPTION
    Retrieves the updates that are available to install on the local system
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-PendingUpdates.md#get-pendingupdates

REMARKS
    To see the examples, type: "get-help Get-PendingUpdates -examples".
    For more information, type: "get-help Get-PendingUpdates -detailed".
    For technical information, type: "get-help Get-PendingUpdates -full".
    For online help, type: "get-help Get-PendingUpdates -online"

Get-PrinterLogs

NAME
    Get-PrinterLogs
    
SYNOPSIS
    Get a log of all printing from a given server.
    
    
SYNTAX
    Get-PrinterLogs [[-LogName] <Object>] [-ComputerName] <Object> [<CommonParameters>]
    Get-PrinterLogs [[-LogName] <System.Object>] [-ComputerName] <System.Object> [<CommonParameters>]
    
    
DESCRIPTION
    This function will return a log of all the printing that has occurred on a given print server.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-PrinterLogs.md#get-printerlogs

REMARKS
    To see the examples, type: "get-help Get-PrinterLogs -examples".
    For more information, type: "get-help Get-PrinterLogs -detailed".
    For technical information, type: "get-help Get-PrinterLogs -full".
    For online help, type: "get-help Get-PrinterLogs -online"

Connect-Rdp

NAME
    Connect-Rdp
    
SYNOPSIS
    Connect to one or more computers over RDP
    
    
SYNTAX
    Connect-Rdp [-ComputerName] <Object> [[-Credential] <PSCredential>] [<CommonParameters>]
    Connect-Rdp [-ComputerName] <System.Object> [[-Credential] <System.Management.Automation.PSCredential>] [<CommonParameters>]
    
    
DESCRIPTION
    To securely cache login credentials, you can use the command line utility cmdkey.exe. With this utility, you can save a username and a password for a given remote connection. Windows will then securely cache the information and 
    automatically use it when needed.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Connect-Rdp.md#connect-rdp
    Automatic Remote Desktop onnection http://www.powershellmagazine.com/2014/04/18/automatic-remote-desktop-connection/

REMARKS
    To see the examples, type: "get-help Connect-Rdp -examples".
    For more information, type: "get-help Connect-Rdp -detailed".
    For technical information, type: "get-help Connect-Rdp -full".
    For online help, type: "get-help Connect-Rdp -online"

Get-RDPLoginEvents

NAME
    Get-RDPLoginEvents
    
SYNOPSIS
    Return Remote Desktop login attempts
    
    
SYNTAX
    Get-RDPLoginEvents [-ComputerName] <Object> [[-Credentials] <PSCredential>] [<CommonParameters>]
    Get-RDPLoginEvents [-ComputerName] <System.Object> [[-Credentials] <System.Management.Automation.PSCredential>] [<CommonParameters>]
    
    
DESCRIPTION
    This function returns login attempts from the Microsoft Windows TerminalServices RemoteConnectionManager log. The specific events are logged as EventID 1149, and they are logged whether or not the user actually gets to the desktop.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-RDPLoginEvents.md#Get-rdploginevents

REMARKS
    To see the examples, type: "get-help Get-RDPLoginEvents -examples".
    For more information, type: "get-help Get-RDPLoginEvents -detailed".
    For technical information, type: "get-help Get-RDPLoginEvents -full".
    For online help, type: "get-help Get-RDPLoginEvents -online"

Grant-RegistryPermission

NAME
    Grant-RegistryPermission
    
SYNOPSIS
    Grant permissions on registry paths
    
    
SYNTAX
    Grant-RegistryPermission [-Path] <String> [-Principal] <String> [-Rights] {QueryValues | SetValue | CreateSubKey | EnumerateSubKeys | Notify | CreateLink | Delete | ReadPermissions | WriteKey | ExecuteKey | ReadKey | 
    Grant-RegistryPermission [-Path] <System.String> [-Principal] <System.String> [-Rights] {QueryValues | SetValue | CreateSubKey | EnumerateSubKeys | Notify | CreateLink | Delete | ReadPermissions | WriteKey | ExecuteKey | ReadKey | 
    ChangePermissions | TakeOwnership | FullControl} [[-Inheritance] {None | ContainerInherit | ObjectInherit}] [[-Propagation] {None | NoPropagateInherit | InheritOnly}] [<CommonParameters>]
    
    
DESCRIPTION
    This function allows you to set permissions on registry paths on a computer. Using the parameters you can specify the rights, inheritance and propagation of the rights.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Grant-RegistryPermission.md#grant-registrypermission
    Grant Registry Permissions http://www.iheartpowershell.com/2011/09/grant-registry-permissions.html
    MSDN RegistryAccessRule http://msdn.microsoft.com/en-us/library/ms147899(v=vs.110).aspx
    MSDN RegistryRights http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.registryrights(v=vs.110).aspx
    MSDN ACL Inheritance http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.inheritanceflags(v=vs.110).aspx
    MSDN ACL Propagation http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.propagationflags(v=vs.110).aspx

REMARKS
    To see the examples, type: "get-help Grant-RegistryPermission -examples".
    For more information, type: "get-help Grant-RegistryPermission -detailed".
    For technical information, type: "get-help Grant-RegistryPermission -full".
    For online help, type: "get-help Grant-RegistryPermission -online"

New-ScheduledTask

NAME
    New-ScheduledTask
    
SYNOPSIS
    Create a Scheduled Task on a computer.
    
    
SYNTAX
    New-ScheduledTask [-TaskName] <String> [-TaskRun] <String> [-TaskSchedule] <String> [-StartTime] <String> [-StartDate] <String> [-TaskUser] <String> [-Server] <String> [-Confirm] [-WhatIf] [<CommonParameters>]
    New-ScheduledTask [-TaskName] <System.String> [-TaskRun] <System.String> [-TaskSchedule] <System.String> [-StartTime] <System.String> [-StartDate] <System.String> [-TaskUser] <System.String> [-Server] <System.String> [-Confirm] 
    [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    Create a Scheduled Task on a local or remote computer.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/New-ScheduledTask.md#new-scheduledtask

REMARKS
    To see the examples, type: "get-help New-ScheduledTask -examples".
    For more information, type: "get-help New-ScheduledTask -detailed".
    For technical information, type: "get-help New-ScheduledTask -full".
    For online help, type: "get-help New-ScheduledTask -online"

Get-ServiceTag

NAME
    Get-ServiceTag
    
SYNOPSIS
    Get the serial number (Dell ServiceTag) from Win32_BIOS
    
    
SYNTAX
    Get-ServiceTag [[-ComputerName] <Object>] [<CommonParameters>]
    Get-ServiceTag [[-ComputerName] <System.Object>] [<CommonParameters>]
    
    
DESCRIPTION
    An example showing the only parameter.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-ServiceTag.md#get-servicetag

REMARKS
    To see the examples, type: "get-help Get-ServiceTag -examples".
    For more information, type: "get-help Get-ServiceTag -detailed".
    For technical information, type: "get-help Get-ServiceTag -full".
    For online help, type: "get-help Get-ServiceTag -online"

Set-ShutdownMethod

NAME
    Set-ShutdownMethod
    
SYNOPSIS
    Execute the Win32Shutdown method on a remote computer
    
    
SYNTAX
    Set-ShutdownMethod [-ComputerName] <String> [[-Credentials] <PSCredential>] [[-ShutdownMethod] <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
    Set-ShutdownMethod [-ComputerName] <System.String> [[-Credentials] <System.Management.Automation.PSCredential>] [[-ShutdownMethod] <System.Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    This function executes the Win32Shutdown method on a remote computer. This can be either an IP, NetBIOS name or FQDN. Use the ShutdownMethod param to specify the type of shutdown.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Set-ShutdownMethod.md#set-shutdownmethod

REMARKS
    To see the examples, type: "get-help Set-ShutdownMethod -examples".
    For more information, type: "get-help Set-ShutdownMethod -detailed".
    For technical information, type: "get-help Set-ShutdownMethod -full".
    For online help, type: "get-help Set-ShutdownMethod -online"

Remove-UserFromLocalGroup

NAME
    Remove-UserFromLocalGroup
    
SYNOPSIS
    Removes a user/group from a local computer group.
    
    
SYNTAX
    Remove-UserFromLocalGroup [-ComputerName] <System.String> [-UserName] <System.String> [-GroupName] <System.String> [-Confirm] [-WhatIf] [<CommonParameters>]
    
    
DESCRIPTION
    This example removes a user from the local users group.
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Remove-UserFromLocalGroup.md#remove-userfromlocalgroup
    https://github.com/jeffpatton1971/mod-posh/wiki/ComputerManagement#Remove-UserFromLocalGroup https://github.com/jeffpatton1971/mod-posh/wiki/ComputerManagement#Remove-UserFromLocalGroup

REMARKS
    To see the examples, type: "get-help Remove-UserFromLocalGroup -examples".
    For more information, type: "get-help Remove-UserFromLocalGroup -detailed".
    For technical information, type: "get-help Remove-UserFromLocalGroup -full".
    For online help, type: "get-help Remove-UserFromLocalGroup -online"

Get-WinEventTail

NAME
    Get-WinEventTail
    
SYNOPSIS
    A tail cmdlet for Eventlogs
    
    
SYNTAX
    Get-WinEventTail [[-LogName] <String>] [[-ShowExisting] <Int32>] [<CommonParameters>]
    Get-WinEventTail [[-LogName] <System.String>] [[-ShowExisting] <System.Int32>] [<CommonParameters>]
    
    
DESCRIPTION
    This function will allow you to tail Windows Event Logs. You specify a Logname for either the original logs, Application, System and Security or the new format for the newer logs Microsoft-Windows-PowerShell/Operational
    

RELATED LINKS
    Online Version: https://github.com/mod-posh/ComputerManagement/blob/master/docs/Get-WinEventTail.md#get-wineventtail
    StackOverflow Question http://stackoverflow.com/questions/15262196/powershell-tail-windows-event-log-is-it-possible

REMARKS
    To see the examples, type: "get-help Get-WinEventTail -examples".
    For more information, type: "get-help Get-WinEventTail -detailed".
    For technical information, type: "get-help Get-WinEventTail -full".
    For online help, type: "get-help Get-WinEventTail -online"

azure-pipelines.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# Starter pipeline
2-
# Start with a minimal pipeline that you can customize to build and deploy your code.
3-
# Add steps that build, run tests, deploy, and more:
4-
# https://aka.ms/yaml
5-
6-
trigger: none
1+
trigger:
2+
- master
73

84
pool:
95
vmImage: 'windows-2019'
Binary file not shown.
Binary file not shown.

docs/ComputerManagement.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ Create a Scheduled Task on a computer.
8080
### [Open-CdDrive](Open-CdDrive.md)
8181
A function to eject the CD Drive
8282

83-
### [Remove-UserFromLocalGroup](Remove-UserFromLocalGroup.md)
84-
Removes a user/group from a local computer group.
85-
8683
### [Set-Pass](Set-Pass.md)
8784
Change the password of an existing user account.
8885

0 commit comments

Comments
 (0)