windows
-
PowerShell 安装和删除应用程序
可以使用 Win32_Product 类远程或本地安装 Windows Installer 程序包。 注意:若要安装应用程序,必须使用“以管理员身份运行”选项启动 PowerShe…
-
PowerShell 列出所有可卸载的应用程序
由于大多数标准应用程序都向 Windows 注册了卸载程序,我们通过在 Windows 注册表中查找它们便可以在本地对其进行处理。 无法保证找到系统上的每个应用程序。 但可以在下列…
-
PowerShell 列出 Windows Installer 应用程序
可以通过 WMI 的 Win32_Product 类访问旨在使用 Windows Installer 的应用程序,但当今使用的所有应用程序并非都使用 Windows Install…
-
PowerShell 连接 Windows 可访问网络驱动器
New-PSDrive cmdlet 可创建 PowerShell 驱动器,但使用这种方法创建的驱动器仅适用于 PowerShell。 若要创建新的联网驱动器,可以使用 WScri…
-
PowerShell 删除网络共享
可以使用 Win32_Share 删除网络共享,但是该过程与创建共享略有不同,因为需要检索要删除的特定共享,而不是 Win32_Share 类。 下面的语句删除共享 TempSha…
-
PowerShell 创建网络共享
若要创建网络共享,请使用 Win32_Share 的 Create 方法: (Get-CimInstance -List | Where-Object {$_.Name -eq &…
-
使用打印机
可以通过 PowerShell 使用 WMI 和 WSH 中的 WScript.Network COM 对象来管理打印机。 我们将结合这两种工具来演示特定任务。 列出打印机连接 列…
-
PowerShell 删除驱动器 (Remove-PSDrive)
你可以通过使用 Remove-PSDrive cmdlet 从 Windows PowerShell 中删除驱动器。 Remove-PSDrive cmdlet 易于使用;若要删除…
-
PowerShell 添加新驱动器 (New-PSDrive)
可以通过使用 New-PSDrive 命令添加自己的 Windows PowerShell 驱动器。 若要获取 New-PSDrive 命令的语法,请使用 Syntax 参数输入 …
-
管理 Windows PowerShell 驱动器
Windows PowerShell 驱动器是一个数据存储位置,你可以像访问 Windows PowerShell 中的文件系统驱动器那样访问它。 Windows PowerShe…