-
Hi Felipe!! cmd4.ps1 runs calling powershell.exe in a batchfile (cmd4.cmd), I tried to use arguments but never works, many people over internet recommends use enviroment variables, I uses this to sent information from cmd4.cmd to cmd4.ps1, it works fine.
-
Hi All, I am trying to run cmdlets from VB.NET. I managed to create a session to a remote session and to run either basic powershell commands or Exchange 2010 cmdlets. However I have a problem when trying to run more complex scripts, like "Get-Mailbox | Where-Object {$_.database -match "database"...
-
Hi all, I was reading PowerTip about ConvertTo-HTML ( http://powershell.com/cs/blogs/tips/archive/2009/01/05/outputting-html-reports.aspx ) and help me a lot. I want to use the same example $head = '<style> BODY{font-family:Verdana; background-color:lightblue;} TABLE{border-width: 1px;border...
-
I am trying to filter out the events in $ignore1 from the eventlog. How do I remove $item from $systemlog if it matches the conditions of $event? $systemlog=Get-EventLog -log "system" -after 30/11/2010 -before 1/12/2010 | ?{($_.entrytype -eq "Error") -OR ($_.entrytype -eq "Warning"...
-
HI Sir, I had a small doubt on recovering the VLAN ID for a Virtual machine hosted in SCVMM using powershell. If i have One NIc card connected to the VM then im able to get the VLAN info for the VM using (Get-VirtualNetworkAdapter -VM $VM).vlanid But if two or more virtual NIC's are connected to...
-
We have code that invokes the "Sync" VERB for a folder that has been made available Offline via Offline Files. We basically achieve this by using Shell32 to programmatically invoke the Sync option available in the right click menu of a folder (context menu). The code is simple and works in...
-
Any idea how to invoke verbs that are in a sub menus like the Sync for Offline Files in Windows 7 ("Sync > Sync selected offline files")? This option is available once the folder/file has been made Available Offline. For more details about my question see this thread http://powershell.com...
-
Hello, Recently I started developing scripts for SCCM administration. Today I wrote a script that adds computer to collection and this was fairly easy. The problem is with deleting computer from collection. I've found this site: http://chad.cc/blog/2010/05/sccm-delete-all-direct-membership-computers...
-
Hi, Did you use exactly the same version of script that I posted? Because as I wrote earlier - CollectionRules property was also empty in my case, but the script worked either way. Maybe try also the script from http://chad.cc/blog. I remember that I had strange problems with -computername property when...
-
Hi Everyone, I'd like to know why the formatting for this powershell doesn't work ? [PS] C:\> Get-MailboxStatistics | sort-object -descending totalItemSize | ft -autosize DisplayName, @{expression={$_.totalitem size.value.ToMB()};label=”Mailbox Size(MB)”}, itemcount, lastlogontime...