

- #SAPIEN POWERSHELL STUDIO EXECUTABLE DOT SOURCING CODE#
- #SAPIEN POWERSHELL STUDIO EXECUTABLE DOT SOURCING WINDOWS#
As a result, you can edit the same psf file in a low DPI environment and in a high DPI environment, while maintaining the form’s scale (as oppose to Visual Studio where it is recommended to design the GUI in a 96 DPI environment because the form will not scale correctly when editing between different DPI environments.) PowerShell Studio now ensures that your forms scale correctly in the designer. To create your own high DPI version of a custom layout, simply save the layout with the. When PowerShell Studio detects a high DPI environment (DPI > 96) it will automatically load (if present) the high DPI version of the selected layout. With high DPI screens, you will require high DPI layouts. The good news is that this no longer the case with PowerShell Studio 2016. The fuzzy appearance is caused by Windows’ scaling of non-DPI aware applications.

Those of you who previously ran PowerShell Studio on a high DPI monitor (Windows 10 in particular) probably noticed that the application appeared fuzzy. We have added high DPI support to PowerShell Studio’s UI. You can reach her at or follow her on Twitter at released a new service build of PowerShell Studio 2016 (v5.2.124)! June Blender is a technology evangelist at SAPIEN Technologies, Inc. We’ll look at these behaviors in a separate post. Instead, it imports the first instance of that module that it encounters with a version greater than or equal to the minimum.Īlso, Get-Command cannot get a command in a non-default version of a module unless that version is already imported into the current session. When the core commands use the ModuleSpecification object parameters, they don’t always return what you expect.įor example, in PowerShell 2.1002, when you specify a minimum version, Import-Module doesn’t look for the earliest qualified version. So, forget the class and use the rules to create a hash table.

+ FullyQualifiedErrorId : PropertyAssignmentExceptionĪnd, the properties don’t match the hash table key names. + CategoryInfo : InvalidOperation: (:), RuntimeException

Get-InstalledModule MinimumVersion System.Version PS C:\> C:\ps-test\Get-ParameterName.ps1 -ParameterName "*Version"įind-DscResource MinimumVersion System.Versionįind-Module MinimumVersion System.Versionįind-Script MinimumVersion System.Version To verify for any given command, check the help. Import -Module -Name Pester -RequiredVersion 3.4.0īe aware that Version and ModuleVersion parameters often behave like MinimumVersion, not RequiredVersion. PS C:\> (Get-Command Import-Module).ParameterSets.Parameters | where Name -like "*Version" | Sort Name | Select -Property Name, ParameterType -UniqueĪlso, several commands, including the functions in the PowerShellGet module, have version parameters, even though they don’t have parameter that takes a ModuleSpecification object. While Import-Module has a FullyQualifiedName parameter that takes a ModuleSpecification object, it also has version parameters that have the same effect, except for the GUID. \Get-ParameterType.ps1 -ParameterType ModuleSpecification #Requires -Module ModuleVersion='3.4.0'}Īlso, several cmdlets and functions in PowerShell 5.0 have parameters that take a ModuleSpecification object. If I wanted the Expand-Archive command in the PSCX module, I could use a module-qualified name, such as:
#SAPIEN POWERSHELL STUDIO EXECUTABLE DOT SOURCING CODE#
That’s complex enough on my own system, but if I’m running shared code in an arbitrary environment, I better make sure that I’m running the correct command. When I run ‘Get-Command Expand-Archive,’ PowerShell gets the command that actually runs when I type ‘Expand-Archive.’ That command is determined by command precedence and by the order in which PowerShell finds modules, which is, in turn, determined by the order of paths in the $PSModulePath environment variable. I can use Get-Command, of course, but when I surround the command name with wildcard characters to make sure it searches, it returns this: PS C:\ > Get-Command *Expand-Archive*įunction Expand-Archive 1.0.0.0 PowerShellLoggingįunction Expand-Archive 1.0.0.0 įunction Expand-Archive 0.8.0.0 I want to get the Expand-Archive command in the cmdlet. Use it to make sure that the commands and module that you use are the ones that you intend.
#SAPIEN POWERSHELL STUDIO EXECUTABLE DOT SOURCING WINDOWS#
With the advent of side-by-side module versions in Windows PowerShell 5.0, the lovely, but obscure ModuleSpecification object has become your new best friend.
