NAME
Create-File
SYNOPSIS
Creates and/or opens file.
SYNTAX
Create-File [-CommentBasedHelp] [[-FileName] <String>] [-Force:Force] [[-FunctionName] <String[]>] [<CommonParameters>]
DESCRIPTION
Function creates file and opens it. If file already exist it will be opened. If command executes with FunctionName parameter then function structure will be appended to file.
It is possible to attach Comment Based Help section by including proper parameter.
PARAMETERS
-CommentBasedHelp [<SwitchParameter>]
Adds Comment Based Help to function.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-FileName <String>
File name
Required? false
Position? 1
Default value $FileName
Accept pipeline input? false
Accept wildcard characters? false
-Force:Force [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-FunctionName <String[]>
Function name
Required? false
Position? 2
Default value $FunctionName
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author : Sebastian Ziółkowski
Website: ziolkowsky.wordpress.com
GitHub : github.com/ziolkowsky
-------------------------- EXAMPLE 1 --------------------------
PS>Create-File TestFile
-------------------------- EXAMPLE 2 --------------------------
PS>Create-File TestFile New-Function
-------------------------- EXAMPLE 3 --------------------------
PS>Create-File TestFile New-Function -CommentBasedHelp
RELATED LINKS
https://ziolkowsky.wordpress.com/2022/04/16/create-file/
https://github.com/ziolkowsky/ShellPowerFramework
0 Comments on “Create-File”