-
Hello everyone, I am new to PS and managed to write the following script to get the logs for the last 1 hour. [datetime]$to = Get-Date $from = $to.addhours(-1) Get-EventLog -LogName Application -ComputerName mycomputer -After $from -Before $to | Select-Object timegenerated,Machinename, EntryType,source...
-
Hey Guys, I have a sample function below that outputs a few values to the pipeline. function Get-WMIInfo { param($serverName) gwmi -ComputerName $serverName -Class Win32_OperatingSystem | Select CSName, Version, ServicePackMajorVersion, SerialNumber, InstallDate } Could someone please help in implementing...
-
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...
-
Hi I want to monitor an intranet site and wrote a loginscript. However I need the script to do something and return a value to confirm that the site loaded. The script so far: $username ="xxxx"; $password="yyyy"; $url="http://intranet.company.com"; $ie= new-object -com internetexplorer...
-
Hello I have an Infopath Doc that is stored as XML on our SP farm, I am trying to access certain information in the infopath form to assign as a variable for use in creating folder structures and websites. That is not too hard when dealing with clearly named elements in the xml doc, however on large...
-
Hi Tobias, Thank you for the quick response, and I am sorry for not giving enough information. Here is the complete XML doc, you will notice there are 2 sections called Proxy Layer, each layer is associated with a different URL. I am new to PS and I have never dealt with XML but this is alot of fun Thank...
-
It's ok in Windows Server 2003 that running such below script, get-wmiobject -namespace "root\MicrosoftIISv2" -query "SELECT * FROM IIsIPSecuritySetting where Name = 'W3SVC/1/ROOT/test'" However, it will fail in windows 2008 that running such below script. get-wmiobject...
-
I want to display a list of all the objects in in powershell. I used the get-wmiobject -class win32_volume, and printer. Using these I got output but I want to see a list of all the classes and their subtrees if possible. I also used get-wmiobject -list but I don't know if this is what I'm looking...
Posted to
PowerShell for Windows
(Forum)
by
jwhite
on
04-15-2011
Filed under: powershell, XP GET-WMIOBJECT, windows, COM, windows system32 grouppolicy machine scripts startup windows 7 powershell
-
I have a portion of a script that creates an excel spreadsheet and populates the drives for remote servers, their size as well as used and percentage. (Found it here I believe) What I need to add to this spreadsheet are all of the directories that are listed under the drives by using the get-content...
Posted to
PowerShell for Windows
(Forum)
by
squeekie
on
04-20-2011
Filed under: powershell, wmi, get-wmiobject Win32_Product MSI Windows Installer, windows, powershell remoting, output, loop, file