Dela via


frx command-line utility

frx is a command-line utility which provides management and configuration of an FSLogix configuration. The utility manages rules, profiles and containers, search, credential manager, and other miscellaneous functions.

Commands

Command Description
help, ? Display this help message
version Display the versions of the loaded components

Rules

Command Description
add-redirect Add a new folder redirection
add-rule Add the specified rule
create-ruleset Creates a Rule Set
del-redirect Delete an active folder redirection
del-rule Delete the specified rule
list-redirects List currently active folder redirections
list-rules List currently loaded rules
reload-rules Reload rules from cache

Profiles and virtual containers

Command Description
copy-profile Copy a user's profile into a VHD or VHDX
copyto-vhd Copy a folder and its contents to a VHD or VHDX
create-vhd Create and format a VHD or VHDX
edit-profile Edit profile contents contained in a VHD or VHDX
begin-edit-profile Attaches the specified VHD or VHDX and the registry hive
end-edit-profile Detaches the specified VHD or VHDX and the registry hive
export-profilecfg Export profile configuration settings to file
import-profilecfg Import profile configuration settings from file
migrate-vhd Migrates the contents of an existing VHD to a new one
moveto-vhd Move a folder and its contents to a VHD or VHDX
set-profile-redir Sets the profile's folder redirections configuration

Search component

Command Description
reset-user-search-db Reindex a user's search index database.

Credential Manager key management

Command Description
add-secure-key Add a secure key to Credential Manager
del-secure-key Delete a secure key from Credential Manager
list-secure-key list the keys that are contained in Credential Manager

Miscellaneous

Command Description
create-junction Creates a junction point to a target volume or folder
enable-shnot Enables shell refresh notification
regfont Registers a font in the system font table
report-assignment Rule Set applicability reporting
show-junction-info Shows information about a junction point
unregfont Removes a font from the system font table
start-agent Starts all drivers and services comprising the agent
stop-agent Stops all drivers and services comprising the agent

frx version

Displays the versions of the loaded components

Examples

    frx version

Rules

frx add-redirect

Add a new path redirection for the virtualization driver

    frx add-redirect -src <path>
                     -dest <path>

Required Parameters

-source or -src

Specifies the source path to redirect.

-destination or -dest

Specifies the path to act as redirection target.

Examples

    frx add-redirect -src C:\mysource -dest d:\mytest
    frx add-redirect -src C:\mysource -dest \\?\VolumeXXXXX\Test

frx add-rule

Add a specific rule.

    frx add-rule -hide <params>
                 -printer <params>
                 -redirect <params>
                 -specific-data <params>
                 -vhd-attach <params>

Examples

    frx add-rule -hide -src-parent C:\Windows
    frx add-rule -hide -src-parent \Registry\User\*\Software -src MySoftware  
    frx add-rule -redirect -src-parent C:\Windows -src=test.ini -dest-parent __USER_PROFILE_PATH__ -dest test.ini
    frx add-rule -specific-data -src-parent \Registry\Machine\Software -src Value -datatype DWORD -data 42000000
    frx add-rule -vhd-attach -src-parent C:\MyVolFolder -dest C:\VHDs\mydisk.vhd

Required Parameters

-src-parent

Parent directory/key or printer to which the rule applies.

Optional Parameters

-src

File or value name

-dest-parent

Destination directory or key (redirection rules only).

-dest

Destination file or value (redirection rules only).

-no-copy

Creates a blank copy of the item upon redirection if it does not exist (default is to copy the source item).

-volatile

Volatile rule that will not persist across a machine reboot.

-datatype

Type of specific data to return (SZ, DWORD).

-data

Hexadecimal representation of data to return.

Special Variables

Usable in -dest-parent or -dest parameters.

Variable Description
__USER_SID__ User's SID
__USER_NAME__ User's username
__USER_PROFILE_PATH__ Path to users profile

frx create-ruleset

Creates a Rule Set by scanning the specified install directory.

    frx create-ruleset -filename <path>
                       -install-dir <path>
                       -ARP-keyname <path>

Examples

    frx create-ruleset-name Chrome -install-dir "C:\Program Files\Google\Chrome\Application" -ARP-keyname "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome"

Parameters

-filename

Specifies the name of the file to be created.

-install-dir

Specifies the installation path of the application to be scanned.

-ARP-keyname

Specifies the Add/Remove program registry location.

frx del-redirect

Deletes an active redirect.

    frx del-redirect -source <path>

Examples

    frx del-redirect -source C:\MyData\Docs

Parameters

-source

Specifies the source folder to remove redirection from.

frx del-rule

Delete the specified rule.

    frx del-rule -src-parent <path>
                 -src <path>

Examples

    frx del-rule -src-parent C:\Windows -src test.ini
    frx del-rule -hide -src-parent \Registry\User\*\Software -src MySoftware

Required Parameters

-src-parent

Parent directory or key to which to rule applies.

Optional Parameters

-src

File or value name.

frx list-redirects

Lists the current active folder redirections.

    frx list-redirects

frx list-rules

Lists all rules loaded in the system.

    frx list-rules -verbose

Optional Parameters

-verbose

