Difference between revisions of "Powershell"

From Max's Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
 
==View Installed Updates Remotely==
 
==View Installed Updates Remotely==
 
+
Get-Hotfix -computername SEA-SRV-01 | Select HotfixID, Description, InstalledOn | Sort-Object InstalledOn
Get-Hotfix -computername SEA-SRV-01 | Select HotfixID, Description, InstalledOn | Sort-Object InstalledOn
 
  
 
Uninstall Updates:
 
Uninstall Updates:
 
* psexec @target+workstations.txt -d -s  
 
* psexec @target+workstations.txt -d -s  
 
* wusa.exe /uninstall /kb:000000 /quiet /norestart
 
* wusa.exe /uninstall /kb:000000 /quiet /norestart
 +
 +
==View Mapped Drives Remotely==
 +
Get-WmiObject Win32_MappedLogicalDisk -computer <computername> | select name, providername

Revision as of 17:44, 8 June 2017

View Installed Updates Remotely

Get-Hotfix -computername SEA-SRV-01 | Select HotfixID, Description, InstalledOn | Sort-Object InstalledOn

Uninstall Updates:

  • psexec @target+workstations.txt -d -s
  • wusa.exe /uninstall /kb:000000 /quiet /norestart

View Mapped Drives Remotely

Get-WmiObject Win32_MappedLogicalDisk -computer <computername> | select name, providername