New-CommanderDesktopWidget
SYNOPSIS
Creates a desktop widget.
SYNTAX
Custom (Default)
New-CommanderDesktopWidget [-Top <Int32>] [-Left <Int32>] [-Height <Int32>] [-Width <Int32>]
[-DisableTransparency] -LoadWidget <ScriptBlock> [<CommonParameters>]
Measurement
New-CommanderDesktopWidget [-Top <Int32>] [-Left <Int32>] [-Height <Int32>] [-Width <Int32>]
[-DisableTransparency] [-MeasurementHistory <Int32>] [-MeasurementFrequency <Int32>]
-LoadMeasurement <ScriptBlock> -MeasurementTitle <String> -MeasurementSubtitle <String>
[-MeasurementDescription <String>] -MeasurementUnit <String> [-MeasurementTheme <String>] [<CommonParameters>]
DataSource
New-CommanderDesktopWidget [-Top <Int32>] [-Left <Int32>] [-Height <Int32>] [-Width <Int32>]
[-DisableTransparency] -LoadWidget <ScriptBlock> [-DataSource <String>] [<CommonParameters>]
Url
New-CommanderDesktopWidget [-Top <Int32>] [-Left <Int32>] [-Height <Int32>] [-Width <Int32>]
[-DisableTransparency] -Url <String> [<CommonParameters>]
Image
New-CommanderDesktopWidget [-Top <Int32>] [-Left <Int32>] [-Height <Int32>] [-Width <Int32>]
[-DisableTransparency] -Image <String> [<CommonParameters>]
Text
New-CommanderDesktopWidget [-Top <Int32>] [-Left <Int32>] [-Height <Int32>] [-Width <Int32>]
[-DisableTransparency] -Text <String> [-Font <String>] [-BackgroundColor <String>] [-FontColor <String>]
[-FontSize <Int32>] [<CommonParameters>]
DESCRIPTION
Creates a desktop widget. Desktop widgets display data. They appear on top of the wall paper but under icons. They are not interactive.
EXAMPLES
EXAMPLE 1
New-CommanderDesktopWidget -Text 'Hello, world!' -Height 200 -Width 1000 -FontSize 100 -Top 500 -Left 500
Displays text on the desktop.
EXAMPLE 2
New-CommanderDesktopWidget -Image 'C:\src\blog\content\images\news.png' -Height 200 -Width 200 -Top 200
Displays an image on the desktop.
EXAMPLE 3
New-CommanderDesktopWidget -Url 'https://www.google.com' -Height 500 -Width 500 -Top 400
Displays a webpage on the desktop.
EXAMPLE 4
New-CommanderDesktopWidget -LoadWidget {
[xml]$Form = "<Window xmlns=`"http://schemas.microsoft.com/winfx/2006/xaml/presentation`"><Grid><Label Content=`"Hello, World`" Height=`"30`" Width=`"110`"/></Grid></Window>"
$XMLReader = (New-Object System.Xml.XmlNodeReader $Form)
[Windows.Markup.XamlReader]::Load($XMLReader)
} -Height 200 -Width 200 -Top 200 -Left 200
Displays a custom WPF window on the desktop.
EXAMPLE 5
New-CommanderDesktopWidget -LoadMeasurement {Get-Random} -MeasurementTitle 'Test' -MeasurementSubtitle 'Tester' -MeasurementUnit '%' -Height 300 -Width 500 -Left 600 -Top 200 -MeasurementFrequency 1 -MeasurementDescription "Nice" -MeasurementTheme 'DarkBlue'
Displays a measurement graph on the desktop.
PARAMETERS
-Top
The top location of the widget.
Type: System.Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Left
The left location of the widget.
Type: System.Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
-Height
The height of the widget.
Type: System.Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 12
Accept pipeline input: False
Accept wildcard characters: False
-Width
The width of the widget.
Type: System.Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 100
Accept pipeline input: False
Accept wildcard characters: False
-DisableTransparency
{{ Fill DisableTransparency Description }}
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementHistory
The number of measurements to keep in the graph.
Type: System.Int32
Parameter Sets: Measurement
Aliases:
Required: False
Position: Named
Default value: 100
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementFrequency
How frequently to record a new measurements in seconds.
Type: System.Int32
Parameter Sets: Measurement
Aliases:
Required: False
Position: Named
Default value: 30
Accept pipeline input: False
Accept wildcard characters: False
-LoadMeasurement
A script block that records a measurement. Expected to return a number.
Type: System.Management.Automation.ScriptBlock
Parameter Sets: Measurement
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementTitle
The title of the measurement.
Type: System.String
Parameter Sets: Measurement
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementSubtitle
The subtitle of the measurement.
Type: System.String
Parameter Sets: Measurement
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementDescription
The description of the measurement.
Type: System.String
Parameter Sets: Measurement
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementUnit
The unit to display for the measurement.
Type: System.String
Parameter Sets: Measurement
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-MeasurementTheme
The theme to use for the measurement.
Type: System.String
Parameter Sets: Measurement
Aliases:
Required: False
Position: Named
Default value: LightRed
Accept pipeline input: False
Accept wildcard characters: False
-LoadWidget
Loads a custom WPF widget. You will need to return a Window. The window will not be interactive.
Type: System.Management.Automation.ScriptBlock
Parameter Sets: Custom, DataSource
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Url
Displays the webpage specified by the URL.
Type: System.String
Parameter Sets: Url
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Image
An image to display.
Type: System.String
Parameter Sets: Image
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Text
Text to display.
Type: System.String
Parameter Sets: Text
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Font
A font to use with the text.
Type: System.String
Parameter Sets: Text
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-BackgroundColor
A background color for the text. If absent, the wall paper will be used.
Type: System.String
Parameter Sets: Text
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-FontColor
The font color to use for the text.
Type: System.String
Parameter Sets: Text
Aliases:
Required: False
Position: Named
Default value: #fff
Accept pipeline input: False
Accept wildcard characters: False
-FontSize
The font size to use for the text.
Type: System.Int32
Parameter Sets: Text
Aliases:
Required: False
Position: Named
Default value: 12
Accept pipeline input: False
Accept wildcard characters: False
-DataSource
The data source to load data from.
Type: System.String
Parameter Sets: DataSource
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
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.
INPUTS
OUTPUTS
NOTES
General notes