Thursday, July 18, 2019

How to Create a Powershell Gui |Step-By Step

Running a Powershell script behind a  user friendly Gui is a great experience .

Here we learn the step by step process to create a Powershell Gui form.To create Gui in Powershell the first thing we need to learn how to create a form.




###########################  Load form System Assembly #############################
[reflection.assembly]::LoadWithPartialName( "System.Windows.Forms") | Out-Null 

############################ Create the form ######################################

$form = New-Object Windows.Forms.Form 

#################### Provide the Form Size --Width and Height##########################

$Form.ClientSize                 = '400,400'
#################################Name of the form ################################

$Form.text                       = "My Form"

###############################Add Show dialog ##################################

$form.ShowDialog() 

###############################################################################

Open powershell.Exe and run the above code to open the powershell gui form





Here we go ...!





Now we learned how to create form ..Next we are going to learn how to add controls over the form

Continue........!


Keep Watching ..




Friday, March 8, 2019

PowerCli -Command to Get Snapshot details from vCenter


PowerCli -Command to Get Vmware Snapshot details from vCenter



Get-vm | Get-snapshot |Select-Object Vm,Name,Created,SizeGB








Regards
Bijesh 

Tuesday, April 24, 2018

Powershell-Command to Copy data from one location to another

Command to Copy data from one location to another

Copy-Item \\server11\c$\temp\test.exe -Destination \\server12\c$\ -ErrorAction silentlycontinue




Regards
Bijesh