Category: 1. PowerShell Cmdlet Basic
-
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…
-
PowerShell Remove-Item | PowerShell Remove file
The PowerShell Remove-Item cmdlet deletes one or more specified items. Because many providers support this cmdlet so that it can delete many different types of items, including files, folders, variables, registry keys, aliases, and functions. Syntax Parameters -Path The -Path parameter is used to specify a path of the items being removed. Wildcard characters are…
-
PowerShell Move-Item | PowerShell Move file
The PowerShell Move-Item cmdlet moves an item from one location to another location. It moves an item, including its contents, properties, and child items, from one location to another. The Same provider must support the locations. For instance, it can move a single file or subdirectory from one directory to another or move a registry…
-
PowerShell Copy-Item | PowerShell Copy file
The Copy-Item cmdlet copies an item form one location to another location within a namespace. For instance, this cmdlet can copy a file to a folder, but it cannot copy a file to a certificate drive. It does not delete or cut the items being copied. Those specific items that the cmdlet copy depend on…
-
PowerShell New-Item | Create folder
The New-Item Cmdlet in PowerShell creates the files and folders in the file system and also creates registry keys and entries in the registry. With the creation of a file, it also adds the initial content to the file. Syntax Parameters Followings are the parameters used in this cmdlet: -Path The -Path parameter is used to specify the path…
-
PowerShell New-Item | Create folder
The New-Item Cmdlet in PowerShell creates the files and folders in the file system and also creates registry keys and entries in the registry. With the creation of a file, it also adds the initial content to the file. Syntax Parameters Followings are the parameters used in this cmdlet: -Path The -Path parameter is used to specify the path…
-
PowerShell Set-location | PowerShell Change directory
The Set-Location cmdlet sets the current PowerShell working location to a specified location. The location could be a directory, a registry location, a subdirectory, or any provider path. The sl, cd, chdir are the aliases for the Set-Location cmdlet. Syntax Parameters -Path The -Path parameter is used to specify a path of the new working location. If no path is…
-
PowerShell Set-Item
The PowerShell Set-Item cmdlet changes the value of an item to the value specified in the command. It changes the value of a variable or registry key. The Windows PowerShell FileSystem provider does not support this cmdlet. In the registry drives, such as HKLM: and HKCU: it changes the data in the default value of the registry key. Syntax Parameters -Path The -Path…
-
PowerShell Get-Location
The Get-Location cmdlet gets the information about the current working directory or a location stack. This cmdlet gets an object which represents the current directory, much like the print present working directory (pwd) command. When we switch between the drives, PowerShell retains our location in each drive. We can also use this cmdlet to find the location…
-
PowerShell Get-Item
The Get-Item cmdlet gets the items at a particular location. This cmdlet does not get the content of item at the specified location unless we use a ‘*‘ wildcard character to request all the content of the item. PowerShell providers use this command to navigate through a different type of data stores. Syntax Parameters -Path The -Path parameter specifies…