< Back

New-BrowserBookmark

Sun Jan 19, 2020 6:17 pm

NAME New-BrowserBookmark



SYNOPSIS

Creates a new BrowserBookmark object.





SYNTAX

New-BrowserBookmark [-URL] <String> [-Title] <String> [[-Description] <String>] [[-Path] <String>] [[-Stars] {1 |

2 | 3 | 4 | 5}] [[-Notes] <String>] [[-DateAdded] <Nullable[DateTime]>] [-AttemptIconDiscovery <SwitchParameter>]

[<CommonParameters>]





DESCRIPTION

Creates a generic BrowserBookmark object from an URL and a corresponding title as well as further optional

metadata.





PARAMETERS

-URL <String>

The mandatory URI of the bookmarked resource. Must resolve to a valid [uri] object.



Required? true

Position? 0

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Title <String>

The mandatory title of the bookmarked resource. If the new bookmark is added to IE favourites, the file name

of the .url file will be constructed from this string.



Required? true

Position? 1

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

The description of the bookmark. In browser-added bookmarks it is usually an abstract of the bookmarked

resource, if provided by the website.



Required? false

Position? 2

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Path <String>

Backslash-joined (DOS style) folder path to place the bookmark in. Consult the help for the desired

Add-*Bookmark function on how the path value will be handled.



Required? false

Position? 3

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Stars <Nullable[Int32]>

Star rating for the new bookmark. At present, it will only be used if adding the bookmark to IE favourites.



Required? false

Position? 4

Default value

Accept pipeline input? False

Accept wildcard characters? false



-Notes <String>

Notes for the new bookmark. At present, it will only be used if adding the bookmark to IE favourites.



Required? false

Position? 5

Default value

Accept pipeline input? False

Accept wildcard characters? false



-DateAdded <Nullable[DateTime]>

Date the bookmark is added to the respective store. If omitted, the curent date and time will be used.



Required? false

Position? 6

Default value

Accept pipeline input? False

Accept wildcard characters? false



-AttemptIconDiscovery [<SwitchParameter>]

The function will invoke a WebRequest to the -URI and attempt to find a reference to a favicon in the

resulting response. If successful, IconFile will be set to the absolute URI of the icon, IconIndex will be set

to 1.



Required? false

Position? named

Default value

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

Keine







OUTPUTS

BrowserBookmark







EXAMPLE 1



Creates a bookmark object for the metaBPA homepage.C:\\PS> New-BrowserBookmark -URL 'https://metabpa.org' -Title

'Make on-premises great again!'





EXAMPLE 2



Creates a bookmark object for the metaBPA homepage with five stars and tries to extract a favicon reference.C:\\PS>

New-BrowserBookmark -URL 'https://metabpa.org' -Title 'Make on-premises great again!' -Stars 5

-AttemptIconDiscovery







RELATED LINKS

Online Version: https://metabpa.org/projects/psbrowserb ... rbookmark/