Need a script in Power-Shell to turn on/off VM - With credentials

%3CLINGO-SUB%20id%3D%22lingo-sub-360252%22%20slang%3D%22en-US%22%3ENeed%20a%20script%20in%20Power-Shell%20to%20turn%20on%2Foff%20VM%20-%20With%20credentials%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-360252%22%20slang%3D%22en-US%22%3E%3CP%3EHello%3CBR%20%2F%3EI%20need%20to%20create%20a%20PS%20script%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20script%20needs%20to%20run%20OUT%20from%20the%20portal.%26nbsp%3B%3CBR%20%2F%3EThe%20script%20should%26nbsp%3Bcontain%20with%20the%20name%20of%202%20VM's%20in%20the%20same%20RG%20a%20region.%3CBR%20%2F%3EIt%20needs%26nbsp%3Bto%20connect%20to%20the%20portal%2Fsubscription%20-%26gt%3B%20and%20startup%20the%20VM's%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EAfter%20that%2C%20I%20will%20use%20a%20copy%20of%20this%20script%20to%20make%20the%20shutdown%20for%20those%20vm's.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20help%20me%20with%20this%20ask%2C%20please%3F%26nbsp%3B%3CBR%20%2F%3EThanks%20in%20advance%2C%3C%2FP%3E%3CP%3EMoshe.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-360252%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hello
I need to create a PS script 

The script needs to run OUT from the portal. 
The script should contain with the name of 2 VM's in the same RG a region.
It needs to connect to the portal/subscription -> and startup the VM's


After that, I will use a copy of this script to make the shutdown for those vm's. 

 

Can someone help me with this ask, please? 
Thanks in advance,

Moshe.

0 Replies