external help file | Module Name | online version | schema |
---|---|---|---|
PSRemoteOperations-help.xml |
PSRemoteOperations |
2.0.0 |
Use a WPF form to create a remote operation.
New-PSRemoteOperationForm [[-Path] <String>] [-PSVersion <String>] [<CommonParameters>]
You can use this command in place of New-PSRemoteOperation to define a remote operation using a WPF form. This command only works on Windows platforms.
The only parameter you might specify is the Path. The default is $PSRemoteOpPath which you should have already defined. The rest of the form should be self-evident. But there are a few things to be aware of.
The dropdown boxes for Computername and To will be auto-populated, but you can type in new values. Make sure they are complete. It is recommended that you keep scriptblocks simple because they have to be coded into a psd1 file. When entering a scriptblock or value for Initialization, only enter the commands. You do not need to include the { }. When defining Arguments, enter each on a separate line using an = sign.
log = system newest = 20 verbose = $True
You should not quote any values.
PS C:\> New-PSRemoteOperationForm
Launch the form using the user-defined value for $PSRemoteOpPath
PS C:\> New-PSRemoteOperationForm -psversion core
Launch the form using the user-defined value for $PSRemoteOpPath and configure the operation to run with pwsh.exe.
The folder where the remote operation file will be created.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value: $PSRemoteOpPath
Accept pipeline input: False
Accept wildcard characters: False
Specify which version of PowerShell to use for the remote operation. Possible values are Desktop and Core.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Desktop
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/