2016-11-28 12 views

答えて

1

about_Scopes documentationをご覧ください。

script範囲があります:

また
Script: 
     The scope that is created while a script file runs. Only 
     the commands in the script run in the script scope. To 
     the commands in a script, the script scope is the local 
     scope. 

読む価値 - 適用範囲がなければ制限:

Modules: 
     You can use a Windows PowerShell module to share and deliver 
     Windows PowerShell tools. A module is a unit that can contain 
     cmdlets, scripts, functions, variables, aliases, and other useful 
     items. Unless explicitly defined, the items in a module are not 
     accessible outside the module. Therefore, you can add the module to 
     your session and use the public items without worrying that the 
     other items might override the cmdlets, scripts, functions, and other 
     items in your session. 


     The privacy of a module behaves like a scope, but adding a module 
     to a session does not change the scope. And, the module does not have 
     its own scope, although the scripts in the module, like all Windows 
     PowerShell scripts, do have their own scope. 
関連する問題