Archive for June, 2009

How to remove MySQL database with Powershell?

Tuesday, June 23rd, 2009 Posted in Hosting & IIS7, Windows Powershell, Windows Server | 1 Comment »

You can remove MySQL database from Powershell with MySQL connector: # Powershell Args $dbusername = $args[0] # user01073 $dbpassword = $args[1] # RadoreTelekom $dbname = $args[2] # db01073 # Add MySQL Data Connector [void][system.reflection.Assembly]::LoadWithPartialName("MySql.Data") # ... Read more..

How to flush MySQL privileges with Powershell?

Tuesday, June 23rd, 2009 Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comments »

You can flush MySQL privileges from Powershell with MySQL connector: # Powershell Args $dbusername = $args[0] # user01073 $dbpassword = $args[1] # RadoreTelekom $dbname = $args[2] # db01073 # Add MySQL Data Connector [void][system.reflection.Assembly]::LoadWithPartialName("MySql.Data") # ... Read more..

How to grant MySQL User on database with Powershell?

Tuesday, June 23rd, 2009 Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comments »

You can grant MySQL User on database from Powershell with MySQL connector: # Powershell Args $dbusername = $args[0] # user01073 $dbpassword = $args[1] # RadoreTelekom $dbname = $args[2] # db01073 # Add MySQL ... Read more..

How to change or set MySQL User password with Powershell?

Tuesday, June 23rd, 2009 Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comments »

You can change or set MySQL user password from Powershell with MySQL connector: # Powershell Args $dbusername = $args[0] # user01073 $dbpassword = $args[1] # RadoreTelekom $dbname = $args[2] # db01073 # Add ... Read more..

How to create MySQL User with Powershell?

Tuesday, June 23rd, 2009 Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comments »

You can create MySQL user from Powershell with MySQL connector: # Powershell Args $dbusername = $args[0] # user01073 $dbpassword = $args[1] # RadoreTelekom $dbname = $args[2] # db01073 # Add MySQL Data Connector [void][system.reflection.Assembly]::LoadWithPartialName("MySql.Data") # ... Read more..

How to create MySQL database with Powershell?

Tuesday, June 23rd, 2009 Posted in Hosting & IIS7, Windows Powershell, Windows Server | No Comments »

You can create MySQL database from Powershell with MySQL connector: # Powershell Args $dbusername = $args[0] # user01073 $dbpassword = $args[1] # RadoreTelekom $dbname = $args[2] # db01073 # Add MySQL Data Connector [void][system.reflection.Assembly]::LoadWithPartialName("MySql.Data") # ... Read more..

Get all Virtual Machines in SCVMM and export it to Argus

Saturday, June 20th, 2009 Posted in Virtual Machine Manager, Windows Powershell | No Comments »

I will list all virtual machines and their ip address, then I will export this informations to Argus, so I can see all virtual machines status with Argus or similar ... Read more..

List all Virtual Machines and export it to text file with Powershell

Saturday, June 20th, 2009 Posted in Virtual Machine Manager, Windows Powershell | No Comments »

Lets list all Virtual Machines in our environment with Powershell. Add-PSSnapin -name Microsoft.SystemCenter.VirtualMachineManager Get-Vmmserver localhost $VMProp = Get-VM | Select-Object -Property Name,OperatingSystem clear-content -path "C:\VMList.txt" $vxcount=0; $vmcount=0; foreach ($i in $VMProp) { $VMName = $i.Name $VMOprs = $i.OperatingSystem.Name IF ($VMName -like ... Read more..

Change Vlan ID of Virtual Machines with Powershell

Saturday, June 20th, 2009 Posted in Virtual Machine Manager, Windows Powershell | No Comments »

You can change vlan id of virtual machines with Powershell: Add-PSSnapin -name Microsoft.SystemCenter.VirtualMachineManager Get-Vmmserver localhost $VMNO = $args[0] $VLANID = $args [1] get-vm $VMNO | Get-VirtualNetworkAdapter | Set-VirtualNetworkAdapter -VLANEnabled $true -VLANID $VLANID If you need to ... Read more..

Change Owner of the SCVMM Virtual Machine with Powershell

Saturday, June 20th, 2009 Posted in Virtual Machine Manager, Windows Powershell | No Comments »

You can change owners of the virtual machines with Powershell: Add-PSSnapin -name Microsoft.SystemCenter.VirtualMachineManager Get-Vmmserver localhost $VMNO = $args[0] $USERNO = $args[1] Set-VM $VMNO -Owner SCVMM\USER$USERNO This method could be used for suspending Virtual Machines. Read more..