# 进程相关 12:13 [PS] C:\Windows\system32 :> help *process*
Name Category Module Synopsis -------------------------- Enter-PSHostProcess Cmdlet Microsoft.PowerShell.Core Connects to and enters into an interactive session with a local process. Exit-PSHostProcess Cmdlet Microsoft.PowerShell.Core Closes an interactive session with a local process. Get-PSHostProcessInfo Cmdlet Microsoft.PowerShell.Core Gets process information about the PowerShell host. Debug-Process Cmdlet Microsoft.PowerShell.M... Debugs one or more processes running on the local computer. Get-Process Cmdlet Microsoft.PowerShell.M... Gets the processes that are running on the local computer or a remote computer. Start-Process Cmdlet Microsoft.PowerShell.M... Starts one or more processes on the local computer. Stop-Process Cmdlet Microsoft.PowerShell.M... Stops one or more running processes. Wait-Process Cmdlet Microsoft.PowerShell.M... Waits for the processes to be stopped before accepting more input. Get-AppvVirtualProcessFunctionAppvClient ... Start-AppvVirtualProcessFunctionAppvClient ... ConvertTo-ProcessMitigationPolicy Cmdlet ProcessMitigations ConvertTo-ProcessMitigationPolicy... Get-ProcessMitigation Cmdlet ProcessMitigations Get-ProcessMitigation... Set-ProcessMitigation Cmdlet ProcessMitigations Set-ProcessMitigation...
说明 The `Get-Process` cmdlet gets the processes on a local or remote computer.
Without parameters, this cmdlet gets all of the processes on the local computer. You can also specify a particular process by process name or process ID (PID) or pass a process object through the pipeline to this cmdlet.
By default, this cmdlet returns a process object that has detailed information about the process and supports methods that let you start and stop the process. You can also use the parameters of the `Get-Process` cmdlet to get file v ersion information for the program that runs in the process and to get the modules that the process loaded.
CommandType Name Version Source ---------------------------- Alias ls -> Get-ChildItem Alias cat -> Get-Content
12:55 [PS] C:\Windows\system32 :> Get-Commandls
CommandType Name Version Source ---------------------------- Alias ls -> Get-ChildItem
windows 中,兼容 linux 的命令,可以从这里看出是别名,如何知道 windows 有哪些别名?
1 2 3 4 5 6 7 8 9 10 11 12 13
# 别名相关的主题? 12:56 [PS] C:\Windows\system32 :> help *alias*
Name Category Module Synopsis -------------------------- Export-Alias Cmdlet Microsoft.PowerShell.U... Exports information about currently defined aliases to a file. Get-Alias Cmdlet Microsoft.PowerShell.U... Gets the aliases for the current session. Import-Alias Cmdlet Microsoft.PowerShell.U... Imports an alias list from a file. New-Alias Cmdlet Microsoft.PowerShell.U... Creates a new alias. Set-Alias Cmdlet Microsoft.PowerShell.U... Creates or changes an alias for a cmdlet or other command in the current PowerShell session. Get-ModuleAliasesFunctionAdminToolbox ... about_Aliases HelpFile about_Alias_Provider HelpFile
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# 可以看到 get-alias 12:57 [PS] C:\Windows\system32 :> help get-alias
CommandType Name Version Source ---------------------------- Alias % -> ForEach-Object Alias ? -> Where-Object Alias ac -> Add-Content Alias asnp -> Add-PSSnapin Alias cat -> Get-Content Alias cd -> Set-Location Alias CFS -> ConvertFrom-String3.1.0.0 Microsoft.PowerShell.Utility Alias chdir -> Set-Location Alias clc -> Clear-Content
13:05 [PS] C:\Windows\system32 :> help *module* Name Category Module Synopsis -------------------------- ImportSystemModules Function ... Find-ModuleFunctionPowerShellGet ... Get-InstalledModuleFunctionPowerShellGet ... Install-ModuleFunctionPowerShellGet ... Publish-ModuleFunctionPowerShellGet ... Save-ModuleFunctionPowerShellGet ... Uninstall-ModuleFunctionPowerShellGet ... Update-ModuleFunctionPowerShellGet ... Update-ModuleManifestFunctionPowerShellGet ... Export-ModuleMember Cmdlet Microsoft.PowerShell.Core Specifies the module members that are exported. Get-Module Cmdlet Microsoft.PowerShell.Core List the modules imported in the current session or that can be imported from the PSModulePath. Import-Module Cmdlet Microsoft.PowerShell.Core Adds modules to the current session. New-Module Cmdlet Microsoft.PowerShell.Core Creates a new dynamic module that exists only in memory. New-ModuleManifest Cmdlet Microsoft.PowerShell.Core Creates a new module manifest. Remove-Module Cmdlet Microsoft.PowerShell.Core Removes modules from the current session. Test-ModuleManifest Cmdlet Microsoft.PowerShell.Core Verifies that a module manifest file accurately describes the contents of a module. Get-ModuleAliasesFunctionAdminToolbox ... Get-CPowerShellModuleInstallPathFunctionCarbon ... Test-ModuleLoadedFunctioncore ... InModuleScope FunctionPester ... about_Modules HelpFile about_Module_Manifests HelpFile about_PSModulePath HelpFile
Version Name Repository Description -------------------------------- 11.0.3 AdminToolbox PSGallery Master module for a collection of modules. These modules are varied in their tasks. The overall purpose of them being to provide a powerfull Toolset to improve IT Ad... 1.8.0 AdminToolbox.ActiveDirectory PSGallery Functions for Active Directory 4.8.0 AdminToolbox.EndpointManagement PSGallery Functions for management of endpoints 1.9.0 AdminToolbox.Exchange PSGallery Functions for Exchange Management 4.12.0 AdminToolbox.FFTools PSGallery Expedite simple ffmpeg actions 1.13.0 AdminToolbox.FileManagement PSGallery File Management Functions 2.15.0 AdminToolbox.FortiWizard PSGallery Functions that generate configuration scripts and manage FortiOS. 1.6.0 AdminToolbox.Fun PSGallery Functions that have no purpose 1.2.0 AdminToolbox.MSGraph PSGallery Microsoft Graph interactive API Functions 2.13.0 AdminToolbox.Networking PSGallery Network Troubleshooting Functions 2.10.0 AdminToolbox.Office365 PSGallery Functions for working with Office365 and Azure modules 1.9.0 AdminToolbox.Remoting PSGallery Functions for remote management and access. 4.8.0 AdminToolbox.VMWareAutomate PSGallery Functions to Automate Bulk VMWare Tasks 2.11.3 Carbon PSGallery Carbon is a PowerShell module for automating the configuration Windows 7, 8, 2008, and 2012 and automation the installation and configuration of Windows applications... 1.9 core PSGallery Module with various generic functions that could be used in any script 1.0.2Get-IPInfo PSGallery Quickly look up IP Information including location, ISP and Organization 7.8.0 ImportExcel PSGallery PowerShell module to import/export Excel spreadsheets, without Excel.... 1.1.1 IPTools PSGallery This module offers a set of tools to manage IP networks and devices. 1.0.0 Kubernetes PSGallery Kubernetes 3.0.6 Posh-SSH PSGallery Provide SSH and SCP functionality for executing commands against remote hosts. 0.3.0.0 PoshPrivilege PSGallery Module designed to use allow easier access to work with User Rights (privileges) 1.3.1 ProgramManagement PSGallery This Module makes it easier to Install/Uninstall programs on Windows, regardless of the method of installation (PSGet, Chocolatey CmdLine, .msi, etc). GitHub: https:... 1.0.22 PSEventViewer PSGallery Simple module allowing parsing of event logs. Has its own quirks... 0.9.3 ud-netmon PSGallery Web-based GUI (PowerShell Universal Dashboard) that pings specified Remote Hosts on your Domain every 5 seconds. GitHub: https://github.com/pldmgg/UD-NetMon 2.1.1 WindowsKeyboardManagement PSGallery Allows keys on the physical keyboard to be remapped, and redefine programs associated with multimedia keys. For example, you can remap the "Scroll Lock" key to the
Name MemberType Definition ------------------------ Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToString Method string ToString() CPU NoteProperty System.Double CPU=0.5625 Id NoteProperty int Id=17848 Name NoteProperty string Name=Notepad VirtualMemorySize NoteProperty int VirtualMemorySize=560594944
RemoteSigned 表示 PowerShell可以运行本地任何脚本,同时也可以执行受信任的 CA 签发的数字证书签名之后的远程脚本。“远程脚本”是指存在于远端计算机上的脚本,经常通过通用命名规则(UNC)方式访问这些脚本。我们也会将那些来自于网络上的脚本称为“远程脚本”。Internet Explorer、Firefox 和 Outlook 中提供的可下载的脚本,我们均可视为来自网络的脚本。在某些版本的 Windows 中,会区分网络路径以及 UNC 路径。在这些场景中,本地网络中的 UNC 都不会认为是“远程”。
[cmdletbinding()] param ( [int]$drivetype = 3, [int]$gtfree=50, [Parameter(Mandatory=$true,HelpMessage="enter a or a set computer to query")] [string]$computername )