Q:

Powershell draw visio container

I need to use powershell to draw visio, but I dont know how powershell can draw containers.
This is the article 
https://powershellstation.com/2016/04/18/powershell-and-visio-part-6-containers/
that I have referenced and followed, but it seems $master has not been declared somewhere so it is failing.
I wonder if anyone has any instructions for this problem.
This is my code
$Visio=New-Object -ComObject Visio.Application  
$doc=$Visio.Documents.Add(‘’)  
$Page=$Visio.ActivePage  
$stencilPath=$Visio.GetBuiltInStencilFile(2,0)
$stencil=$Visio.Documents.OpenEx($stencilPath,64)
$page=$Visio.ActivePage
$container=$page.Drop($master,5,5)
$rec=$page.DrawRectangle(2,3,5,6)
$container.ContainerProperties.AddMember($rec,1) 

This is the error
You cannot call a method on a null-valued expression.
At line:7 char:1
+ $container.ContainerProperties.AddMember($rec,1)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

I appreciate everyone's help.

A:

This is the code to draw container
$stencilPath=$viso.GetBuiltInStencilFile(2,0)
$stencil=$viso.Documents.OpenEx($stencilPath,64)
$Master=$stencil.Masters('Classic')
$Page.Drop($Master,11)

