Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # CONSTRAINED.PSSC
- @{
- # Version number of the schema used for this configuration file
- SchemaVersion = '1.0.0.0'
- # ID used to uniquely identify this session configuration.
- GUID = '987d7c91-712c-4673-808e-27b323a067e3'
- # Specifies the execution policy for this session configuration
- ExecutionPolicy = 'Restricted'
- # Specifies the language mode for this session configuration
- LanguageMode = 'NoLanguage'
- # Initial state of this session configuration
- SessionType = 'Default'
- # Environment variables defined in this session configuration
- # EnvironmentVariables =
- # Author of this session configuration
- Author = 'Thomas Lee'
- # Company associated with this session configuration
- CompanyName = 'PSP'
- # Copyright statement for this session configuration
- Copyright = '(c) 2012 PSP. All rights reserved.'
- # Description of the functionality provided by this session configuration
- # Description =
- # Version of the Windows PowerShell engine used by this session configuration
- # PowerShellVersion =
- # Modules that will be imported.
- ModulesToImport = @("ServerManager")
- # Assemblies that will be loaded in this session configuration
- # AssembliesToLoad =
- # Cmdlets visible in this session configuration
- VisibleCmdlets = @("Get-ChildItem", "Get-Help", "exit-pssession",
- "Get-Module","Measure-Object",'Select-Object', 'Get-Command', 'Out-Default')
- # Functions visible in this session configuration
- # VisibleFunctions =
- # Providers visible in this session configuration
- # VisibleProviders =
- # Aliases defined in this session configuration
- AliasDefinitions = @{Name="hlp";Definition="Get-Help" ;Description="Gets help";Options="Readonly"},
- @{Name='l';Definition='Get-ChildItem';Options='ReadOnly'}
- # Aliases visible in this session configuration
- VisibleAliases = @("gh", "gci", "gcm", "exit", 'hlp', 'l')
- # Functions defined in this session configuration
- # FunctionDefinitions =
- # Variables defined in this session configuration
- # VariableDefinitions =
- # Type files (.ps1xml) that will be loaded in this session configuration
- # TypesToProcess =
- # Format files (.ps1xml) that will be loaded in this session configuration.
- # FormatsToProcess =
- # Specifies the scripts to run after the session is configured
- # ScriptsToProcess =
- }
- # REgister SCF on Remote system
- Register-PSSessionConfiguration -name Constrained -Accessmode Remote -FOrce -Path C:\foo\Constrained.pssc
- # On local machine
- $s = New-PSSession -ComputerName Cookham12 -ConfigurationName constrained; $s
- Enter-Pssession $s
- Then I see HLP does not work. :-(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement