Skip to content

Commit

Permalink
formatting code
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Napierała committed Apr 8, 2019
1 parent 19b833c commit d34f0bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Find-TaskServiceUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A Switch to look for system services where user name is matched.
.PARAMETER Minimal
A switch to enable minimalistic results. Object containing the computer name, number of tasks and/or number of services only. With -Log information about log file path is displayed but log file is not minimal. The return value is en object.
.PARAMETER Export
Enable exporting results objects to file (using "Export-Clixml"). Export file path is defined in "Exportpath" parameter.
Enable exporting results objectsr to file (using "Export-Clixml"). Export file path is defined in "Exportpath" parameter.
.PARAMETER Exportpath
File name path to export results finding scheduled tasks and/or system services.
.PARAMETER Log
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,33 @@ Install-Module -Name Find-TaskServiceUser -Scope CurrentUser

### Examples

1. Find system services and scheduled tasks on "WSRV00" for user "BobbyK" with logging output to a file:
* Find system services and scheduled tasks on "WSRV00" for user "BobbyK" with logging output to a file:

```powershell
PS> Find-TaskServiceUser -Computer "WSRV00" -User "BobbyK" -Service -Task -Log
```
2. Find system services and scheduled tasks on computers "WSRV01", "WSRV02" for user "Administrator":

* Find system services and scheduled tasks on computers "WSRV01", "WSRV02" for user "Administrator":

```powershell
PS> "WSRV01","WSRV02" | Find-TaskServiceUser -Service -Task
```
3. Find system services and scheduled tasks on computers "WSRV01", "WSRV02", "WSRV03" for user "BobbyK":

* Find system services and scheduled tasks on computers "WSRV01", "WSRV02", "WSRV03" for user "BobbyK":

```powershell
PS> @("WSRV01","WSRV02"), "WSRV03" | Find-TaskServiceUser -Task -User "BobbyK"
```
1. Find tasks and services on server "WSRV04" for "SYSTEM" user and return a minimalistic result as custom object `$data`:

* Find tasks and services on server "WSRV04" for "SYSTEM" user and return a minimalistic result as custom object `$data`:

```powershell
PS> $data = Find-TaskServiceUser -Task -Service -Server "WSRV04" -User "SYSTEM" -Minimal
PS> $data
```
5. Find tasks and services on server "WSRV04" for "JohnK" user. Display results and save it as object in XML file. Import object data from XML and display tasks and services separately:

* Find tasks and services on server "WSRV04" for "JohnK" user. Display results and save it as object in XML file. Import object data from XML and display tasks and services separately:

```powershell
PS> Find-TaskServiceUser -Task -Service -Server "WSRV04" -User "JohnK" -Export
PS> $object = Import-Clixml "D:\dane\voytas\Dokumenty\Find-TaskServiceUser.XML"
Expand All @@ -59,7 +68,7 @@ Module icon made by [Freepik](https://www.freepik.com/) from [Flaticon](https://

## Authors

* **Wojciech Napierała** - *Initial work* - [Voytas75](https://github.com/voytas75)
* **Wojciech Napierała** - *Initial work* - [Voytas75](https://github.com/voytas75)

See also the list of [contributors](https://github.com/voytas75/Find-TaskServiceUser/graphs/contributors) who participated in this project.

Expand Down

0 comments on commit d34f0bf

Please sign in to comment.