PowerShell: Graphic User Interface


This is just for fun – I built a Toolbox for myself which includes some useful PowerShell scripts I wrote before. It looks simple but very handy, just a simple click on the script name and it will run. An example, I am checking the hosts info in the DHCP server. # my_toolbox.ps1 source codes … Continue reading PowerShell: Graphic User Interface

PowerShell: Text to Speech


PowerShell is able to utilize the ‘Text to Speech’ function in the Windows operating system. You can check the voice settings in ‘Control Panel\All Control Panel Items\Speech Recognition’ $results = Get-Content C:\results.txtAdd-Type -AssemblyName System.Speech$synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer # This line converts the text to speech$synthesizer.Speak($results) # This line lists the installed voice information$synthesizer.GetInstalledVoices() | … Continue reading PowerShell: Text to Speech

PowerShell: Using Credential File For Connect-VIServer


To run a scheduled PS script against the vCenter server, you either hard code the credential in your script or use the credential file. Needless to say that credential file is better in terms of security, as the password is encrypted in the file. Two steps to complete: 1) Create a credential file. Add-PSSnapIn VMware.VimAutomation.CoreNew-VICredentialStoreItem … Continue reading PowerShell: Using Credential File For Connect-VIServer