45
.
Either copy the directories under
Modules\
into a standard
Powershell
module installation directory, for example
C:\Program
Files\WindowsPowerShell\Modules
. Then launch a
Powershell
console.
.
Or redefine the search variable for
Powershell
modules (the
$Env:PSModulePath
Powershell
variable) each time you will use theses
functions. In this case, launch a
Powershell
console, and type the line below, adapting it to your path. Each time you launch a new
Powershell
console, you need to enter it again.
Example:
PS > $Env:PSModulePath="$Env:PSModulePath;C:\Program Files (x86)\WindowsPowerShell\Modules"
.
Or redefine the search variable for
Powershell
modules in the Windows environment variables. For that, add the path
<your_path_to_the_scripts>\Powershell_Innes_AAD\Modules
to the environment variable
PSModulePath
. Then, launch afterwards a
Powershell
console.
To use the functions or get help, you must then import the module(s) with the
Import-Module
function. Example:
PS > Import-Module PSAAD
Depending on how you get the scripts, you may have this following warning:
Security Warning Run only scripts that you trust. While scripts from the Internet can be useful, ../..
this script can potentially harm your computer. Do you want to run \server\scripts\my.ps1? ../..
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
To avoid this message, you can unblock the script files (to do only once):
PS > cd <your_path_to_the_scripts>\Powershell_Innes_AAD\
PS > dir -Recurse | Unblock-File
The
Get-Command
function allows you to list the functions defined in a module. Example:
PS > Get-Command -Module PSAAD
Answer example:
CommandType Name Version Source
----------- ---- ------- ------
Function New-AADApplication 1.10.13 PSAAD
Function Remove-AADApplication 1.10.13 PSAAD
You can get help on each function of the module by using the standard cmdlet
Get-Help
with options:
-detailed
,
-full
,
-examples
.
Example:
PS > Get-Help -detailed New-AADApplication
Summary of Contents for SBL10e m365 room
Page 1: ...User manual SBL10e m365_room 1 11 11 002A ...
Page 4: ...4 Part I Description and installation ...
Page 6: ...6 1 1 1 Device dimensions ...
Page 13: ...13 Part II Applicative user interface ...
Page 16: ...16 Part III Administration console user interface ...
Page 32: ...32 Part IV Technical information ...
Page 35: ...35 Part V Contacts ...
Page 37: ...37 Part VI Appendix ...
Page 52: ...52 ...