Script to query OU for last Windows update date and time
Hi All, I need help in writing a script which can query an OU in active directory and then return most recent date of windows updates installation. It will also be helpful if the script can sort the names and then send output to a file (any format will
do). I know basic of querying a local computer but not remote query, I am terrible at scripting side of powershell. Thanks people.
I am referring to the script below, how can I get the result to output in an XLS or CSV format, I tried couple of combinations but couldn't get it to work.# This script shows the last time that a successfull Windows Update was installed.clsadd-PSSnapin quest.activeroles.admanagement
$OnlineServers = @()
Get-QADComputer -SearchRoot 'domain.com/ServerOU'-OSName "Windows*Server*"| %{
$PingResult = Get-WmiObject-Query "SELECT * FROM win32_PingStatus WHERE address='$($_.Name)'"If ($PingResult.StatusCode -eq 0)
# Add the current name to the array$OnlineServers+= "$($_.Name)"
foreach ($Serverin$OnlineServers )
$key = “SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install”
$keytype = [Microsoft.Win32.RegistryHive]::LocalMachine
$RemoteBase = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($keytype,$Server)
$regKey = $RemoteBase.OpenSubKey($key)
$KeyValue = $regkey.GetValue(”LastSuccessTime”)
$System = (Get-Date-Format "yyyy-MM-dd hh:mm:ss")
if ($KeyValue-lt $System)
Write-Host " "
Write-Host $Server"Last time updates were installed was: "$KeyValue
}
Similar Messages
-
Continuous updating date and time
trying to login to appletv but screen stay on Updating Date and Time. I have confirmed WiFi is connected and have reset per instruction.
Hello
I wrote upon Automator for those using 10.5 which gives the ability to record the user's actions in a process file which may be replaid later.
With 10.4.x this feature doesn't exists.
This is a very good reason to switch to 10.5
You are lucky, insomniae strikes again so here is the announced brute force script.
Copy the script in the clipboard
Paste in a blank window of Script Editor
Save it as an application
Move the newly created application into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Now, enter your Pages document.
Click in the header.
Go to
menu Scripts > saveWithCurrentDateInHeader
The contents of the header will be replaced by the current date/time
and the document will be saved exactly as if you pressed cmd + s
Yvan KOENIG
26 janvier 2008
--(SCRIPT saveWithCurrentDateInHeader.app]
property theApp : "Pages"
tell application theApp
activate
tell application "System Events" to tell application process theApp
keystroke "a" using {command down} (* print *)
set cd to current date
set the clipboard to (cd as text)
keystroke "v" using {command down}
keystroke "s" using {command down}
end tell -- System Events …
end tell --theApp
-- [/SCRIPT]
As you may read, there are more lines to explain the use of the beast than for the code itself
As I am unable to activate the dialog allowing us to adjust the date whe it is inserted the official way, I simply paste the current date-time into the header.
Just click tnto the header of the current page. It will be automatically reported into other pages's header.
Yvan KOENIG (from FRANCE samedi 26 janvier 2008 4:48:47) -
User Last Successful logon date and time
Hello All,
We have a requirement to display Last successful logon date and time every time user logs on to the Portal. Datasource for the portal is SAP. I see few forums suggesting to use WCR_USERSTAT table, but i don't see this table being updated every time i logon to portal. Is there any work around for this?
Thanks,
IndrajitHi IndraJit,
Have a look at below link, if it can help.
Regd Last Logon of User Logged onto portal
I guess, the only way to get the info is through WCR_USERSTAT table. Also, check if the aggregator application is running on portal which tries to collect the aggregated data.
http://help.sap.com/saphelp_nw04/helpdata/en/58/728ea01cf64fff996b827f2a06f9b1/content.htm
Thanks and regards,
Madhu Sudhan. -
Apple TV says it is updating date and time after a power outage. But the wheel just spins and nothing happens.. The software is updated and my wifi router is on and working fine and recognized by the Apple TV. How do I get Apple TV to work again?
Thanks for the tip. Unfortunately "Restart" did not change the situation. I then used the "Restore" option. After about 45 minutes of the unit going through the process, Apple TV was up and running again.
-
I am in the process of updating my apple tv and it seems to be stuck on updating date and time.
Is your Apple TV connected to a Wi-Fi network and does it have a valid IP address?
You can find some general info about connecting it to the Internet here -> Apple TV (2nd and 3rd generation): Troubleshooting Wi-Fi networks and connections -
Query to search between two specific dates and time period
Hi,
Need a query to search between two particular dates and time period
Like i want to search table having one date field .
Suppose the date range is '01-JUL-06' and '01-AUG-06' and time frame
is 23:00:00 to 08:00:00
i.e i want to search between dates 01 july to 01 aug and also within the time frame i.e 23:00 to 08:00 hrs onlyThe general principle is
SELECT * FROM your_table
WHERE some_date BEWTEEN to_date('01-JUL-06') and to_date('01-AUG-06' )+0.99999
AND ( some_date <= trunc(some_date)+8/24
OR some_date >= trunc(some_date)+23/24 )
/Cheers, APC -
How to display last data update date and time in report?
Hai All,
I want to report the date and time of the last upload in a report. How can I do this?
I mean if I load the data today 5th April 2006 at 8.30 pm, then would i be able to show that on my report at the top of it(along with filer objects may be)?
Thank you.Hi Visu,
You will find detail info from help.sap
check the links and they are useful
BEX Analyzer:
http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
Web Application Designer
http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
-Doodle
Message was edited by: Doodle -
Create/update date and time for any object
Hi All,
How to find that at what date and time at which perticular object is created or updated.
Thanks,
NiteshExample below:
[email protected]> alter session set nls_date_format='dd-mm-yyyy hh24:mi:ss'
2 /
Session altered.
[email protected]> select owner, object_name, last_ddl_time
2 from dba_objects
3 where owner = 'MOB' and object_name = 'T';
no rows selected
[email protected]> create table t(id int);
Table created.
[email protected]> select owner, object_name, last_ddl_time
2 from dba_objects
3 where owner = 'MOB' and object_name = 'T';
OWNER OBJECT_NAME
LAST_DDL_TIME
MOB T
30-08-2006 14:15:58
[email protected]> column object_name format a30
[email protected]> /
OWNER OBJECT_NAME LAST_DDL_TIME
MOB T 30-08-2006 14:15:58
[email protected]> alter table t add x int;
Table altered.
[email protected]> select owner, object_name, last_ddl_time
2 from dba_objects
3 where owner = 'MOB' and object_name = 'T';
OWNER OBJECT_NAME LAST_DDL_TIME
MOB T 30-08-2006 14:16:25
Best Regards
Krystian Zieja / mob -
To fetch data on the basis of last program run date and time
Hi all,
My query is as folows:
I am selecting BOM components from STPO table on the basis of some criteria.
My requirement is to select only BOM components which are newly added or created after last program run,i.e. STPO-AEDAT and STPO-ANDAT are greater than last program run.Here i fetched last program date from customised structure(client specific) which has date field also,and compared with aedat and andat in STPO records.But how can I connect it with last run time as there is no such time field in STPO table.I need to fetch this data on the basis of last program run(time+date).
Please help me..it's crucial,
Thanks in advance,
MeenaHi,
We had a very similar requirement.
We developed a custom-solution for this.
Create a Z-Table and update it with your progname, date and time.
Whenever the BOM was changed, it generated a change number ( this has to be done by the user)
You can get the date and time from the change Number Table AENR and compare it with the timestamp in Z-TABLE
Hope it helps,
RJ -
Updating Date and Time at Save
I have inserted a 'Date and Time' field in the header of a Pages document. I would like it to update each time the document is saved. I cannot seem to find how to do this. Can anybody help please?
Thanks
TimHello
I wrote upon Automator for those using 10.5 which gives the ability to record the user's actions in a process file which may be replaid later.
With 10.4.x this feature doesn't exists.
This is a very good reason to switch to 10.5
You are lucky, insomniae strikes again so here is the announced brute force script.
Copy the script in the clipboard
Paste in a blank window of Script Editor
Save it as an application
Move the newly created application into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Now, enter your Pages document.
Click in the header.
Go to
menu Scripts > saveWithCurrentDateInHeader
The contents of the header will be replaced by the current date/time
and the document will be saved exactly as if you pressed cmd + s
Yvan KOENIG
26 janvier 2008
--(SCRIPT saveWithCurrentDateInHeader.app]
property theApp : "Pages"
tell application theApp
activate
tell application "System Events" to tell application process theApp
keystroke "a" using {command down} (* print *)
set cd to current date
set the clipboard to (cd as text)
keystroke "v" using {command down}
keystroke "s" using {command down}
end tell -- System Events …
end tell --theApp
-- [/SCRIPT]
As you may read, there are more lines to explain the use of the beast than for the code itself
As I am unable to activate the dialog allowing us to adjust the date whe it is inserted the official way, I simply paste the current date-time into the header.
Just click tnto the header of the current page. It will be automatically reported into other pages's header.
Yvan KOENIG (from FRANCE samedi 26 janvier 2008 4:48:47) -
Why do I get iMessage failed update date and time in settings
My iphone5 keeps changing it time zone on it's own and I keep getting a notification in messages saying iMessage failed update your date and time in settings. I have update it several times and it's keep doing it. Now it's just frustrating. How can I take care of this problem for good.
I have also been getting the message ever since I got my iPhone 5 on September 12. I have to reboot the phone to fix the problem or turn the "Set Automatically" off and then back on. This is a glitch likely with Apple's iOS software, but my Verizon store said that have received numerous complaints on this issue, but no patch has been released for it as of yet.
-
How to automatically update date and time on Numbers spreadsheet
Would like to have printed version of Numbers spreadsheet reflect present date and time. I know how to do this in Excel, but can't figure out how to get there in Numbers.
Add the date and time to the Header or Footer in the Print Dialog via the Insert menu.
It is only semi-automatic, in that to update the date and time, you must either delete and reinsert the date and time, or you must open the token and update by clicking the Set to Today button.
Jerry -
Mail App not updating date and time
Hey guys,
Has anyone else has this problem: My Mail app isn't updating the date and time at the bottom of my screen. (In between, the refresh button on the left and the new draft button on the right) Not sure how to fix it...
Thanks in advance!Click on View on the top menu, click on Columns, and then click on "Date Received" to select it. Once it is checked, the Date and Time will display.
Cheers,
GB -
Search Bill for Phone Number. Date and Times?
Hello-
I am having a problem doing a search over the past 12 months for an individual number.
Is there a quick and easy way to display the dates and times that I've placed a call to one specific number over the past 12 months?
Thank you!YPP wrote:
I was hoping for a way to search online and get a line by line display of dates for the calls made.
If I have to download each pdf into a spreadsheet, combine them and do a search it will take a considerable amount of time.
To reinforce Spiral's suggestion, if you go to the Usage Details tab you can download your data in csv format. Granted, downloading 12 files and stitching them together isn't as convenient as an online search. However, it's much easier to do this with csv downloads than it would be if you had to do the pdf-to-spreadsheet conversion yourself. And once you've pieced things together, the data are a lot of fun to play with. -
BAPI - user last modified Name, Date and Time in SU01 of a Particular User
HI Experts,
After searched a lot in SDN , i am posting this thread,
I want to know any Standard BAPI to give LAST modified User name , time and Date in SU01 of a particular User.
I checked * BAPI_USER_GET_DETAIL* , its giving LAST modified time and Date in SU01, But I want Last modified user name as well.
I have 2 questions related with the above scenario,
1) Which BAPI gives the details of LAST modified User name , time and Date in SU01 of a particular User.
2) Any Table is there to give details of LAST modified User name , time and Date in SU01 of a particular User for a time period ,
For eg : 1 month, if i would have set the time line, it should give the three details .
Regards,
Saravana.SHi,
I am not sure, if there would be any BAPI particularly for giving such particular information. Even if you can, you might have to call 2 BAPIs, one for finding the list of such users modified within 1 month eg., and then getting the mod date and mod time.
BAPI_USER_GETLIST - this can be used for searching.. but tricky
then you have to call another bapi for getting the details.
One option is you can create a new Z BAPI using the table and get the results.
Regards,
Amit Mittal.
Maybe you are looking for
-
Is there any way to keep persistent ID's for tracks the same when migrating to a new computer?
Hi There, I've been using iTunes to maintain a music database for several years now. When I need to send somone tracks I use the persistent ID to identify the tracks since any of the other info can be in flux at any given point in time. This has work
-
Missing values of Enterprise Custom Field in Project Professional and Project Web Access
Hi all, In Project Server 2010 SP2 we created a custom field called Iteration Path (without a lookup table). We're in an environment where Project Server task data gets synched from TFS and we've mapped the Iteration Path from TFS to the Enterprise C
-
How do I take all my movies from the cloud and put them on an external hard drive
I am using an Apple TV and have bought about 145 movies. The internet in my area is not very fast so I need to know how to put all of my movies on an external hard drive so i don't have to stream them through the internet. All I would have to do is p
-
Variables partagées entre executable et entre machine
Bonjour, J'utilise deux variables partagées pour communiquer entre deux exécutables sur une même machine (Labview 2011). Le reproduis ce schéma sur deux machines. Sur chaque machine, j'ai mes deux variables partagées. La valeur de chacune d'entre ell
-
How to use: DOMProcessingInstruction?
Hi All, Could somebody please help me with the following. I'm using the xmldom to create my xml files based on queries from the database. (using a PL/SQL package) The problem is that the processing instruction is never added to the top of the xml fil