# Get the hostsystem object for every host currently disconnected.
$VMhosts = Get-View -ViewType ‘Hostsystem’ ` -Property ‘name’ ` -Filter @{“Runtime.ConnectionState”=”disconnected”}
Foreach ($VMhost in $VMhosts) {
# Create a reconnect spec
$HostConnectSpec = New-Object VMware.Vim.HostConnectSpec
$HostConnectSpec.hostName = $VMhost.name
$HostConnectSpec.userName = ‘root’
$HostConnectSpec.password = ‘password’
# Reconnect the host
$taskMoRef = $VMhost.ReconnectHost_Task($HostConnectSpec,$null)
# optional, but i like to return a task object, that way I can
# easily integrate this into a pipeline later if need be.
Get-VIObjectByVIView -MORef $taskMoRef
}
As title, It is a memo of my daily work, it won't be very detail but enough to retrieve what I have to.
Friday, November 15, 2019
Tuesday, October 15, 2019
Prevent Chrome killing your SSD by cache
xcopy /e "C:\Users\%username%\AppData\Local\Google\Chrome" "D:\Chrome"
del /s/f/q "C:\Users\%username%\AppData\Local\Google\Chrome"
rmdir /s/q "C:\Users\%username%\AppData\Local\Google\Chrome"
mklink /j "C:\Users\%username%\AppData\Local\Google\Chrome" "D:\Chrome"
del /s/f/q "C:\Users\%username%\AppData\Local\Google\Chrome"
rmdir /s/q "C:\Users\%username%\AppData\Local\Google\Chrome"
mklink /j "C:\Users\%username%\AppData\Local\Google\Chrome" "D:\Chrome"
Friday, October 11, 2019
Cisco C220M4 3.04n BIOS CIMC bin package
https://drive.google.com/open?id=13FNHe5_heFLwXTeliQFmDtxaFuAHHjit
Saturday, October 5, 2019
How to ensure TRIM is enabled on Windows 10
fsutil behavior query DisableDeleteNotify
https://www.windowscentral.com/how-ensure-trim-enabled-windows-10-speed-ssd-performance
https://www.windowscentral.com/how-ensure-trim-enabled-windows-10-speed-ssd-performance
Tuesday, September 10, 2019
Windows 10 Start Menu Search Fix
Open Regedit.exe Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search
Check the following DWord Values:
"CortanaConsent" (It should have a value of '1')
"SearchboxTaskbarMode" (It should have a value of '1')
"CortanaRegion" (It should have a value of 'US')
Check the following DWord Values:
"CortanaConsent" (It should have a value of '1')
"SearchboxTaskbarMode" (It should have a value of '1')
"CortanaRegion" (It should have a value of 'US')
Thursday, July 11, 2019
Showing flogi path status using UCS PowerTool
List FC VIF Path Status
Get-UcsDcxVc | where { $_.transport -eq "fc" } | select dn,switchid,operstate,adminstate,vnic,linkstate
List Ether VIF Path Status
Get-UcsDcxVc | where { $_.transport -eq "ether" } | select dn,switchid,operstate,adminstate,vnic,linkstate
Get-UcsDcxVc | where { $_.transport -eq "fc" } | select dn,switchid,operstate,adminstate,vnic,linkstate
List Ether VIF Path Status
Get-UcsDcxVc | where { $_.transport -eq "ether" } | select dn,switchid,operstate,adminstate,vnic,linkstate
Tuesday, July 2, 2019
Intel outdated driver conflict with Windows 10 1903
If you have Intel drivers with release date older than 2017, properly you will be blocked to update Windows 10 build 1903.
My experience is I have a Intel Network Adapter I219-V2 which was using a driver released in 2017 in version 20, somehow Intel discontinued the update of that driver and release a new series of network adapter software, the newest release date is 2019/06/06 in version 12.19.9.8. In a result that it cannot be upgraded by Windows Update nor directly upgraded by Intel Installation Package. I have to manual uninstall everything even the driver itself and install the Intel Installation Package manually in order to update to the newest driver.
Now, Windows 10 allows me to update to 1903.
My experience is I have a Intel Network Adapter I219-V2 which was using a driver released in 2017 in version 20, somehow Intel discontinued the update of that driver and release a new series of network adapter software, the newest release date is 2019/06/06 in version 12.19.9.8. In a result that it cannot be upgraded by Windows Update nor directly upgraded by Intel Installation Package. I have to manual uninstall everything even the driver itself and install the Intel Installation Package manually in order to update to the newest driver.
Now, Windows 10 allows me to update to 1903.
Thursday, June 27, 2019
Cleanup Windows 10 WINSXS
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
sc stop msiserver
sc stop TrustedInstaller
sc config msiserver start= disabled
sc config TrustedInstaller start= disabled
icacls "%WINDIR%\WinSxS" /save "%WINDIR%\WinSxS_NTFS.acl" /t
takeown /f "%WINDIR%\WinSxS" /r
icacls "%WINDIR%\WinSxS" /grant "%USERDOMAIN%\%USERNAME%":(F) /t
compact /s:"%WINDIR%\WinSxS" /c /a /i *
icacls "%WINDIR%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t
icacls "%WINDIR%" /restore "%WINDIR%\WinSxS_NTFS.acl"
sc config msiserver start= demand
sc config TrustedInstaller start= demand
http://woshub.com/how-to-clean-up-and-compress-winsxs-folder-in-windows-8/
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
sc stop msiserver
sc stop TrustedInstaller
sc config msiserver start= disabled
sc config TrustedInstaller start= disabled
icacls "%WINDIR%\WinSxS" /save "%WINDIR%\WinSxS_NTFS.acl" /t
takeown /f "%WINDIR%\WinSxS" /r
icacls "%WINDIR%\WinSxS" /grant "%USERDOMAIN%\%USERNAME%":(F) /t
compact /s:"%WINDIR%\WinSxS" /c /a /i *
icacls "%WINDIR%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t
icacls "%WINDIR%" /restore "%WINDIR%\WinSxS_NTFS.acl"
sc config msiserver start= demand
sc config TrustedInstaller start= demand
http://woshub.com/how-to-clean-up-and-compress-winsxs-folder-in-windows-8/
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /RestoreHealth
Tuesday, June 25, 2019
Monday, June 10, 2019
Wednesday, March 27, 2019
Thursday, February 21, 2019
Steelhead Edge Device cannot gather ESXi info after upgrade to 6.0 from 5.5
https://kb.vmware.com/s/article/2147981
Subscribe to:
Posts (Atom)