-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

PowerShell 7 Workshop
By :

Try running Remove-Module
to get rid of the module we’ve just installed, and then running Get-Square
. What happens? Why does this happen?
The Get-Square
cmdlet is still available. This is because we saved the module in the module path correctly; this means that PowerShell will autoload the module when we call a function in the module. We can see it working in the following screenshot:
Figure A.13 – Autoloading with PowerShell
In the first line, I list the loaded modules. Then, I run Get-Square 7
, which autoloads MyFirstModule
. After that, I confirm that’s what happened by running Get-Module
again. We can see that Remove-Module
removes the Get-Square
cmdlet by running it with the -Verbose
switch in the last line.
Change the font size
Change margin width
Change background colour