Displays additional information about the rule.

frx reload-rules

Reloads the rules. Can be specific to one file of rules, or apply to all rules.

Note

Reloading rules has no affect on volatile rules.

    frx reload-rules -filename <path>

Examples

    frx reload-rules -filename Rules.fxr

Optional Parameters

-filename

Specifies the rules file to be reloaded.

Profiles and Virtual Containers

frx copy-profile

Warning

If the local profile size exceeds 5 GB, you must specify the -size-mbs parameter with a size greater than 5000.

Copy a user's profile into a VHD or VHDX. If the VHD or VHDX file does not exist, it will be created.

    frx copy-profile -filename <path>
                     -username <username or domain\username>
                     -sid <sid>
                     -size-mbs <int>
                     -vhdx-sector-size <int>
                     -dynamic <1 or 0>
                     -src-parent <path>
                     -verbose <switch>
                     -profile-path <path>
                     -label <string>
                     -redirections <path>

Examples

Local profile less than 5 GB

    frx copy-profile -filename C:\Profile.vhd -username CONTOSO\msmith

Local profile greater than 5 GB

    frx copy-profile -filename C:\Profile.vhd -username CONTOSO\msmith -size-mbs 30000

Required Parameters

-filename

Specifies the path to the VHD(x) file.

-username

Specified as Username or DOMAIN\Username

-sid

Used in place of -username to identify the profile.

Optional Parameters

-size-mbs

Size in number of MBs for new VHD/VHDX

-vhdx-sector-size

VHDX sector size

-dynamic

Set to 1 for dynamic, 0 for fixed disk

-src-parent

Path the the parent VHDX file for differencing disks

-verbose

Enables verbose output

-profile-path

Specify the profile path

-label

Disk volume label (default is Profile)

-redirections

Specify the redirections file to copy to the profile

frx copyto-vhd

Copy a folder and its contents to a VHD or VHDX

    frx copyto-vhd -filename <path>
                   -src <path>
                   -dest <path>
                   -size-mbs <int>
                   -vhdx-sector-size <int>
                   -dynamic <1 or 0>
                   -verbose <switch>
                   -src-parent <path>
                   -label <string>

Examples

    frx copyto-vhd -filename C:\mydisk.vhd -src C:\data

Required Parameters

-filename

Specifies the path to the VHDX file

-src

Specifies the source folder to copy

Optional Parameters

-dest

Specifies the target folder in the VHDX file. Default destination is the VHDX root folder.

-size-mbs

Size in number of MBs for new VHD/VHDX

-vhdx-sector-size

VHDX sector size

-dynamic

Set to 1 for dynamic, 0 for fixed disk

-verbose

Enables verbose output

-label

Disk volume label (default is Profile)

frx create-vhd

Create and format a VHD or VHDX. By default the VHD or VHDX will be 30 GBs and sized dynamically.

    frx create-vhd -filename <path>
                   -size-mbs <int>
                   -vhdx-sector-size <int>
                   -dynamic <1 or 0>
                   -src-parent <path>
                   -label <string>

Examples

    frx create-vhd -filename C:\Profile.vhd

Required Parameters

-filename

Specifies the path to the VHDX file

Optional Parameters

-size-mbs

Size in number of MBs for new VHD/VHDX

-vhdx-sector-size

VHDX sector size

-dynamic

Set to 1 for dynamic, 0 for fixed disk

-src-parent

Path the the parent VHDX file for differencing disks

-label

Disk volume label (default is Profile)

frx edit-profile

Attaches the specified VHD or VHDX and opens an Explorer Window and Registry editor so the contents of the profile can be viewed and edited.

    frx edit-profile -filename <path>

Examples

    frx edit-profile -filename C:\Profile.vhd

Parameters

-filename

Specifies the path to the VHDX file

frx begin-edit-profile

Attaches the specified VHD or VHDX and attaches the registry hive so the contents of the profile can be viewed and edited.

    frx begin-edit-profile -filename <path>

Examples

    frx begin-edit-profile -filename C:\Profile.vhd

Parameters

-filename

Specifies the path to the VHDX file

frx end-edit-profile

Detaches the specified VHD or VHDX and the registry hive

    frx end-edit-profile -cookie <string>
                         -filename <path>

Examples

    frx end-edit-profile -cookie 4876 -filename C:\Profile.vhd

Parameters

-cookie

Specifies the cookie printed out from the begin-edit-profile call.

-filename

Specifies the path to the VHDX file

frx export-profilecfg

Exports profile configuration settings and inclusion/exclusion group membership to a file. The settings can be imported later with the import-profilecfg command.

    frx export-profilecfg -filename <path>

Examples

    frx export-profilecfg -filename my_configuration.frxconfig

Parameters

-filename

Specifies the file for the configuration data to be stored.

frx import-profilecfg

Imports profile configuration settings and inclusion/exclusion group membership from file. This file can be generated with the export-profilecfg command.

    frx import-profilecfg -filename <path>

Examples

    frx import-profilecfg -filename my_configuration.frxconfig

Parameters

-filename

Specifies the file for the configuration data to be stored.

frx migrate-vhd

Creates, formats a VHD or VHDX, and mirrors the contents of the source VHD. By default the VHD or VHDX will be 30 GBs and sized dynamically.

    frx migrate-vhd -src <path>
                    -dest <path>
                    -size-mbs <int>
                    -vhdx-sector-size <int>
                    -dynamic <0 or 1>

Examples

    frx migrate-vhd -src C:\old\Profile.vhd -dest C:\new\Profile.vhd

Required Parameters

-src

Specifies the path to the source VHDX file

-dest

Specifies the new VHDX filename.

Optional Parameters

-size-mbs

Size in number of MBs for new VHD/VHDX

-vhdx-sector-size

VHDX sector size

-dynamic

Set to 1 for dynamic, 0 for fixed disk

frx moveto-vhd

Moves a folder along with all its sub-folders and files to a VHD(X) disk.

    frx moveto-vhd -filename <path>
                   -src <path>
                   -dest <path>
                   -size-mbs <int>
                   -vhdx-sector-size <int>
                   -dynamic <1 or 0>
                   -verbose <switch>
                   -src-parent <path>
                   -label <string>

Examples

    frx moveto-vhd -filename C:\mydisk.vhd -src C:\data

Required Parameters

-filename

Specifies the path to the VHDX file

-src

Specifies the source folder to move

Optional Parameters

-dest

Specifies the target folder in the VHDX file. Default destination is the VHDX root folder.

-size-mbs

Size in number of MBs for new VHD/VHDX

-vhdx-sector-size

VHDX sector size

-dynamic

Set to 1 for dynamic, 0 for fixed disk

-verbose

Enables verbose output

-label

Disk volume label (default is Profile)

frx set-profile-redir

Sets the profile's folder redirections configuration

    frx set-profile-redir -filename <path>
                          -redirections <path>
                          -no-redirections <switch>

Examples

    frx set-profile-redir -filename C:\Profile.vhd -redirections C:\redir.xml

Required Parameters

-filename

Specifies the path to the VHDX file

Optional Parameters

-redirections

Specify the redirections file to copy to the profile.

-no-redirections

Remove any exiting redirections from the profile.

Search Component

frx reset-user-search-db

Re-index a user's search index database.

    frx reset-user-search-db -username <username or domain\username>
                             -sid <sid>

Examples

    frx reset-user-search-db -username DOMAIN\USERNAME

Parameters

-username

Specify username or DOMAIN\username.

-sid

Specify the users SID instead of using -username

Credential Manager Key Management

frx add-secure-key

Add a secure key to Credential Manager.

    frx add-secure-key -key <string>
                       -value <string>

Examples

    frx add-secure-key -key fslogix -value secretStringABC123

Parameters

-key

Specifies the key name for the credential.

-value

Specifies the value for the desired key.

frx del-secure-key

Delete a secure key from Credential Manager

    frx del-secure-key -key <string>

Examples

    frx del-secure-key -key fslogix

Parameters

-key

Specifies the key name for the credential.

frx list-secure-key

List the keys that are contained in Credential Manager

    frx list-secure-key 

Miscellaneous

frx create-junction

Creates a junction point to a target volume or folder

    frx create-junction -src <path>
                        -dest <path>
                        -name <string>

Examples

    frx create-junction -src E:\ -dest \\Volume{2dd97d8a-3bab-11e1-b9ff-080027e238aa}

Required Parameters

-src

Specifies the drive or folder where the junction point will be added.

-dest

Specifies the target folder or volume.

Optional Parameters

-name

Optional display name.

frx enable-shnot

Enables shell refresh notification

    frx enable-shnot -true <switch>
                     -false <switch>
                     -force <switch>

Examples

    frx enable-shnot -force

Optional Parameters

-true

Enables notifications

-false

Disables notifications

-force

Forces immediate notification if enabled.

frx regfont

Registers a font in the system font table

    frx regfont -filename <path>

Examples

    frx regfont -filename C:\myfont.ttf

Parameters

-filename

Specifies the path to the font file.

frx report-assignment

Reports on the applicability and non-applicability of a Rule Set by analyzing the assignment file and Active Directory.

    frx report-assignment -filename <path>
                          -username <LDAP>
                          -verbose <switch>
                          -csv <switch>

Examples

    frx report-assignment -filename C:\test.fxa -username "CN=User,DC=domain"

Required Parameters

-filename

Specifies the path to the assignment file.

Optional Parameters

-username

Reports the applicability of the assignment file for the user specified (distinguished name).

-verbose

Enables verbose output.

-csv

Enables output in comma separated value (CSV) format.

frx show-junction-info

Shows junction point information on the specified folder.

    frx show-junction-info -src <path>

Examples

    frx show-junction-info -src E:\

Parameters

-src

Specifies from which drive or folder the information is gathered from.

frx unregfont

Removes a font from the system font table

    frx unregfont -filename <path>

Examples

    frx unregfont -filename C:\myfont.ttf

Parameters

-filename

Specifies the path to the font file.

frx start-agent

Starts all drivers and services comprising the agent

    frx start-agent

frx stop-agent

Stops all drivers and services comprising the agent

    frx stop-agent