Windows PowerShell 6: Essentials for Administration (IT Pro Solutions) by William Stanek & William Stanek Jr

Windows PowerShell 6: Essentials for Administration (IT Pro Solutions) by William Stanek & William Stanek Jr

Author:William Stanek & William Stanek Jr. [Stanek, William]
Language: eng
Format: azw3
Published: 2017-04-06T04:00:00+00:00


In PowerShell, you work with directories and files in much the same way. You view directories and files using Get-ChildItem as shown in many previous examples. To create directories and files, you use New-Item. The basic syntax is

new-item –type [Directory | File] –path Path

where you specify the type of item you are creating as either Directory or File and then use Path to specify where the directory or file should be created. When you create a directory or file, New-Item displays results that confirm the creation process. In the following example, you create a C:\Logs\Backup directory, and the resulting output confirms that the directory was successfully created:

new-item -type directory -path c:\logs\backup



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.