Showing category results for PowerTip

May 25, 2016
Post comments count1
Post likes count0

PowerTip: Get all Azure Resource Manager resource groups with PowerShell

Doctor Scripto

Summary: Using the AzureRM cmdlets to get a list of resource groups.  I have a client who has a large list of resource groups. Can you show me how to get a filtered list?  Just use the Get-AzureRMResourceGroup cmdlet and pipe the results to Where-Object. To identify all resource groups that start with HSG in the name, try this;

Windows PowerShellPowerTipguest blogger
May 24, 2016
Post comments count0
Post likes count0

PowerTip: Get a list of all subscriptions in your Azure Resource Manager account

Doctor Scripto

Summary: Use the Get-AzureRMSubscription cmdlet.  How can I see all of the available subscriptions when I am logged into Azure Resource Manager?  Just run the Get-AzureRMSubscription cmdlet to get a complete list available to your UserID. Get-AzureRMSubscription

Windows PowerShellPowerTipguest blogger
May 23, 2016
Post comments count0
Post likes count1

PowerTip: Find a module in the PowerShell Gallery

Doctor Scripto

Summary: Use the PowerShell Find module to search for modules.  I was trying to use the Find-module. Can you show me how to find all modules that have the word, Azure, in them?  Just use a wildcard in the search like in the following example to return modules with the name Azure in the beginning:

Windows PowerShellPowerTipguest blogger
Apr 25, 2016
Post comments count0
Post likes count0

PowerTip: Specify that a script requires admin privileges to run

Doctor Scripto

Summary: Learn how to require admin privileges to run a Windows PowerShell script.  How can I make sure that my Windows PowerShell script has administrator privileges to run?  Use the #Requires directive and specify RunAsAdministrator. Here is an example:

Apr 17, 2016
Post comments count0
Post likes count1

PowerTip: Use PowerShell to display a percentage that has two decimal places

Doctor Scripto

Summary: Use Windows PowerShell to display a percentage as a two place number.  How can I use Windows PowerShell to display a number as a percentage that has two decimal places?  Use the -f format specifier, and specify a pattern as “{0:p2}”. On the other side of the -f format specifier, perform your percentage calculation. Here is an example: PS ...

Scripting Guy!Windows PowerShellPowerTip