So after a couple of hours toying and reading online (links to other pages which aided me in this assessment at the end of this post) I’d like to record the specific binaries and config changes I needed to make to access an elderly iDrac6 Virtual Console session from Firefox.
The following was copied from <https://access.redhat.com/discussions/3312101?tour=8> and provides a method of cleaning all subscription manager configuration and re-subscribing – you’ll need an active account with Red Hat to complete this though they do offer free developer accounts (use your account name and not your email address as the username!)
Troubleshooting update-help in Powershell can be simplified using the -Force and -Ea 0 commands to continue past errors along with the to “-Ev what” to record the errors in a verbose manner to the $what variable.
<pre class="wp-block-code">```
@echo off
REM Change the "servicename" value to match your desired service below
REM Change the "logfilename" value to your own logfile
REM change the %processLinked% value to the process name associated with the target service
set servicename="explorerService"
set processLinked="explorer.exe"
set logfilename="C:\Logs\thisscript.log"
rem get the date and time
For /f "tokens=1-3 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%b-%%a)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
rem execute the "sc query <service>" command and loop through the output
for /F "tokens=3 delims=: " %%i in ('sc query "%servicename%" ^| findstr " STATE"') do (
rem log the datetime and service state to the logfile
echo %mydate%_%mytime% >> %logfilename%
echo "%servicename% Service's current state is: %%i" >> %logfilename%
rem restart the service after killing off the associate %processLinked%
echo "%servicename% Service is forcibly restarting..." >> %logfilename%
taskkill /IM %processLinked% /F >> %logfilename%
net start %servicename% >> %logfilename%
)
After some online searching around EVENT ID 5152 which had started littering my DC’s eventlogs following some additional audit enabling I discovered how to silence these logs from the SECURITY eventlog, leaving them in place for the FIREWALL log instead:
Whilst writing a script which included a recycler section to ensure files older than 14 days were removed from a directory I needed a way to test the code. I then came across the set-itemproperty cmdlet which was just what I needed.
The following Powershell commmand uses the Get-ADComputer cmdlet to query AD and return a CSV with the headers “OU”,”Name” & “OperatingSystem”.
It was designed to return this information to marry up with GPO controlled policies against the OUs so I could plan servicing schedules.
Navigate to the local system disk :\Windows\System32\config and open [SYSTEM]
Navigate to HKEY_LOCAL_MACHINE\<LOADED HIVE NAME>\CurrentControlSet\Control\Session Manager\ and edit the BootExecute MULTI-SZ value to read only: autocheck autochk *
The following command returns all objects in the specified OU (replace XXX with your own values) which have Bitlocker recovery information and what the recovery key is.
I recently encountered a minor issue attempting to create additional VMs in VMWare Workstation 14 on Ubuntu. The error I received suggested there wasn’t enough memory free to power on an additional VM but the host has 32GB of RAM and I’d allocated 20GB across all VMs.
Resolved by following https://support.office.com/en-us/article/Office-repeatedly-prompts-you-to-activate-on-a-new-PC-a9a6b05f-f6ce-4d1f-8d49-eb5007b64ba1
Onwards with the powershell quest, this code queries the remote computer named “PC1” for installed software and writes the results to a local file “C:\PC1_InstalledPrograms.csv”. The ouput is filtered for the “Displayname”,”Publisher”,”Version” and sorted by DisplayName.
I recently struggled to upgrade my Intel(R) Network Connections driver installation from v22.4.10 (unsupported in Windows 10 1703) due to a corrupted uninstaller.
Tracerplus Connect software makes a hardcoded reference to the linked Tracerplus Desktop project. However if you need to relocate the directory of the Desktop project that will break the Connect references to the fields and cause the synchronization to fail.
Dism /online /enable-feature /featurename:NetFX3 /featurename:NetFx3ServerFeatures /Source:X:\sources\sxs
Note: X: is the drive letter of DVD drive on the computer, adjust it accordingly.
We have a number of Dell Optiplex 9010’s in use running Windows 7 Enterprise x64 which have Intel’s USB 3 chipset C216. However, the Dell cab file of drivers did not appear to contain a suitable driver for the systems via our deployment mechanism.
After a little puzzling with MS Outlook 2016 Synchronization settings GPO I thought I’d share this small bug in the GUI (at least for our environment 2k8r2 ADs):
I came across an HP unibody laptop which was caught in a Windows 10 reboot recovery startup loop. Unable to complete an SFC scan I discovered a DISM command which will trash any pending disk actions and in this case allowed the system to boot to the login prompt (after throwing away a number of Windows updates).
Here is the command to create a bootable installation USB for the latest OSX 10.12 Sierra, it’s the same as previous releases, at least as far back as Mavericks 10.9 with the only change being the name of the installation.app (“Install macOS Sierra.app” in this case) and the name of the USB volume I’m writing to (“SierraInstaller” in this case).
I had to install some Dell software but kept receiving the message “Unable to complete the installation due to pending file rename operation” on Windows 10 Enterprise.
Renaming the registry key HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperationsOLD allowed me to complete the installation.
Download the installer from the App Store but do not install it, close the installer when it launches
Format an 8GB+ USB Drive in the GUID type and Journaled (not case sensitive) partition
run the command (where Untitled is the name of the partition you created in step 1):
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction
Sit back and relax, smoke a pipe while you wait maybe
Using “dd” inside of OSX I was able to copy the affected disk bit by bit to an image file and then convert that file to a readable format for OSX to mount:
1. Get the identity of the physical disk using
“diskutil list”
from the command line. Usually it’s named “System” if booting from an OSX Live USB drive
dhcp server lease list (lists the current DHCP clients)
dhcp server lease delete clientid=xx:xx:xx:xx:xx:xx ( xx etc. is the MAC address of appropriate client from above list – deletes the current lease)
dhcp server lease add clientid=xx:xx:xx:xx:xx:xx pool=LAN_private addr=192.168.1.x leasetime=0 (adds required IP for appropriate client with infinite lease time)
saveall
Import the FirstName, LastName and EmailAddress from all sent emails into individual contacts in the” Suggested Contacts” folder inside of the systems default Outlook profile via:
#########################################################
# #
# Remove Duplicate Outlook Contacts by Jean Louw #
# Blog http://powershellneedfulthings.blogspot.com/ #
# #
#########################################################
> 1. Open a Finder window then from the menu bar click Go > Go to Folder
>
> 2. Type or copy paste the following: /Library/Internet Plug-Ins
>
> 3. Click Go.
>
> 4. If you see the: [AdobePDFViewer] plugin in the Internet Plug-Ins folder, move it to the trash.
>
> 5. Quit and relaunch Safari
Private Sub UpdateTimeSheetCalculations()
On Error GoTo Err_UpdateTimeSheetCalculations
‘this simple subroutine looks at the MySQL View “time_sheet_calc_dynamic” and copies the calculated values therein to the time_sheet table
‘The “time_sheet_calc_dynamic” does not include records where the “ts_calculation_completed” column is set to 1. The DB Manager can switch this flag
‘on and off via the Time Sheet Management form or when running a report for the timesheet. This means calculations made are “frozen in time”
‘with the rates as they were so subsequent changes to mileage or on-call rates are not re-calculated.
the field on it’s own:
SELECT IF(z.ts_mon_journeys * (SELECT tsm_mileage from time_sheet_mileage where tsm_user=’MinHourPerJourney’) > IfNull(z.ts_mon_hours,0), z.ts_mon_journeys * (SELECT tsm_mileage from time_sheet_mileage where tsm_user=’MinHourPerJourney’), z.ts_mon_hours) TotalHours
CREATE VIEW jobsheet_history AS
SELECT x.jr_id, x.jr_jobid, x.jr_userid, x.jr_user_assigned, x.jr_pdaid, x.jr_datedue, x.jr_scandt, x.jr_priloc, x.jr_secloc, x.jr_terloc, x.jr_workrqd, x.jr_workcomp, x.jr_workleft, x.jr_jobcomp, x.jr_timetaken,
x.jr_pu1barcode, p1.il_description pu1desc, x.jr_pu1qty,
x.jr_pu2barcode, p2.il_description pu2desc, x.jr_pu2qty,
x.jr_pu3barcode, p3.il_description pu3desc, x.jr_pu3qty,
x.jr_pu4barcode, p4.il_description pu4desc, x.jr_pu4qty,
x.jr_pu5barcode, p5.il_description pu5desc, x.jr_pu5qty,
x.jr_pu6barcode, p6.il_description pu6desc, x.jr_pu6qty,
x.jr_pu7barcode, p7.il_description pu7desc, x.jr_pu7qty,
x.jr_pu8barcode, p8.il_description pu8desc, x.jr_pu8qty,
x.jr_pu9barcode, p9.il_description pu9desc, x.jr_pu9qty,
x.jr_pu10barcode, p10.il_description pu10desc, x.jr_pu10qty, x.jr_ts
FROM (((((((((jobsheet_report x
LEFT JOIN item_list as p1 on x.jr_pu1barcode=p1.il_barcode)
LEFT JOIN item_list as p2 on x.jr_pu2barcode=p2.il_barcode)
LEFT JOIN item_list as p3 on x.jr_pu3barcode=p3.il_barcode)
LEFT JOIN item_list as p4 on x.jr_pu4barcode=p4.il_barcode)
LEFT JOIN item_list as p5 on x.jr_pu5barcode=p5.il_barcode)
LEFT JOIN item_list as p6 on x.jr_pu6barcode=p6.il_barcode)
LEFT JOIN item_list as p7 on x.jr_pu7barcode=p7.il_barcode)
LEFT JOIN item_list as p8 on x.jr_pu8barcode=p8.il_barcode)
LEFT JOIN item_list as p9 on x.jr_pu9barcode=p9.il_barcode)
LEFT JOIN item_list as p10 on x.jr_pu10barcode=p10.il_barcode;
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSafeBootNetworkMSIServer or HKLMSYSTEMCurrentControlSetControlSafeBootMinimalMSIServer change “Default” reg_sz value to “@Service”
CREATE VIEW time_sheet_last_month AS
SELECT * from time_sheet_last t
WHERE t.ts_WE >= DATE_ADD(LAST_DAY(DATE_SUB(NOW(), INTERVAL 2 MONTH)), INTERVAL 1 DAY);
1. time_sheet_last_sub
CREATE VIEW time_sheet_last_sub AS
SELECT DISTINCT MAX(ts_id) ts_id, ts_userid, ts_WE, MAX(ts_scandt) ts_last_synch
FROM time_sheet GROUP BY ts_userid, ts_WE;
1. jobsheet_report_last_entry_sub
CREATE VIEW jobsheet_report_last_entry_sub AS
SELECT MAX(jr_id) id, jr_jobid, MAX(jr_scandt) scandt
FROM jobsheet_report
GROUP BY jr_jobid;
1. jobsheet_report_total_sub
CREATE VIEW jobsheet_report_total_sub(jobid, barcode, qty) AS
(SELECT jr_jobid jobid, jr_pu1barcode Barcode, jr_pu1qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu1barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu2barcode Barcode, jr_pu2qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu2barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu3barcode Barcode, jr_pu3qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu3barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu4barcode Barcode, jr_pu4qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu4barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu5barcode Barcode, jr_pu5qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu5barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu6barcode Barcode, jr_pu6qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu6barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu7barcode Barcode, jr_pu7qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu7barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu8barcode Barcode, jr_pu8qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu8barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu9barcode Barcode, jr_pu9qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu9barcode “”)
union all
(SELECT jr_jobid jobid, jr_pu10barcode Barcode, jr_pu10qty qty FROM jobsheet_report_last_entry WHERE jobsheet_report_last_entry.jr_pu10barcode “”);
CREATE VIEW stock_record_change_request AS
SELECT
x.sr_id,
x.sr_barcode,
x.sr_changedesc,
x.sr_changegroup,
x.sr_changepri,
x.sr_changesec,
x.sr_changeter,
y.il_description,
y.il_group,
y.il_priloc,
y.il_secloc,
y.il_terloc,
x.sr_checkrqd,
x.sr_userid,
x.sr_ts
FROM stock_record x
LEFT JOIN item_list y ON x.sr_barcode=y.il_barcode
WHERE x.sr_checkrqd=”Yes”
ORDER BY x.sr_barcode;
1. stock_record_count_sublocal
CREATE VIEW stock_record_count_sublocal AS
SELECT sr_barcode barcode, SUM(sr_qty) qtyused
FROM stock_record
GROUP BY barcode;
CREATE VIEW asset_report_damaged AS
SELECT
a.ar_id,
a.ar_barcode,
x.al_description,
x.al_asset_group,
x.al_priloc,
x.al_secloc,
x.al_terloc,
a.ar_scandt,
a.ar_itemstatus,
a.ar_actiontaken,
a.ar_actionleft,
a.ar_datedue,
a.ar_userid,
a.ar_ts
FROM asset_report_last a
LEFT JOIN asset_list x
ON a.ar_barcode=x.al_barcode
WHERE a.ar_itemstatus NOT LIKE “%1%”;
CREATE VIEW asset_report_change_request AS
SELECT x.ar_id, x.ar_barcode, y.il_description, y.il_group, y.il_priloc, y.il_secloc, y.il_terloc, x.ar_userid, x.ar_scandt, y.il_ts, x.ar_ts FROM asset_report x
LEFT JOIN item_list y ON x.ar_barcode=y.il_barcode
WHERE ar_checkrqd=”Yes”;
1. IT logs onto the PC with local admin privileges / runs the following installers with elevated privileges
2. Nurse logs onto https://vpn.oxnet.nhs.uk/ (the Nurse must login to “Oxfordshire-GP”) and downloads the VPN client
3. IT installs the VPN client on the target PC
4. The nurse connects to the VPN using his/her credentials
5. IT connects to ftp://213.146.154.199 (username and password required – available via phone from myself or EMIS support) and downloads “SDS 6 Install.exe”
6. IT installs “SDS 6 Install.exe” obtaining the nurses surgery site ID to complete the installation
7. The nurse logs into EMIS
8. IT completes the auto-updating of the software
9. IT logs off local admin / removes elevated privileges and disconnects EMIS and VPN
10. Nurse runs through the VPN connection and EMIS launch using their own user account
CMRS / GEORGIA:
Step 1:
look at importvisiting.pl (-h) on dc1-keble, note data type required (existing .csv’s from previous years visible in dc1-keblescriptscsv) – NOTE NO SPACE BETWEEN “,” and [FirstName]!!
match provided data to this format, generating OWL credentials to finalise (use txt file for OWL generation including one name per line (surname,firstname middle(s))
First set the OU containers permissions to allow the NTSELF user of systems to write back TPM-ownerinformation, required when first initializing the TPM client:
Use the delegate Control wizard inside AD against the top level domain listing (not OU). You can then select “Join Domain” as a security option for your chosen user(s)/group(s).
The following batch file describes the creation of a Win7 PE boot environment and generates an ISO that is then bootable. For our needs we use PXELinux so note the echo in the batch file” echo Preparing peimagexfiles” below.
Getting libxml2-related errors, log out and in to refresh the environment variable changes from the install and also ensure you’re running the command prompt as an Administrator (elevated).
Encountered this problem on my client, turns out it was caused by our domain registry redirect applying to the local Windows SYSTEM account profile as well which then meant any installations running as SYSTEM were unable to unpack correctly. Correcting all references in the following user key for SYSTEM solved the problem: