Professional Documents
Culture Documents
User-specific profiles are located in a WindowsPowerShell directory in the %UserProfile% directory. On 64-bit versions of Windows, Windows PowerShell includes a second set of profiles for all users. These are located in: %windir%\syswow64\WindowsPowerShell\v1.0\profile.ps1 %windir%\syswow64\WindowsPowerShell\v1.0\ Microsoft.PowerShell_profile.ps1 As before, the Microsoft.PowerShell_profile.ps1 profiles are specific to the Microsoft.PowerShell shell, and the profile.ps1 profiles apply to all shells.
easier to refer to directories and files with names that contain an escape character (`) or wildcard characters. -- Windows PowerShell does not interpret a backtick (`) as an escape character when it appears within single quotation marks. This applies to all single-quoted strings, including strings in scripts. Example: PS> dir oct`06 Get-ChildItem : Illegal characters in path. At line:1 char:4 + dir <<<< oct`06 Get-ChildItem : Cannot find path 'C:\PS\oct 6' because it does not exist. At line:1 char:4 + dir <<<< oct`06 PS> dir 'oct`06' -- A "LiteralPath" parameter has been added to all core cmdlets that support wildcard expansion. LiteralPath prevents Windows PowerShell from resolving wildcard patterns in a path. To access a path that includes both an escape character (`) and wildcard characters, use both the LiteralPath parameter and single quotation marks. For example: PS > get-content -LiteralPath 'te[s`t].txt'
Miscellaneous changes:
- $host.version now reports the actual host version 1.0.0.0, not the assembly version. - A Force parameter was added to the ConvertTo-SecureString cmdlet. - Tab completion now works on property references: PS >$a = get-process outlook PS >$a.Mai<tab> => $a.MainModule then $a.MainModule.fi<tab> => $a.MainModule.FileName - Default attributes can now be used to resolve ambiguous parameter sets. For example, if a cmdlet has two parameter sets, and the command that is entered could be resolved by using either of the parameter sets, the default parameter set is used. Before this change, the command would generate a "cannot resolve parameterset" error.