Name Synopsis ------------ Add-Computer Add the local computer to a domain or workgroup. Add-Content Adds content to the specified items, such as adding word... Checkpoint-Computer Creates a system restore point on the local computer. Clear-Content Deletes the contents of an item, but does not delete the... Clear-EventLog Clears all entries from specified event logs on the loca... Clear-Item Clears the contents of an item, but does not delete the ... Clear-ItemProperty Clears the value of a property but does not delete the p... Clear-RecycleBin Complete-Transac... Commits the active transaction. Convert-Path Converts a path from a Windows PowerShell path to a Wind... Copy-Item Copies an item from one location to another. Copy-ItemProperty Copies a property and value from a specified location to... Debug-Process Debugs one or more processes running on the local computer. Disable-Computer... Disables the System Restore feature on the specified fil... Enable-ComputerR... Enables the System Restore feature on the specified file... Get-ChildItem Gets the items and child items in one or more specified ... Get-Clipboard Gets the current Windows clipboard entry. Get-ComputerInfo Gets a consolidated object of system and operating syste... Get-ComputerRest... Gets the restore points on the local computer. Get-Content Gets the content of the item at the specified location. Get-ControlPanel... Gets control panel items. Get-EventLog Gets the events in an event log, or a list of the event ... Get-HotFix Gets the hotfixes that have been applied to the local an... Get-Item Gets the item at the specified location. Get-ItemProperty Gets the properties of a specified item. Get-ItemProperty... Gets the value for one or more properties of a specified... Get-Location Gets information about the current working location or a...
在 Windows 10 中,PowerShell 可以通过 WIN + X 键(或右键单击开始菜单图标)启动。如果您的 Windows 10 打开的是过时的 cmd.exe,那么该快速做出改变了。
单击开始菜单图标(或按 WIN 键)。在开始菜单中,单击“齿轮”图标打开 Windows 设置。您现在可以看到一个有许多图标的,名为“Windows 设置”的窗口,在顶部有一个叫做“查找设置”的文本框。在文本框中输入 “PowerShell” 即可打开“使用 Windows + X 菜单时,将命令提示符替换为 Windows PowerShell”。
# reuse the session for as many queries as you like $sh = Get-CimInstance-ClassName Win32_Share -CimSession$session-Filter'Name="Admin$"' $se = Get-CimInstance-ClassName Win32_Service -CimSession$session
# remove the session at the end Remove-CimSession-CimSession$session