external help file | Module Name | online version | schema |
---|---|---|---|
ComputerManagement-help.xml |
ComputerManagement |
2.0.0 |
Return a list of services using Non-Standard accounts.
Get-NonStandardServiceAccount [[-Computer] <String>] [[-Credentials] <PSCredential>] [[-Filter] <String>]
[<CommonParameters>]
This function returns a list of services from local or remote coputers that have non-standard user accounts for logon credentials.
Get-NonStandardServiceAccounts
StartName Name DisplayName
--------- ---- -----------
.\Jeff Patton MyService My Test Service
This example shows no parameters provided
Get-NonStandardServiceAccounts -Computer dpm -Credentials $Credentials
StartName Name DisplayName
--------- ---- -----------
.\MICROSOFT$DPM$Acct MSSQL$MS$DPM2007$ SQL Server (MS$DPM2007$)
.\MICROSOFT$DPM$Acct MSSQL$MSDPM2010 SQL Server (MSDPM2010)
NT AUTHORITY\NETWORK SERVICE MSSQLServerADHelper100 SQL Active Directory Helper S...
NT AUTHORITY\NETWORK SERVICE ReportServer$MSDPM2010 SQL Server Reporting Services...
.\MICROSOFT$DPM$Acct SQLAgent$MS$DPM2007$ SQL Server Agent (MS$DPM2007$)
.\MICROSOFT$DPM$Acct SQLAgent$MSDPM2010 SQL Server Agent (MSDPM2010)
This example shows all parameters in use
Get-NonStandardServiceAccounts -Computer dpm -Credentials $Credentials `
-Filter "localsystem|NT Authority\LocalService|NT Authority\NetworkService|NT AUTHORITY\NETWORK SERVICE"
StartName Name DisplayName
--------- ---- -----------
.\MICROSOFT$DPM$Acct MSSQL$MS$DPM2007$ SQL Server (MS$DPM2007$)
.\MICROSOFT$DPM$Acct MSSQL$MSDPM2010 SQL Server (MSDPM2010)
.\MICROSOFT$DPM$Acct SQLAgent$MS$DPM2007$ SQL Server Agent (MS$DPM2007$)
.\MICROSOFT$DPM$Acct SQLAgent$MSDPM2010 SQL Server Agent (MSDPM2010)
This example uses the Filter parameter to filter out NT AUTHORITY\NETWORK SERVICE account from the preceeding example.
The back-tick (`) was used for readability purposes only.
The NetBIOS name of the computer to pull services from.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: (& hostname)
Accept pipeline input: False
Accept wildcard characters: False
The DOMAIN\USERNAME of an account with permissions to access services.
Type: System.Management.Automation.PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This is a pipe (|) seperated list of accounts to filter out of the returned services list.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: Localsystem|NT Authority\LocalService|NT Authority\NetworkService
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Powershell may need to be run elevated to run this script. UAC may need to be disabled to run this script.