-
Notifications
You must be signed in to change notification settings - Fork 196
Add docs for font package cmdlets #987
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,166 @@ | ||
| --- | ||
| external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml | ||
| Module Name: Microsoft.Online.SharePoint.PowerShell | ||
| online version: https://learn.microsoft.com/powershell/module/sharepoint-online/add-spofontpackage | ||
| applicable: SharePoint Online | ||
| title: Add-SPOFontPackage | ||
| schema: 2.0.0 | ||
| author: luchaoqiu | ||
| ms.author: luchaoqiu | ||
| ms.reviewer: | ||
| --- | ||
|
|
||
| # Add-SPOFontPackage | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Creates a new custom font package with fonts in the brand fonts library. | ||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Add-SPOFontPackage -Title <String> -PackageJson <String> [-IsHidden <Boolean>] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| The `Add-SPOFontPackage` cmdlet creates a new brand font package for the SharePoint tenant. Each font package must have a unique name. The font file must be added to the SharePoint Brand Center before creating a font package. For more information, see [Brand Fonts](https://learn.microsoft.com/sharepoint/brand-fonts). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (applies to here and other cmdlets)
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey Sam, fixed all your comments
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we prefer to use relative paths, so in this case it's |
||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
|
|
||
| ```powershell | ||
| $packageJson = @' | ||
| { | ||
| "fontFaces": [ | ||
| { | ||
| "fontFamily": "Tahoma", | ||
| "path": "Tahoma.ttf", | ||
| "fontType": "contentFont" | ||
| } | ||
| ], | ||
| "fontSlots": { | ||
| "title": { | ||
| "fontFamily": "Tahoma", | ||
| "fontFace": "Regular", | ||
| "fontVariationSettings": { | ||
| "wght": 100, | ||
| "wdth": 100 | ||
| } | ||
| }, | ||
| "heading": { | ||
| "fontFamily": "Tahoma", | ||
| "fontFace": "Regular", | ||
| "fontVariationSettings": { | ||
| "wght": 100, | ||
| "wdth": 100 | ||
| } | ||
| }, | ||
| "body": { | ||
| "fontFamily": "Tahoma", | ||
| "fontFace": "Regular", | ||
| "fontVariationSettings": { | ||
| "wght": 100, | ||
| "wdth": 100 | ||
| } | ||
| }, | ||
| "label": { | ||
| "fontFamily": "Tahoma", | ||
| "fontFace": "Regular", | ||
| "fontVariationSettings": { | ||
| "wght": 100, | ||
| "wdth": 100 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| '@ | ||
|
|
||
| Add-SPOFontPackage -Title "Tahoma" -PackageJson $packageJson | ||
| ``` | ||
|
|
||
| This example creates a new font package named "Tahoma" with specified JSON configuration. | ||
|
|
||
| ### EXAMPLE 2 | ||
|
|
||
| ```powershell | ||
| # With $packageJson from EXAMPLE 1 | ||
| Add-SPOFontPackage -Title "Contoso Font Package" -PackageJson $packageJson -IsHidden $true | ||
| ``` | ||
|
|
||
| This example creates a hidden font package with specified JSON configuration. | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Title | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the display name of the new font package. | ||
|
|
||
| ```yaml | ||
| Type: System.String | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -PackageJson | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the JSON configuration for the font package. | ||
|
|
||
| ```yaml | ||
| Type: System.String | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: Named | ||
| Default value: None | ||
| Accept pipeline input: False | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### -IsHidden | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies whether the font package should be hidden from users. When set to $true, the font package will not be visible in the **Change the look** options, but can still be applied using the `Set-SPOFontPackage` cmdlet. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ```yaml | ||
| Type: System.Boolean | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: False | ||
| Accept pipeline input: True (ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### System.Object | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Get-SPOFontPackage](Get-SPOFontPackage.md) | ||
|
|
||
| [Set-SPOFontPackage](Set-SPOFontPackage.md) | ||
|
|
||
| [Remove-SPOFontPackage](Remove-SPOFontPackage.md) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| --- | ||
| external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml | ||
| Module Name: Microsoft.Online.SharePoint.PowerShell | ||
| online version: https://learn.microsoft.com/powershell/module/sharepoint-online/get-spofontpackage | ||
| applicable: SharePoint Online | ||
| title: Get-SPOFontPackage | ||
| schema: 2.0.0 | ||
| author: luchaoqiu | ||
| ms.author: luchaoqiu | ||
| ms.reviewer: | ||
| --- | ||
|
|
||
| # Get-SPOFontPackage | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Returns one or all custom font packages from the SharePoint tenant. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Get-SPOFontPackage [[-Identity] <SPOFontPackagePipeBind>] [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| The `Get-SPOFontPackage` cmdlet retrieves one or more custom font packages from the SharePoint tenant. Custom font packages include those created through the SharePoint Brand Center app or by using the `Add-SPOFontPackage` cmdlet. You can retrieve a specific font package by providing its identity, or retrieve all font packages if no identity is specified. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| Font packages contain custom typography definitions that can be applied to SharePoint sites and Viva Connections for branding purposes. | ||
|
|
||
| After running this cmdlet, the information for each font package will be displayed with the following properties: | ||
|
|
||
| | Property | Type | Description | | ||
| | :---------- | :----- | :------------------------------------------------------| | ||
| | ID | Guid | Unique ID of the font package. | | ||
| | Title | string | The display name of the font package. | | ||
| | IsHidden | bool | Whether the font package is hidden from the SharePointUI. | | ||
| | IsValid | bool | Whether the font package is valid and can be applied. | | ||
| | PackageJson | string | The JSON specifying the settings of the font package. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't document these output properties since they usually change, and we don't want to keep updating this. The description you have is sufficient, then users can follow the examples #Closed |
||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage | ||
| ``` | ||
|
|
||
| This example returns all font packages in the tenant. | ||
|
|
||
| ### EXAMPLE 2 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage -Identity 12345678-1234-1234-1234-123456789012 | ||
| ``` | ||
|
|
||
| This example returns the font package with the specified GUID. | ||
|
|
||
| ### EXAMPLE 3 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage | Where-Object {$_.IsHidden -eq $false} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for future work: consider adding a param
|
||
| ``` | ||
|
|
||
| This example returns all visible font packages (not hidden). | ||
|
|
||
| ### EXAMPLE 4 | ||
|
|
||
| ```powershell | ||
| $fontPackage = Get-SPOFontPackage -Identity 12345678-1234-1234-1234-123456789012 | ||
| $fontPackage.PackageJson | ||
| ``` | ||
|
|
||
| This example retrieves a specific font package and displays its JSON configuration. | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Identity | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the identity of the font package to retrieve. This can be the ID (GUID) of the font package, or a font package object. If not specified, all font packages will be retrieved. | ||
|
|
||
| ```yaml | ||
| Type: Microsoft.Online.SharePoint.PowerShell.SPOFontPackagePipeBind | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: False | ||
| Position: 0 | ||
| Default value: None | ||
| Accept pipeline input: True (ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). | ||
|
|
||
| ## INPUTS | ||
|
|
||
| ### Microsoft.Online.SharePoint.PowerShell.SPOFontPackagePipeBind | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### System.Object | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Add-SPOFontPackage](Add-SPOFontPackage.md) | ||
|
|
||
| [Set-SPOFontPackage](Set-SPOFontPackage.md) | ||
|
|
||
| [Remove-SPOFontPackage](Remove-SPOFontPackage.md) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| --- | ||
| external help file: Microsoft.Online.SharePoint.PowerShell.dll-Help.xml | ||
| Module Name: Microsoft.Online.SharePoint.PowerShell | ||
| online version: https://learn.microsoft.com/powershell/module/sharepoint-online/remove-spofontpackage | ||
| applicable: SharePoint Online | ||
| title: Remove-SPOFontPackage | ||
| schema: 2.0.0 | ||
| author: luchaoqiu | ||
| ms.author: luchaoqiu | ||
| ms.reviewer: | ||
| --- | ||
|
|
||
| # Remove-SPOFontPackage | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Removes a brand font package from the SharePoint tenant. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ## SYNTAX | ||
|
|
||
| ``` | ||
| Remove-SPOFontPackage [-Identity] <SPOFontPackagePipeBind> [<CommonParameters>] | ||
| ``` | ||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| The `Remove-SPOFontPackage` cmdlet removes a custom font package from the SharePoint tenant. After removal, the font package will no longer be available for use on SharePoint sites or Viva Connections. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| > [!NOTE] | ||
| > Removing a font package does not delete the associated brand font files. Pages that already use the removed font package will continue to display the configured fonts, but you will no longer be able to modify the font package settings. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### EXAMPLE 1 | ||
|
|
||
| ```powershell | ||
| Remove-SPOFontPackage -Identity 12345678-1234-1234-1234-123456789012 | ||
| ``` | ||
|
|
||
| This example removes the font package with the specified GUID. | ||
|
|
||
| ### EXAMPLE 2 | ||
|
|
||
| ```powershell | ||
| $fontPackage = Get-SPOFontPackage -Identity 12345678-1234-1234-1234-123456789012 | ||
| Remove-SPOFontPackage -Identity $fontPackage | ||
| ``` | ||
|
|
||
| This example retrieves a font package and then removes it. | ||
|
|
||
| ### EXAMPLE 3 | ||
|
|
||
| ```powershell | ||
| Get-SPOFontPackage | Where-Object {$_.IsHidden -eq $true} | Remove-SPOFontPackage | ||
| ``` | ||
|
|
||
| This example removes all hidden font packages from the SharePoint tenant. | ||
|
|
||
| ## PARAMETERS | ||
|
|
||
| ### -Identity | ||
|
|
||
| > Applicable: SharePoint Online | ||
|
|
||
| Specifies the identity of the font package to remove. This can be the ID (GUID) of the font package, or a font package object. | ||
|
|
||
| ```yaml | ||
| Type: Microsoft.Online.SharePoint.PowerShell.SPOFontPackagePipeBind | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
|
|
||
| Required: True | ||
| Position: 0 | ||
| Default value: None | ||
| Accept pipeline input: True (ByValue) | ||
| Accept wildcard characters: False | ||
| ``` | ||
|
|
||
| ### CommonParameters | ||
|
|
||
| This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). | ||
|
|
||
| ## INPUTS | ||
|
|
||
| ### Microsoft.Online.SharePoint.PowerShell.SPOFontPackagePipeBind | ||
|
|
||
| ## OUTPUTS | ||
|
|
||
| ### None | ||
|
|
||
| ## NOTES | ||
|
|
||
| ## RELATED LINKS | ||
|
|
||
| [Add-SPOFontPackage](Add-SPOFontPackage.md) | ||
|
|
||
| [Get-SPOFontPackage](Get-SPOFontPackage.md) | ||
|
|
||
| [Set-SPOFontPackage](Set-SPOFontPackage.md) | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "author" value needs to be your GitHub alias #Closed