Get Windows Azure Active Directory Tenant ID in Windows PowerShell

Summary: Get your Windows Azure Active Directory tenant ID in Windows PowerShell.  How can I get my Windows Azure Active Directory tenant ID in Windows PowerShell?  Use the Add-AzureAccount cmdlet to add your Windows Azure account to Windows PowerShell: PS C:> Add-AzureAccount           Then use Get-AzureAccount to get the tenant ID: PS… Read more

Reusing PowerShell Registry Time Stamp Code

Summary: Guest blogger, Rohn Edwards, discusses reusing code that obtains the last-modified time stamp from the registry. Microsoft Scripting Guy, Ed Wilson, is here. Today is the last day of the year, but don’t despair. We are here to share some Windows PowerShell goodies with you.  Welcome back Rohn Edwards as our guest blogger this… Read more

PowerTip: Use PowerShell to Find Registry Access

Summary: Use Windows PowerShell to find registry access.  How can I use Windows PowerShell to get the ACL for a registry key?  Use the Get-ACL cmdlet on a key in a Windows PowerShell registry drive.           The following example shows access to the HKLM\Software\Microsoft key: Get-acl HKLM:\SOFTWARE\Microsoft… Read more

Use PowerShell to Access Registry Last-Modified Time Stamp

Summary: Guest blogger, Rohn Edwards, talks about using Windows PowerShell to access the last-modified time stamp in the registry. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Rohn Edwards. Rohn is one of the cofounders of the Mississippi PowerShell User Group. I’m not sure how many of you know this, but the… Read more

PowerTip: Use PowerShell to Disable Network Adapter

Summary: Use Windows PowerShell to disable a network adapter.  How can I use Windows PowerShell to disable a network adapter on my Windows 8.1 laptop named Wireless?  Use the Disable-NetAdapter cmdlet and provide the name of Wireless to the command: Disable-NetAdapter –name wireless… Read more

Weekend Scripter: Using PowerShell to Replace STSADM

Summary: Learn about a Windows PowerShell script to replace STSADM –o enumallwebs in SharePoint. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back today guest blogger, Brian Jackett. Brian is a senior premier field engineer at Microsoft who has specialized in SharePoint development, Windows PowerShell, and Project Server since 2008. Brian is a steering committee… Read more

PowerTip: Get Time Difference between Dates with PowerShell

Summary: Use New-TimeSpan to produce the time difference between two dates.  I know I can subtract dates, but is there a Windows PoweShell cmdlet to show me the time difference between dates?  Use New-TimeSpan and supply the information!          For example, to show the difference between today and the upcoming New Year: $StartDate=(GET-DATE) $EndDate=[datetime]”01/01/2014 00:00” NEW-TIMESPAN… Read more

Weekend Scripter: Use PowerShell to Host New Year’s Eve Countdown Clock

Summary: Use [DATETIME] variables and arrays to produce a countdown timer. Honorary Scripting Guy, Sean Kearney, here filling in for our good friend, Ed. With the New Year coming up in a few days, I decided to present something silly and geeky. I want to use Windows PowerShell to produce a New Year’s countdown timer…. Read more

PowerTip: Use PowerShell to Create Hash Table

Summary: Use a Windows PowerShell cmdlet to create a hash table.  How can I use Windows PowerShell to create a hash table if do not remember the special syntax?  Use the ConvertFrom-StringData cmdlet, and put each key-value pair on its own line.           (You can perform this on a single line by using backtick… Read more

Phantom Elements in a Hash Table

Summary: Microsoft PFE and guest blogger, Chris Wu, talks about working with hash tables. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back guest blogger, Chris Wu… Admittedly, hash tables didn’t catch my attention when I started using Windows PowerShell, but over time it has proven to be one of my favorites. This is largely… Read more