New-HTMLPage
Creates a new HTML page with specified content, name, title, file path, and ID.
Syntax
New-HTMLPage [[-FilePath] <String>] [[-ID] <String>] [-Name] <String> [[-PageContent] <ScriptBlock>] [[-Title] <String>] [<CommonParameters>]#All Parameter SetsDescription
This function creates a new HTML page with the provided content and metadata. It generates a unique GUID for the page and stores it in the global schema. The function returns a custom object representing the page.
Examples
EXAMPLE 1
<body><h1>Hello, World!</h1></body></html>" } -Name "index" -Title "Welcome Page" -FilePath "C:\Pages\index.html" -ID "12345"Creates a new HTML page with a simple "Hello, World!" content, named "index", titled "Welcome Page", saved at "C:\Pages\index.html", and with ID "12345".
Parameters
- -FilePath String
- The file path where the HTML page will be saved.
- -ID String
- The ID of the HTML page.
- -Name String
- The name of the HTML page.
- -PageContent ScriptBlock
- The script block containing the HTML content of the page.
- -Title String
- The title of the HTML page.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.