Skip to content

Added datetimewriteverbose #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/community_snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ _To contribute, check out our [guide here](#contributing)._
| Table of Contents |
|:-----------------:|
| [PSCustomObject](#pscustomobject): _A simple PSCustomObject by @brettmillerb_ |
| [DateTimeWriteVerbose](#datetimewriteverbose): _Write-Verbose with the time and date pre-pended to your message by @ThmsRynr_ |

## Snippets

Expand All @@ -41,6 +42,22 @@ A simple PSCustomObject by @brettmillerb. It has 4 properties that you can tab t
}
```

### DateTimeWriteVerbose

Quickly add a `Write-Verbose` with the current date and time inserted before the message you're going to write to the verbose stream, by @ThmsRynr.

#### Snippet

```json
"DateTimeWriteVerbose": {
"prefix": "dtwv",
"body": [
"Write-Verbose \"[$(Get-Date -format G)] ${1:message}\"$0"
],
"description": "Pre-pend datetime for Write-Verbose"
}
```

## Contributing

If you'd like to add a snippet to this list, [open a pull request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) with the following changes:
Expand Down