Mindblown: a blog about philosophy.

  • PowerShell Invoke-Command

    The Invoke-Command cmdlet in PowerShell executes commands on local and remote computers and returns the output with the errors from the command. We can also use this cmdlet on the local computers to the script blocks as a command. Syntax Parameters -ScriptBlock This parameter is required, and it specifies the command to execute. When we create a…

  • PowerShell Get-Command

    The PowerShell Get-Command cmdlet is used to get all the commands which are installed on the computer system. This cmdlet includes functions, other cmdlets, aliases, filters, scripts, and applications. We can get only those commands which have been imported into the current session by using the -ListImported parameter. With the starting of Windows PowerShell 5.0, this cmdlet…

  • PowerShell Write-Host

    The PowerShell Write-Host cmdlet is used to write the customized output to a host. We can specify the text color by using the -foreground parameter, and by using the -background parameter, we can specify the background color. Syntax Parameters -Object The -Object parameter is used to display the objects in the host. -NoNewline The -NoNewline parameter specifies…

  • PowerShell Out-File

    The Out-File cmdlet in PowerShell sends the output to a specific file. When you need to use its parameters, use this cmdlet instead of redirection operator (>). Syntax Parameters Followings are the parameters used in this cmdlet: -FilePath and -LiteralPath Both the parameters are used to specify the path to the file in the command. -Encoding This…

  • PowerShell Set-Content | PowerShell write to file

    The PowerShell Set-Content cmdlet writes the new content or replacing the existing content in a file. It differs from the Add-content cmdlet, which appends the content to the file. To send the content to the Set-Content cmdlet, we can use the -Value parameter on the command line, or we can send a content through the pipeline. The sc is the alias…

  • PowerShell Get-Date

    The Get-Date cmdlet in PowerShell displays the current date and time on the PowerShell console. This cmdlet gets a DateTime object. We can also use the Get-Date to generate and send the date and time character string to the other cmdlets or programs. Syntax Parameters Following are the parameters used in Get-Date cmdlet: -Date This parameter allows you to specify a…

  • PowerShell Get-Content

    The PowerShell Get-Content cmdlet gets the content of an item at a specified location. The gc, cat, and type are the aliases of this cmdlet. Syntax Parameters -Filter The -Filter parameter is used to specify a filter to qualify the -Path parameter. The FileSystem provider is the only PowerShell provider that supports the uses of filters. This parameter is more efficient as the…

  • PowerShell Clear-Content

    The Clear-Content cmdlet deletes the content of an item, but it does not delete the item, such as deleting the text from the file. As a result, an item exists, but that item is empty. This cmdlet works on an item with content, instead of items with values. The clc is the alias for this cmdlet. Syntax Parameters -Path…

  • PowerShell Add-Content | PowerShell Append to file

    The Add-Content cmdlet appends the content to the specified item or a file, such as adding words to the file. We can specify the content by typing it in the cmdlet or by specifying an object which contains the content. Syntax Parameters -Path The -Path parameter is used to specify the path to the items which receives…

  • PowerShell Rename-Item | PowerShell Rename file

    The PowerShell Rename-Item cmdlet renames an item in a PowerShell provider namespace. It changes the name of a specified item. It does not affect the content of an item being renamed. The ri, rm, rmdir, del, erase, and rd are the aliases of the Rename-Item cmdlet. Syntax Parameters -Path The -Path parameter is used to specify the path of an item…

Got any book recommendations?