Skip to content

Instantly share code, notes, and snippets.

@crshnbrn66
Created July 26, 2017 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crshnbrn66/bf85a6d1ad443d333a57b4931b5eaab9 to your computer and use it in GitHub Desktop.
Save crshnbrn66/bf85a6d1ad443d333a57b4931b5eaab9 to your computer and use it in GitHub Desktop.
Write-user
function Write-User
{
param(
[parameter(mandatory)]
[string]$fileName
)
write-output "Username: $env:UserName" | tee-object -filepath $filename
write-output "Current Command: $($MyInvocation.MyCommand.Path)" | tee-object -filepath $filename
write-output "Current Script: $($MyInvocation.MyCommand.ScriptName)"| tee-object -filepath $filename
write-output "Script Running on: $env:COMPUTERNAME" | tee-object -filepath $filename
write-output "Current Version of Powershell: $($psversiontable.psversion)" | tee-object -filepath $filename
}
describe 'Write-user'{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment