Script for getting all windows Drives freespace information
Hi All,
Any can post the batch script to get the disk drives freespace info for multiple servers.
Cheers,
Govind
This is not an Oracle Database question, so it really does not belong in this forum. You can query the WMI database in each server to find the information. Try the following search on Google:
hey scripting guy free disk spaceCharles Hooper
Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.
Similar Messages
-
Power shell script for get a content db for a particular web application
Hi
what is the power shell script for get a content db for a particular web application
Get-SPDatabase
adiltry this one
Get-SPContentDatabase -webapplication http://url
this will return all the database for the web applications.
Get-SPContentDatabase -site http://contoso.com
this will return the database name in which the contose site collection is.
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
Script for getting mail if database is down
Hi Friends,
OS Version : IBM AIX 5,2
Oracle version : 9.2.0.7
I am executing the following script for getting mail alert if database is down. some how the script is not working
check_stat=`ps -ef|grep ${ORACLE_SID}|grep pmon|wc -l`;
oracle_num=`expr $check_stat`
if [ $oracle_num -lt 1 ]
then
exit 0
fi
# Test to see if Oracle is accepting connections
$ORACLE_HOME/bin/sqlplus -s "/as sysdba" > /tmp/check_$ORACLE_SID.ora
select name from v$database;
exit
# If not, exit and e-mail . . .
check_stat=`cat /tmp/check_$ORACLE_SID.ora|grep -i error|wc -l`;
oracle_num=`expr $check_stat`
if [ $oracle_num -ne 0 ]
then
mailx -s "$ORACLE_SID is down!" [email protected] < /tmp/check_$ORACLE_SID.ora
exit 16
fi
I am saving this as .sh file and executing at command prompt. It is just hanging, but not throwing any error.
I would like to know if there is anything to be modified in the script or please provide me any such script. Thanks in advanceHI there.
I have a script I use that works really well. It sends out an email only if the database is down and also reads an ini file to process a blackout period and a priority level of the database... High priority databases are monitored every 5 minutes and Medium priority databases every hour.
There are two scripts, the shell script and the .ini file and I have two cron entries...
Check script:_
#!/bin/ksh
# check_oracle_status.sh
# Script to check if Oracle db's are up and running.
# Script is passed a priority field and reads check_oracle_status.ini
# to determine which db's to check. If db is down an email is sent.
# Priority Levels:
# H - Checks db's with "H"igh Priority every 5 minutes (cron)
# M - Checks db's with "M"edium Priority every hour (cron)
# L - db's with "L"ow Priority currently not checked
# Script Change History:
# ======================
# October 29th, 2009 - Initial Creation
# Set environment
export SCRIPTHOME=/opt/oracle/admin/scripts
export INIFILE=$SCRIPTHOME/check_oracle_status.ini
export PRIORITY=$1
. $HOME/.profile
db=`grep -i ":$PRIORITY" $INIFILE | cut -d":" -f1`
check_database()
sqlplus <<! > $SCRIPTHOME/check.out
/ as sysdba
select * from dba_data_files;
exit
grep ORA- $SCRIPTHOME/check.out > $SCRIPTHOME/error.out
if (( $? )); then
echo ""
else
mailx -s "Oracle instance $i is currently UNAVAILABLE" +<email address>+ < $SCRIPTHOME/error.out
fi
for i in $db ; do
fields=`grep $i $INIFILE | awk -F':' '{ total = total + NF }; END {print total}'`
export ORACLE_SID=$i
if [ $fields -gt 2 ]; then
BLACKOUT_START=`grep -i "$ORACLE_SID" $INIFILE | cut -d":" -f3`
BLACKOUT_END=`grep -i "$ORACLE_SID" $INIFILE | cut -d":" -f4`
CURRENT_HOUR=`date +%H`
CHECK_BASE=YES
if [ $BLACKOUT_START -gt $BLACKOUT_END ]; then
(( $CURRENT_HOUR >= $BLACKOUT_START || $CURRENT_HOUR <= $BLACKOUT_END )) && CHECK_BASE=
else
(( $CURRENT_HOUR >= $BLACKOUT_START && $CURRENT_HOUR <= $BLACKOUT_END )) && CHECK_BASE=
fi
if [ -n "$CHECK_BASE" ]; then
check_database
fi
else
check_database
fi
done
rm $SCRIPTHOME/check.out $SCRIPTHOME/error.out
INI File:_
oracle1:L
oracle2:M:17:08
oracle3:M
oracle5:M:17:08
oracle6:H
oracle7:M:17:08
oracle8:M
oracle9:M
Where oracle1,2,3 etc is your sid
L M and H your priority level
17 is blackout start (5 PM)
08 is blackout end (8 AM)
Note: Blackout is just a start hour and an end hour and must contain both or none and my script can only process one blackout per database. I guess if you
needed a second blackout you could add another line with different times for that sid
Cron entries:_
# Check Oracle Status
# The check_oracle_status.sh script monitors "H"igh priority databases every 5 minutes
# and "M"edium priority databases every hour
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/oracle/admin/scripts/check_oracle_status.sh H > /dev/null 2>&1
0 * * * * /opt/oracle/admin/scripts/check_oracle_status.sh M > /dev/null 2>&1
Not sure if you require blackouts or priority levels but this setup works great at our site.
Hope this helps. -
Query for getting all function and procedure inside the packages
hi All
Please provide me Query for getting all function and procedure inside the packages
thanksAs Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
If you are looking for the packaged procedures and functions source then use user_source data dictionary
select a.object_name,a.procedure_name from user_procedures a,
user_objects b
where a.object_name is not null
and a.procedure_name is not null
and b.object_type='PACKAGE'
and a.object_name=b.object_name -
Function module or BAPI for getting all the Idoc numbers of a sales order
Hi Folks,
Is there any function module or BAPI exists for getting all the Idoc numbers which are generated for a Sales order.
Thanks in advance.
Regards,
Sarath.....Hi Sarath,
try this function module...
BAPI_IDOCAPPL_DISPLAY
Regards,
Prabhudas -
Script to get all the Server Names on Central Site in the SCCM 2007 Hierarchy
I want a script which will run on Central Site, and give all the SCCM server names in the hierarchy.
Thanks and Regards, Mohd Zaid www.techforcast.comDuplicated post of
http://social.technet.microsoft.com/Forums/systemcenter/en-US/97910cd5-8f8b-46a7-86fa-c00932571d0d/script-to-get-all-the-server-names-on-central-site-in-the-sccm-2007-heirarchy?forum=configmgrgeneral
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
Need VB script for getting the IIS certification information
Hi guys,
I have totally 1000 IIS servers 2003 & 2008
windows and some of the servers configured
IIS 3rd party Security certificates. I need a script to get the certification information like expiry date & certificate vendor name.
Regards,
SreeMPost here:http://forums.iis.net/
Look in Gallery for IIS scripts:http://gallery.technet.microsoft.com/
¯\_(ツ)_/¯ -
Location of File Containing Data for "reopen all windows from last session"
I'm a heavy-duty Safari user and usually keep 100+ tabs and windows open, carefully invoking the command "reopen all windows from last session" each time I restart. Unfortunately, I screwed up today and started and quit Safari without invoking "reopen all windows from last session," and all of my open tabs and windows are gone.
I can recover the tabs manually using my history listings, but there must be an easier way: the information about the last session has to be stored somewhere. I did a Deja Vu backup on Friday and today I copied the files /~user/Library/Preferences/com.apple.Safari.plist and all the files from /~user/Library/Safari, including HistoryIndex.sk, History.plist, and LastSession.plist, from my backup to my hard drive, but the result was unchanged (that is, my 100+ tabs and windows were nowhere to be found).
Given the time it takes for Safari to shut down, I assume it's storing a large history file somewhere, if only I knew where. Does anybody out there know or could otherwise help my recover from my stupidity?
Thanks in advance.
-- Kevin
(proud Mac user for 23 years)I found a work-around. Since I frequently quit Safari and "reopen all windows from last session" upon restart, my history reflects all of the open tabs and windows contiguously. I thus reloaded the history file, invoked the command "History --> Show All History," found the most recent such contiguous history listing, shift-clicked and selected all relevant listings, and then double-clicked. All of my formerly open tabs and windows were reopened in tabs within a single window. I had to go back and rearrange things but it was far simpler than manually reopening all of those tabs and windows.
-- Kevin -
Here are scripts for getting OAS302 working on RedHat 6.0
People have said this doesn't work. It works. It's just the
owsctl that doesn't work. I'm not saying that oas302 on RedHat 6
is the best solution anyone could come up with, but it does work,
and if you want to do it, here are some scripts that you can feel
free to modify and use as you wish. Various variables should be
updated with however you system is configured. Remember to start
the wrb (i.e. the second script) before you start any listeners.
Linux has a tendency to crash if you don't kill -KILL all the wrb
processes at the same time (i.e. the kernel gets an uncaught
exception and dies).
Erik
<disclaimer>
I do not guarantee these will work. I do not guarantee that
they will not destroy something important. I assume no liability
for what these scripts may or may not do. Use them at your own
risk. There is no expressed or implied waranty.
</disclaimer>
#!/bin/ksh
# Script to start the oraweb http servers to listen for requests
# because owsctl is kind of unpredictable under RedHat 6.0
# set this variable to be the directory that the webserver
# configuration drivetoryies are under (i.e.
# /db/app/oracle/admin/ows/web/httpd_my.host.com)
WEB_HOME=/db/app/oracle/admin/ows/web/httpd_my.host.com
LISTENER="$2"
if [[ -z "$LISTENER" ]]
then
echo "No listener name to start."
echo "Usage: listen {start|stop} listener"
echo "e.g.:"
echo " listen start admin"
exit 1
fi
case "$1" in
start)
OMN_ADDR=UDP:worf.gcg.com:2649
OWS_ADPCFG="$ORAWEB_HOME/admin/adpspy.cfg"
OWS_ADPSO="$ORAWEB_HOME/lib/ndwfs.so"
OWS_ORAWEB_FREEDOMX=1
export OWS_ADPCFG OWS_ADPSO OMN_ADDR OWS_ORAWEB_FEEDOMX
CFG_FILE=$WEB_HOME/$LISTENER/config/sv$LISTENER.cfg
if [[ -f "$CFG_FILE" ]]
then
oraweb -C $CFG_FILE
else
echo "Could not find config file for $LISTENER:"
echo " $CFG_FILE"
exit 1
fi
stop)
PID_FILE=$WEB_HOME/$LISTENER/config/sv$LISTENER.pid
if [[ -f $PID_FILE ]]
then
kill `cat $PID_FILE`
if [[ $? -ne 0 ]]
then
echo "Could not stop oraweb $LISTENER process."
exit 1
fi
else
echo "Could not find oraweb $LISTENER PID file:"
echo " $PID_FILE"
exit 1
fi
echo "Usage: listen {start|stop} listener"
echo "e.g.:"
echo " listen start admin"
exit 1
esac
#!/bin/ksh
# Script to start up the Oracle Web Request Broker (wrb)
# processes manually because owsctl doesn't work on RedHat
# Linux 6.0
TMP_FILE=/tmp/wrb.pids
case "$1" in
start)
SLEEP=3
if [[ -f "$TMP_FILE" ]]
then
echo "$TMP_FILE exits. Make sure the wrb is not
already"
echo "running, remove $TMP_FILE, and run this script
again."
exit 1
fi
if [[ -z "$ORAWEB_HOME" ]]
then
echo "ORAWEB_HOME is not set. This environment variable"
echo "should be set to the directory where the oracle was"
echo "lives, i.e. /app/oracle/product/8.0.5/ows/3.0"
exit 1
fi
OMN_ADDR=UDP:my.host.com:2649
OWS_ADPCFG="$ORAWEB_HOME/admin/adpspy.cfg"
OWS_ADPSO="$ORAWEB_HOME/lib/ndwfs.so"
OWS_ORAWEB_FEEDOMX=1 # I have no idea what this does; I read
# about it in a newsgroup. Supposedly
# it makes the oas run faster
export OWS_ADPCFG OWS_ADPSO OMN_ADDR OWS_ORAWEB_FREEDOMX
PATH=$ORAWEB_HOME/bin:$PATH
mnaddrsrv -D &
echo -n "$! " > $TMP_FILE
sleep $SLEEP
mnrpcnmsrv &
echo -n "$! " >> $TMP_FILE
mnorbsrv &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbcfg &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrblog &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbasrv &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbahsrv &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbroker &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbvpm &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbfac &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
wrbdm &
echo -n "$! " >> $TMP_FILE
sleep $SLEEP
stop)
kill -KILL `cat $TMP_FILE`
if [[ $? -ne 0 ]]
then
echo "Could not stop wrb processes. The PIDs are in"
echo "$TMP_FILE. If these are running, please"
echo "stop them manually."
else
rm -rf $TMP_FILE
fi
echo "Usage: wrb {start|stop}"
exit 1
esac
nullHi Erick,
Your scripts for running the OAS302 on 6.0 linux had been very
helpful.
In fact, I dont know what would I have done without them.
Now I am able to run the listeners and even able to create the
packages and users in the database via the OAS 3.0.2 but the
problem starts when accessing a procedure in the database using
the pl/sql agent. By the way i am using Oracle 8.0.5.1 RDBMS and
its home is different than the webserver home.
The browser just does nothing and even does not log any error
message ,I have to stop it after a while but all my other
catridges are working.
any insight will be appreciated.
thanks,
Vikram ( Ironically enough I work for Oracle).
Erik Nielsen (guest) wrote:
: People have said this doesn't work. It works. It's just the
: owsctl that doesn't work. I'm not saying that oas302 on RedHat
6
: is the best solution anyone could come up with, but it does
work,
: and if you want to do it, here are some scripts that you can
feel
: free to modify and use as you wish. Various variables should
be
: updated with however you system is configured. Remember to
start
: the wrb (i.e. the second script) before you start any
listeners.
: Linux has a tendency to crash if you don't kill -KILL all the
wrb
: processes at the same time (i.e. the kernel gets an uncaught
: exception and dies).
: Erik
: <disclaimer>
: I do not guarantee these will work. I do not guarantee that
: they will not destroy something important. I assume no
liability
: for what these scripts may or may not do. Use them at your own
: risk. There is no expressed or implied waranty.
: </disclaimer>
: #!/bin/ksh
: # Script to start the oraweb http servers to listen for
requests
: # because owsctl is kind of unpredictable under RedHat 6.0
: # set this variable to be the directory that the webserver
: # configuration drivetoryies are under (i.e.
: # /db/app/oracle/admin/ows/web/httpd_my.host.com)
: WEB_HOME=/db/app/oracle/admin/ows/web/httpd_my.host.com
: LISTENER="$2"
: if [[ -z "$LISTENER" ]]
: then
: echo "No listener name to start."
: echo "Usage: listen {start|stop} listener"
: echo "e.g.:"
: echo " listen start admin"
: exit 1
: fi
: case "$1" in
: start)
: OMN_ADDR=UDP:worf.gcg.com:2649
: OWS_ADPCFG="$ORAWEB_HOME/admin/adpspy.cfg"
: OWS_ADPSO="$ORAWEB_HOME/lib/ndwfs.so"
: OWS_ORAWEB_FREEDOMX=1
: export OWS_ADPCFG OWS_ADPSO OMN_ADDR OWS_ORAWEB_FEEDOMX
: CFG_FILE=$WEB_HOME/$LISTENER/config/sv$LISTENER.cfg
: if [[ -f "$CFG_FILE" ]]
: then
: oraweb -C $CFG_FILE
: else
: echo "Could not find config file for $LISTENER:"
: echo " $CFG_FILE"
: exit 1
: fi
: stop)
: PID_FILE=$WEB_HOME/$LISTENER/config/sv$LISTENER.pid
: if [[ -f $PID_FILE ]]
: then
: kill `cat $PID_FILE`
: if [[ $? -ne 0 ]]
: then
: echo "Could not stop oraweb $LISTENER process."
: exit 1
: fi
: else
: echo "Could not find oraweb $LISTENER PID file:"
: echo " $PID_FILE"
: exit 1
: fi
: echo "Usage: listen {start|stop} listener"
: echo "e.g.:"
: echo " listen start admin"
: exit 1
: esac
: #!/bin/ksh
: # Script to start up the Oracle Web Request Broker (wrb)
: # processes manually because owsctl doesn't work on RedHat
: # Linux 6.0
: TMP_FILE=/tmp/wrb.pids
: case "$1" in
: start)
: SLEEP=3
: if [[ -f "$TMP_FILE" ]]
: then
: echo "$TMP_FILE exits. Make sure the wrb is not
: already"
: echo "running, remove $TMP_FILE, and run this script
: again."
: exit 1
: fi
: if [[ -z "$ORAWEB_HOME" ]]
: then
: echo "ORAWEB_HOME is not set. This environment variable"
: echo "should be set to the directory where the oracle
was"
: echo "lives, i.e. /app/oracle/product/8.0.5/ows/3.0"
: exit 1
: fi
: OMN_ADDR=UDP:my.host.com:2649
: OWS_ADPCFG="$ORAWEB_HOME/admin/adpspy.cfg"
: OWS_ADPSO="$ORAWEB_HOME/lib/ndwfs.so"
: OWS_ORAWEB_FEEDOMX=1 # I have no idea what this does; I read
: # about it in a newsgroup. Supposedly
: # it makes the oas run faster
: export OWS_ADPCFG OWS_ADPSO OMN_ADDR OWS_ORAWEB_FREEDOMX
: PATH=$ORAWEB_HOME/bin:$PATH
: mnaddrsrv -D &
: echo -n "$! " > $TMP_FILE
: sleep $SLEEP
: mnrpcnmsrv &
: echo -n "$! " >> $TMP_FILE
: mnorbsrv &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbcfg &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrblog &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbasrv &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbahsrv &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbroker &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbvpm &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbfac &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: wrbdm &
: echo -n "$! " >> $TMP_FILE
: sleep $SLEEP
: stop)
: kill -KILL `cat $TMP_FILE`
: if [[ $? -ne 0 ]]
: then
: echo "Could not stop wrb processes. The PIDs are in"
: echo "$TMP_FILE. If these are running, please"
: echo "stop them manually."
: else
: rm -rf $TMP_FILE
: fi
: echo "Usage: wrb {start|stop}"
: exit 1
: esac
null -
Script for export all text in single rtf file?
Hi!
I need to export all storys from indd document to a single rtf file. Is there avaible some free script for CS4 which can do that?if(app.documents.length != 0){
if(app.documents.item(0).stories.length != 0){
myGetFileName(app.documents.item(0).name);
//========================= FUNCTIONS ===========================
function myGetFileName(myDocumentName){
var myFilePath = File.saveDialog("Save Exported File As:");
if(myFilePath != null){
myDisplayDialog(myDocumentName, myFilePath);
function myDisplayDialog(myDocumentName, myFilePath){
//Need to get export format, story separator.
var myExportFormats = ["Text Only", "Tagged Text", "RTF"];
var myDialog = app.dialogs.add({name:"ExportAllStories"});
with(myDialog.dialogColumns.add()){
with(dialogRows.add()){
with(dialogColumns.add()){
var myExportFormatDropdown = dropdowns.add({stringList:myExportFormats, selectedIndex:0});
with(dialogRows.add()){
var myAddSeparatorCheckbox = checkboxControls.add({staticLabel:"Add separator line", checkedState:true});
var myResult = myDialog.show();
if(myResult == true){
var myExportFormat = myExportFormats[myExportFormatDropdown.selectedIndex];
var myAddSeparator = myAddSeparatorCheckbox.checkedState;
myDialog.destroy();
myExportAllText(myDocumentName, myFilePath, myExportFormat, myAddSeparator);
else{
myDialog.destroy();
function myExportAllText(myDocumentName, myFilePath, myExportFormat, myAddSeparator){
var myPage, myStory;
var myExportedStories = [];
var myTempFolder = Folder.temp;
var myTempFile = File(myTempFolder + "/tempTextFile.txt");
var myNewDocument = app.documents.add();
var myDocument = app.documents.item(myDocumentName);
var myTextFrame = myNewDocument.pages.item(0).textFrames.add({geometricBounds:myGetBounds(myNewDocument, myNewDocument.pages.item(0))});
var myNewStory = myTextFrame.parentStory;
for (var i = 0; i < myDocument.pages.length; i++) {
myPage = myDocument.pages.item(i);
for (var t = 0; t < myPage.textFrames.length; t++){
myStory = myPage.textFrames[t].parentStory;
if (!IsInArray(myStory.id, myExportedStories)) {
//Export the story as tagged text.
myStory.exportFile(ExportFormat.taggedText, myTempFile);
myExportedStories.push(myStory.id);
//Import (place) the file at the end of the temporary story.
myNewStory.insertionPoints.item(-1).place(myTempFile);
//If the imported text did not end with a return, enter a return
//to keep the stories from running together.
if(i != myDocument.stories.length -1){
if(myNewStory.characters.item(-1).contents != "\r"){
myNewStory.insertionPoints.item(-1).contents = "\r";
if(myAddSeparator == true){
myNewStory.insertionPoints.item(-1).contents = "----------------------------------------\r";
} // if not exported
} // for text frames
} // for pages
switch(myExportFormat){
case "Text Only":
myFormat = ExportFormat.textType;
myExtension = ".txt"
break;
case "RTF":
myFormat = ExportFormat.RTF;
myExtension = ".rtf"
break;
case "Tagged Text":
myFormat = ExportFormat.taggedText;
myExtension = ".txt"
break;
myNewStory.exportFile(myFormat, File(myFilePath));
myNewDocument.close(SaveOptions.no);
myTempFile.remove();
function myGetBounds(myDocument, myPage){
var myPageWidth = myDocument.documentPreferences.pageWidth;
var myPageHeight = myDocument.documentPreferences.pageHeight
if(myPage.side == PageSideOptions.leftHand){
var myX2 = myPage.marginPreferences.left;
var myX1 = myPage.marginPreferences.right;
else{
var myX1 = myPage.marginPreferences.left;
var myX2 = myPage.marginPreferences.right;
var myY1 = myPage.marginPreferences.top;
var myX2 = myPageWidth - myX2;
var myY2 = myPageHeight - myPage.marginPreferences.bottom;
return [myY1, myX1, myY2, myX2];
function IsInArray(myString, myArray) {
for (x in myArray) {
if (myString == myArray[x]) {
return true;
return false;
This is a revised version of the script -- not totally tested.
Kasyan -
Need script for getting Uptime for remote servers
Hi Guys,
I'm in need of a script to get the UP time for windows servers in number of days. i have more than 1000 servers.
I dont want PowerShell script as i have many WIndows 2003 servers where PowerShell is not installed.
Please help me with this.
Thanks,
Kiran RajHi,
I'd look at the LastBootUpTime property that can be found by querying Win32_OperatingSystem.
Don't retire TechNet! -
(Don't give up yet - 12,700+ strong and growing) -
Power Shell Script for getting the list of members of a particular collection group
Hi Group
I am looking for a powershell script for the below manual process in sccm2012. please help
Obtain the list of “All Users Group1” collection that have been defined as a Primary User of a device, and what that Users ShortName and Device name is
Obtain the list of user from Active Directory that have their “Title” attribute equal to “Non-Employee” (samAccountName)
For each user that is returned from AD, determine if they are assigned as a Primary User of a Device and write the Device name to a file
Continue to append all of the applicable Device names to the file
End Result = List of all Devices that have Users that have their AD Attribute “Title” equal to “Non-Employee”
thanks
VARHi,
The Cmdlets below should be helpful for you to write the script. You could have a look.
Get-CMUser
Get-CMUserDeviceAffinity
Get-ADUser
Best Regards,
Joyce Li
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Script for getting the online/offline status
Hi all,
After enabling checkbox of "Enable assistive access device" is possible to get the online/ offline status.From Menu we will get the status.Without doing this i want to get the apple mail account online/offline status.hope some help scripts for this.[That script|http://discussions.apple.com/message.jspa?messageID=11012484#11012484] could change the Online Status of all mail accounts. The following one will just report their Online Status. Is this what you are (were) asking for?
--BEGINNING OF SCRIPT
tell application "Mail" to activate
tell application "System Events" to tell process "Mail"
set theMenu to menu "Mailbox" of menu bar 1
if enabled of menu item "Take All Accounts Online" of theMenu then
return "All accounts are currently offline"
else
return "All accounts are currently online"
end if
end tell
--END OF SCRIPT -
An icon in the toolbar for "Merge All Windows" ?
I use the "Merge All Windows" function quite a lot and I think it is cool and quite useful. But, is there a way that I can create an icon in the toolbar for this "Merge All Windows" function? Thanks!
You're welcome. Glad to have helped.
When you are complete here please close out this thread via the Answered panel. This way others know your question has been addressed to your satisfaction. -
In Safari is there a Keyboard shortcut for Merge All Windows?
Majority of sites sill open new pages in new windows, not new tabs. So, I keep using the Merge All Windows feature all the time. Please, provide a keyboard shortcut for this!
Although there is no default keyboard shortcut for the menu item in question, there is nothing preventing you from creating your own.
Under System Preferences > Keyboard & Mouse > Keyboard Shortcuts, press the "+" sign. From the Application drop-down menu, choose Safari. In the Menu Title field enter "Merge All Windows" -- without the quotes. In the Keyboard Shortcut field, enter your desired key combo and then click the Add button.
You'll need to quit System Preferences and restart Safari for the change to take effect. Good luck.
Maybe you are looking for
-
Is it possible to set up WordPress in a subdirectory?
Hi; here's the story: I'm virtual-hosting 3 websites (including mail and ftp) on our in-house MacMini SL server. These sites are pretty basic, and each resides in its own folder on the secondary (non-system) drive inside our MacMini: /Volumes/harddri
-
How do i speak to a live person for billing support??
How do I speak to a live rep on the phone? I have a slew of charges on my account from iTunes I never purchased, and now my account have been disabled. The best I can get is an email that tells me they are looking into it. That helps..... Any tips?
-
IPod stops playing and gives apple symbol with weird colors.
My IPod was in my pocket for only about 2 minutes and it stopped playing music and gave me a weird apple symbol and blue with white shading every where like it encountered a virus or something. It goes back shortly after but it keeps happening. Is th
-
Video is whacking in games.
I recently installed a G4MX440-T8X and it works great, until I put in a game that uses 3D. Then the colors go whacky and the screen flickers. I have updated the video card drivers, my mobo drivers, and directx. None has helped yet. I need help.
-
How to remove Disk Group after deinstall of Grid Infrastructure
Hello, I deinstalled an Oracle Grid Infrastructure for a standalone server. I made the mistake of telling OUI not to drop the Disks/Disk Group. Now when I try to do a new install it shows the disks as members of a Disk Group already on the page 'Crea