Browse by Tags

Tagged Content List
  • Blog Post: 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...
  • Blog Post: PowerTip: Display a Blinking Message by Using PowerShell

    Summary : Use this one-line Windows PowerShell command to display a blinking message. Is there a one-line command that I could use to blink a message in the Windows PowerShell console to get the users attention? Pipe a range of numbers to the Foreach-Object cmdlet ( % is an alias), clear the screen...
  • Blog Post: PowerTip: Add Computer to Security Group with PowerShell

    Summary : Use Active Directory PoweShell cmdlets to add a computer to a security group. How can I use Windows PowerShell to add a computer to a security group? Use the Add-ADGroupMember cmdlet, and remember to use the SAM account name on the computer: To add a computer called “STATION01”...
  • Blog Post: PowerTip: Show Group Members with PowerShell

    Summary : Use Windows PowerShell to get a list of group members in Active Directory. How can I use Windows PowerShell to regularly show who is in an Active Directory group, for example, Domain Admins? To show who is in the Domain Admins group in Active Directory, run the following command: Get...
  • Blog Post: PowerTip: Create Computer Account in Active Directory with PowerShell

    Summary : Use the Active Directory module to create a new computer account. How can I use Windows PowerShell to create a computer account in Active Directory? To create a new computer called ScriptoPC , execute the following line in an Active Directory environment with a domain controller running...
  • Blog Post: PowerTip: Set Custom Attributes in Active Directory

    Summary : Use the Set-ADUser cmdet to modify custom attributes. How can I use Windows PowerShell to modify a custom attribute in Active Directory? Use the Set-ADUser cmdlet and it’s –add , -replace , and –remove parameters to adjust custom attributes. For example, to update...
  • Blog Post: PowerTip: Create a Secure Password with PowerShell

    Summary : Use Windows PowerShell to make a plain text entry into a secure password. Is there a way I can use Windows PowerShell and my working script to make a secure string password without using Read-Host ? Use the ConvertTo-SecureString cmdlet: $MyBoringPassword=”OhThisCouldBeSecure...
  • Blog Post: PowerTip: Debug a Workflow with PowerShell 4.0

    Summary : Use Windows PowerShell 4.0 to debug a workflow. How do I set a breakpoint in a Windows PowerShell script workflow? Add the workflow to a script and use Set-PSBreakpoint to set a line breakpoint in the workflow: Set-PSBreakpoint -Script C:\Test-MyWorkflow1.ps1 -Line 12 ID Script...
  • Blog Post: PowerTip: Use PowerShell to Discover Console Colors

    Summary : Use Windows PowerShell to discover console color assignment. How can I see what colors are assigned in the Windows PowerShell console? Use the Get-Host cmdlet and expand the PrivateData property: (get-host).privatedata
  • Blog Post: PowerTip: PowerShell One-Liner to Find Short Aliases

    Summary : Use this Windows PowerShell one-liner to find one-, two-, three-, and four-letter aliases. How can I use a Windows PowerShell one-liner to find the number of default aliases that are one, two, three, and four letters long? Use the range operator to create an array with 1 through 4 numbers...
  • Blog Post: PowerTip: Use PowerShell to List App Background Task Info

    Summary : Use Windows PowerShell to list app background task information. How can I use Windows PowerShell to find performance information about app background tasks on my laptop running Windows 8.1? Open Windows PowerShell with Admin rights. Use the Get-AppBackgroundTask cmdlet, and include the...
  • Blog Post: PowerTip: Use PowerShell to Display a Routing Table

    Summary : Use Windows PowerShell to display your routing table. How can I use Windows PowerShell to display the routing table on my Windows 8.1 laptop? Use the Get-NetRoute function.
  • Blog Post: PowerTip: Use PowerShell to Find DNS Suffix Search List

    Summary : Use Windows PowerShell to find a DNS suffix search list. How can I use Windows PowerShell to find how DNS is configured on my computer running Windows 8.1 in terms of domain suffix search lists? Use the Get-DnsClientGlobalSetting function.
  • Blog Post: PowerTip: Use PowerShell to Get BitLocker Recovery Key

    Use Windows PowerShell to get the BitLocker recovery key. ...( read more )...( read more )
  • Blog Post: PowerTip: Find PowerShell Logging Info

    Summary : Use a Windows PowerShell cmdlet to retrieve logged information about Windows PowerShell. How can I easily find logged information about Windows PowerShell? Use the Get-WinEvent cmdlet and look for a LogName with powershell in the name: Get-WinEvent -LogName *powershell*...( read more...
  • Blog Post: PowerTip: View PowerShell Console Host Information

    Summary : View Windows PowerShell console host information. How can I easily find information about the Windows PowerShell console host? Use the Get-Host cmdlet, and select the RawUI property from the InterhostUserInterface object: (get-host).ui.RawUI...( read more )
  • Blog Post: PowerTip: Use PowerShell to Display Date, Time, and Hour

    Summary : Use Windows PowerShell to display date, time, and hour in 24-hour format. How can I use Windows PowerShell to get the hour of the day in 24-hour format? Use the Get-Date cmdlet and specify the “%H” pattern to the UFormat parameter ( H is case sensitive): get-date -UFormat...
  • Blog Post: PowerTip: Customize How PowerShell Displays a Date

    Summary : Easily customize the way Windows PowerShell displays a date. How can I use Windows PowerShell to easily display the date as day-dash-month-dash-four-digit year? Use the Get-Date cmdlet,specify a custom format by using the Format parameter, and use dd for the date, M for the month and...
  • Blog Post: PowerTip: Use PowerShell to Display Locale-Specific Date

    Summary : Learn how to use Windows PowerShell to display the date in locale-specific format. How can I use Windows PowerShell to display the day, month, and two-digit year in locale specific format? Use the Get-Date cmdlet and the –uformat parameter: get-date -UFormat %x...( read more...
  • Blog Post: PowerTip: Display All PowerShell Modules and Cmdlets

    Summary : Learn how to display all Windows PowerShell modules and cmdlet names. How can I get output that shows Windows PowerShell module names and the cmdlets or functions that are contained inside the modules? Use the Get-Module cmdlet, and then for each module, display the name and use Get-Command...
  • Blog Post: PowerTip: Use PowerShell to Write BitLocker Recovery Key to Text File

    Summary : Use Windows PowerShell to write your BitLocker recovery key to a text file. If I forgot to save my BitLocker recovery key when I enabled BitLocker on my laptop, how can I use Windows PowerShell to write it to a text file so I can copy it to a USB key for safe keeping? From an elevated...
  • Blog Post: PowerTip: Find Case-Specific Strings by Using PowerShell

    Summary : Use Windows PowerShell to find case-specific strings. How can I find a particular, case-sensitive word in a string? Use Select-String and specify the –CaseSensitive switch: "Hey Scripting Guy","hey scripting guy" | Select-String ...read more
  • Blog Post: PowerTip: Use PowerShell to Show Approved Verbs Group

    Summary : Use Windows PowerShell to show the group of approved Windows PowerShell verbs. How can I find the grouping information for a couple of approved verbs that I want to use to name my advanced functions? Use the Get-Verb function, and supply ...read more
  • Blog Post: PowerTip: Use PowerShell to Display Replications in AD DS

    Summary : Use Windows PowerShell to display replication connections in Active Directory Domain Services. How can I use a cmdlet from the Active Directory module to display replication connections in AD DS? Use the Get-ADReplicationConnection cmdlet ...read more
  • Blog Post: PowerTip: Use PowerShell to Get DHCP Server Database Info

    Summary : Learn how to use Windows PowerShell to get the DHCP Server database information. How can I use Windows PowerShell to get the database information for a DHCP server if I do not know the name of the server? Use the ServerName property from ...read more
Page 1 of 2 (33 items) 12