Эх сурвалжийг харах

add get-internalip and windowsupdate

Tobias Simetsreiter 2 жил өмнө
parent
commit
a26a950664

+ 10 - 0
bin/Get-InternalIP.ps1

@@ -0,0 +1,10 @@
+
+Get-NetIPAddress | Where-Object { 
+    $_.IPAddress -like "10.*"
+} | ForEach-Object { 
+    @{ 
+        IP=$_.IPAddress;
+        Index=$_.InterfaceIndex
+        Adapter=(Get-NetIPInterface -InterfaceIndex $_.InterfaceIndex).InterfaceAlias
+    }
+}

+ 15 - 0
bin/WindowsUpdate.ps1

@@ -0,0 +1,15 @@
+
+
+foreach ($module in @("PSWindowsUpdate")){
+    if (-not (Get-Module -ListAvailable -Name $module)) {
+        Install-Module $module -Scope CurrentUser
+    }
+    if (-not (Get-Module $module)) {
+        Import-Module  $module
+    }
+}
+
+Get-WindowsUpdate
+# Get-WindowsUpdate -KBArticleID "KB4592449" -Install
+
+# Install-WindowsUpdate