Spaces Cause Split in Path With PowerShell
In some cases, you want to invoke an executable file with the path containing spaces in PowerShell.
172 articles
In some cases, you want to invoke an executable file with the path containing spaces in PowerShell.
We have a simple Powershell script to get items in a folder. We use the Read-Host cmdlet that catch the folder path input from the user and store path as as strings in a variable. This makes life easier as we can drag and drop rather than full typing the path.
We have a simple Powershell script to get items in a folder. We use the Read-Host cmdlet that catch the folder path input from the user and store path as as strings in a variable. This makes life easier as we can drag and drop rather than full typing the path.
The SSH binary (OpenSSH) doesn’t have a native way to pass a password through the command line. So, you need to type the password every time you are connecting using ssh.
Running an executable from a directory whose path has spaces in it is not straightforward in PowerShell.
In some cases, you want to run a PowerShell script from the command line from anywhere without navigate to the path of the script. By default, when start a new PowerShell session, it starts in the current user folder.
In this post, when checking the size of a folder using PowerShell. The output shows the size like the below example. In some cases, you want to make it shorter for readability.
To get the list of licensed users with the last sign-in time in Microsoft 365, you can use the Microsoft Graph PowerShell. We have created a PowerShell script to ease your work automatically.
By default, the Get-Date cmdlet in PowerShell returns the current date and time. Sometimes, you may need a [System.DateTime] object that contains the date without the time portion.
In some cases, you want to delete files older than specified number of days. For example, you want to clean up the backup directory to keep only recent backup files.