![]() ![]() To see all the properties of a directory, type Is just one property of file system directories. This example gets the LastAccessTime property of the C:\Windows directory. Example 5: Get a property in the specified directory Theįormat is interpreted literally, so *.* wouldn't retrieve directories or filenames without a dot. In PowerShell, use a single asterisk ( *) to get contents, instead of the traditional *.*. In the container, not just the container. The wildcard character ( *) represents all the items This example gets the items in the C: drive. ![]() Get-Item C: Example 4: Get items in the specified drive This example gets the current directory of the C: drive. a- 10:47 AM 30 test.txt Example 3: Get the current directory of a drive The wildcard character ( *) representsĪll the contents of the current item. This example gets all the items in the current directory. The dot ('.') represents the item at the current locationĭ- 10:01 AM ps-test Example 2: Get all the items in the current directory Examples Example 1: Get the current directory For more information, seeĪbout_Providers. Some parameters are only available for a specific provider. This cmdlet is used by PowerShell providers to navigate through different types of data stores. Item at the location unless you use a wildcard character ( *) to request all the contents of the The Get-Item cmdlet gets the item at the specified location.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |