# 获取一个已存在的分区(这里选择第一个磁盘上的第一个分区,可以根据实际情况调整)$partition=Get-Partition-DiskNumber1-PartitionNumber1# 挂载分区到一个空闲驱动器号Add-PartitionAccessPath-Partition$partition-AssignDriveLetter# 卸载分区(移除驱动器号)Remove-PartitionAccessPath-Partition$partition-DriveLetterD ...
PowerShell 複製 Get-Command [-Verb <String[]>] [-Noun <String[]>] [-Module <String[]>] [-FullyQualifiedModule <ModuleSpecification[]>] [-TotalCount <Int32>] [-Syntax] [-ShowCommandInfo] [[-ArgumentList] <Object[]>] [-All] [-ListImported] [-ParameterName <String[]>] [-...
PowerShell 复制 PS C:\>Get-SpacesVolume -SpaceFriendlyName Data OperationalStatus : OK HealthStatus : Healthy DiskUniqueID : EBB5E72780C7E1119CC4F46D0439C015 DriveLetter : S VolumeSize : 1374254243840 SizeRemaining : 691400519680 VolumeObjectID : \\?\Volume{27e7b5f2-c780-11e1-9cc4-f46d...
While a machine can have different drive types, monitoring mostly makes sense only on local disks. When running the PowerShell check disk space query withGet-WMIObjectorGet-CIMInstance, you can filter the drive type to return. Below is the list of available drive types: 0 = Unknown 1 = No...
Example 1: Display your current drive location This command displays your location in the current PowerShell drive. PowerShell PS C:\Windows>Get-LocationPath --- C:\Windows For instance, if you are in theWindowsdirectory of theC:drive, it displays the path to that directory. Example...
PowerShell Get-WindowsDriver[-All] [-Driver <String>]-Path<String> [-WindowsDirectory <String>] [-SystemDrive <String>] [-LogPath <String>] [-ScratchDirectory <String>] [-LogLevel <LogLevel>] [<CommonParameters>] PowerShell Get-WindowsDriver[-All] [-Driver <String>] [-Online] [-Wind...
PowerShell Get-WindowsDriver[-All] [-Driver <String>]-Path<String> [-WindowsDirectory <String>] [-SystemDrive <String>] [-LogPath <String>] [-ScratchDirectory <String>] [-LogLevel <LogLevel>] [<CommonParameters>] PowerShell Get-WindowsDriver[-All] [-Driver <String>] [-Online] [-Wind...
4– Network Drive. 5– Compact Disc. 6– RAM Disk. 1] Get General Information OpenWindows PowerShelland execute the following command to get general information about the connected hard drives: get-wmiobject -class win32_logicaldisk The results will displayDeviceID, DriveType, ProviderName, FreeSpa...
PowerShell Get-WindowsDriver[-All] [-Driver <String>]-Path<String> [-WindowsDirectory <String>] [-SystemDrive <String>] [-LogPath <String>] [-ScratchDirectory <String>] [-LogLevel <LogLevel>] [<CommonParameters>] PowerShell Get-WindowsDriver[-All] [-Driver <String>] [-Online] [-Wind...
Testing framework for PowerShell code. https://pester.dev Uçurtma Project Uçurtma is a platform that aims to help students find the financial support they need to make their dreams come true. It provides a decentralized guarantee of getting support by bringing students and supporters togethe...