Closed pecjag closed 6 years ago
The PowerShell equivalent of a using statement is a #Requires statement, as in
#Requires -Module AzureRM.Network
Once you have done this, the appropriate types should be loaded in your script for usage.
Thank you!
Description
The "using module AzureRm" command does not work from within a script, and ISE complains: "Could not find the module 'AzureRm'".
I wish to use the [Microsoft.Azure.Commands.Network.Models.PSSecurityRule] class as a return type for a method. But in a new PS session, i get get the following error parsing the script:
At C:\Users\xxx\NSGMgt.ps1:171 char:10
Script/Steps for Reproduction
Module Version
Environment Data
Debug Output