Created
July 26, 2017 17:11
-
-
Save crshnbrn66/bf85a6d1ad443d333a57b4931b5eaab9 to your computer and use it in GitHub Desktop.
Write-user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe 'Write-user'{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment