ChrisMiles
Members-
Posts
410 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by ChrisMiles
-
Populating AD computer description field during import
ChrisMiles replied to googlemad's topic in Windows Server 2008 R2
Well here MAC Addresses done for you Not sure what you mean by system type, but you can see how its done On Error Resume Next Dim objNetwork, objWMIService, strComputer, intMaxProfileAge, colBIOS, objBIOS, colNetworkAdapterConfiguration, objNetworkAdapterConfiguration, strSerialNumber, strMacAddresses, objComputer, adoConnection, adoRecordset Set objRootDSE = GetObject("LDAP://RootDSE") Set objNetwork = WScript.CreateObject("WScript.Network") Set objWMIService = GetObject("Winmgmts:\\.\root\cimv2") Set colBIOS = objWMIService.ExecQuery("Select * From Win32_BIOS") If Not colBIOS Is Nothing Then For Each objBIOS in colBIOS strSerialNumber = objBIOS.SerialNumber Next End If Set colNetworkAdapterConfiguration = objWMIService.ExecQuery("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") strMacAddresses = "" For Each objNetworkAdapterConfiguration in colNetworkAdapterConfiguration If strMacAddresses <> "" Then strMacAddresses = strMacAddresses & ", " End If strMacAddresses = strMacAddresses & objNetworkAdapterConfiguration.MACAddress Next Set adoConnection = CreateObject("ADODB.Connection") adoConnection.Provider = "ADsDSOObject" adoConnection.Open "Active Directory Provider" If Err.Number <> 0 Then MsgBox "Connect Error: " & Err.Description WScript.Quit End If Set adoRecordset = adoConnection.Execute(";(&(objectCategory=Computer)(name=" & objNetwork.Computername & "));adspath;subtree") If Err.Number <> 0 Then MsgBox "Query Error: " & Err.Description WScript.Quit End If If Not adoRecordset.EOF Then Set objComputer = GetObject(adoRecordset.Fields(0).Value) objComputer.Put "description", "Serial Number: " & strSerialNumber & "; MAC Addresses: " & strMACAddresses objComputer.SetInfo End If If Err.Number <> 0 Then MsgBox "Write Error: " & Err.Description WScript.Quit End If -
Populating AD computer description field during import
ChrisMiles replied to googlemad's topic in Windows Server 2008 R2
LOL sorry, my pc doesn't have a serial number so i used test instead, I've updated it now. -
Populating AD computer description field during import
ChrisMiles replied to googlemad's topic in Windows Server 2008 R2
This vbs script will do what you want, how you will trigger it to run I don't know though. On Error Resume Next Dim objNetwork, objWMIService, strComputer, intMaxProfileAge, colBIOS, objBIOS, strSerialNumber, objComputer, adoConnection, adoRecordset Set objRootDSE = GetObject("LDAP://RootDSE") Set objNetwork = WScript.CreateObject("WScript.Network") Set objWMIService = GetObject("Winmgmts:\\.\root\cimv2") Set colBIOS = objWMIService.ExecQuery("Select * From Win32_BIOS") If Not colBIOS Is Nothing Then For Each objBIOS in colBIOS strSerialNumber = objBIOS.SerialNumber Next End If Set adoConnection = CreateObject("ADODB.Connection") adoConnection.Provider = "ADsDSOObject" adoConnection.Open "Active Directory Provider" If Err.Number <> 0 Then MsgBox "Connect Error: " & Err.Description WScript.Quit End If Set adoRecordset = adoConnection.Execute(";(&(objectCategory=Computer)(name=" & objNetwork.Computername & "));adspath;subtree") If Err.Number <> 0 Then MsgBox "Query Error: " & Err.Description WScript.Quit End If If Not adoRecordset.EOF Then Set objComputer = GetObject(adoRecordset.Fields(0).Value) objComputer.Put "description", strSerialNumber objComputer.SetInfo End If If Err.Number <> 0 Then MsgBox "Write Error: " & Err.Description WScript.Quit End If -
Losing Internet Access on 2008R2 Servers
ChrisMiles replied to Tricky_Dicky's topic in Wired Networks
lol its giving you the run around. I think the internet access check contacts something at microsoft, does microsoft.com work? Is it possible to test it on an internet connection without a proxy in the way? -
Losing Internet Access on 2008R2 Servers
ChrisMiles replied to Tricky_Dicky's topic in Wired Networks
So disabling ip6 causes it work sporadically, hmm, try running a continuous ping on the gateway while you browse the net (ping /t)and see if the ping drops out as well as the websites. -
Delete user profiles older than a specified number of days
ChrisMiles replied to Sheridan's topic in Windows 7
Did you run the script with admin privileges? -
Losing Internet Access on 2008R2 Servers
ChrisMiles replied to Tricky_Dicky's topic in Wired Networks
One thing to do is make sure that the iSCSI nics dont have a gateway configured, then it will have no choice but to use the right one. -
Losing Internet Access on 2008R2 Servers
ChrisMiles replied to Tricky_Dicky's topic in Wired Networks
It may be that the server is trying to access the internet through the iSCSI vlan instead of the correct one, however, if that was the case I'm not sure youd be able to talk to the other servers, hmm. Does DNS resolution work? ie nslookup http://www.google.com Also, you said you cannot ping the gateway, is the proxy server internal or external and can you ping that? -
Losing Internet Access on 2008R2 Servers
ChrisMiles replied to Tricky_Dicky's topic in Wired Networks
I had to do LAN drivers and the HP Teaming software, dunno if DELL has anything similar. You mentioned you have your san connected with iscsi. Is that done with teaming, multi-path io or with a single connection at the moment? Is the iscsi switch isolated from the client network and do the iscsi adapters have addresses on a different subnet? -
Losing Internet Access on 2008R2 Servers
ChrisMiles replied to Tricky_Dicky's topic in Wired Networks
I had this exact same problem with some hp proliant servers when I was configuring our hyper-v cluster. Ping the gateway and see if it works, if you have teamed network adapters on the lan side, try disabling all but 1 of the team members and see if it will access the gateway and internet again right away. I fixed it in the end with updated firmware and drivers. -
[sims] FMS & Thin Clients - Crystal Reports not installed
ChrisMiles replied to jamesmay's topic in MIS Systems
To fix this crystal reports error when exporting to XLS form FMS and possibly the other crystal reports errors posted here try copying the following files into the C:\Program Files\SIMS\Finance folder (or wherever you have installed FMS). crpe32.dll u2ddisk.dll u2fwordw.dll u2fxls.dll The files should all be dated 09/30/1997 and should either be found in c:\windows\system32 or c:\windows\crystal on a pc with a working installation. The files do not need to be in the windows folder where they are installed to nor do they need registering. I had to figure out this fix because one of our other pieces software overwrote these files with a new version of crystal reports and broke FMS for us I have attached the needed files if you cannot find them. FMS DLLs.rar -
Unless you have thousands of clients using your MIS simultaneously I promise you, whatever you think is high disk usage will be nothing in the grand scheme of things. 15k sas disks are overkill never mind which raid you choose. Throw enough memory at your VMs and raid 5 will be more than fine. Our sims runs on a VM with 7.2k sata disks in raid 5 and under load (report generation for example) the 4 processors on the VM max out way before the san gets close even with the rest of our servers running as well.
-
Delete user profiles older than a specified number of days
ChrisMiles replied to Sheridan's topic in Windows 7
Microsoft's delprof.exe doesnt support windows 7. -
Delete user profiles older than a specified number of days
ChrisMiles replied to Sheridan's topic in Windows 7
The scripts that remove folders and registry entries are a hack, this script gets windows to do all the work just as if you had done it through the User Profiles interface so yeah, windows will remove everything including the folders and registry entries. I used this myself in a similar form until i wrote a windows app which allows me to remove specific user profiles from any and all machines in addition to this script. -
Delete user profiles older than a specified number of days
ChrisMiles replied to Sheridan's topic in Windows 7
This script will delete profiles which are older than the specified number of days using WMI (no ugly registry hacking). You can modify the excluded accounts and the maximum age of profiles by modify the strFilter and intMaxProfileAge variables respectively. On Error Resume Next Dim objFSO, objWMIService, strComputer, strFilter, intMaxProfileAge, colProfiles, objProfile, dtmLastUseTime strComputer = "." strFilter = "SID Like ""S-1-5-21%"" And Not LocalPath Like ""%Administrator%""" intMaxProfileAge = 14 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objWMIService = GetObject("Winmgmts:\\" & strComputer & "\root\cimv2") Set colProfiles = objWMIService.ExecQuery("Select * From Win32_UserProfile Where " & strFilter) If Not colProfiles Is Nothing Then For Each objProfile in colProfiles dtmLastUseTime = CDate(Mid(objProfile.LastUseTime, 7, 2) & "/" & Mid(objProfile.LastUseTime, 5, 2) & "/" & Left(objProfile.LastUseTime, 4) & " " & Mid (objProfile.LastUseTime, 9, 2) & ":" & Mid(objProfile.LastUseTime, 11, 2) & ":" & Mid(objProfile.LastUseTime, 13, 2)) MsgBox DateDiff("d", dtmLastUseTime, Date) If DateDiff("d", dtmLastUseTime, Date) > intMaxProfileAge Then Err.Clear objProfile.Delete_ If Err.Number = -2147024809 Then 'Profile in use, skipping. ElseIf Err.Number = -2147024751 Then objFSO.DeleteFolder objProfile.LocalPath, True ElseIf Err.Number <> 0 Then '"Error: " & Err.Number & ": " & Err.Description Else 'Profile Deleted. End If End If Next End If -
Well if you want a certain about of redundancy but on the cheap then you can get or buy a PC with onboard raid capability and stick some big drives in it (1TB SATA drives are really cheap), install windows server on it temporarily and then do whatever plan you had for your TerraStation. Whatever you do you'll have to consider backup capacity though.
-
Instructions to enable windows 7 to allow more than one user to log in at a time so that when someone logs in to the console while you are on RDP it wont kick you off.
-
Maybe try enabling concurrent sessions? Guide How to Enable Concurrent Sessions in Windows 7 | Missing Remote
-
I'd say the problem is probably not helped by the fact that the BGFL router seems to be the core of your network. I'd seriously suggest connecting the rest of your switches to a main one and have the router tagged on to that. Especially if the router has only 100mb ports. First port of call would be to try that, to eliminate any interference from the router.
-
Sounds like you already got some help, if downtime means anything to you then get a replacement board on same day delivery and replace it before you lose your raid forever! A broken raid controller could easily corrupt your raid if it hasn't already. If £700 seems steep let it be a lesson on the importance of having warrenties and care packs for critical hardware. Anyway, even if you managed to buy a new server for £700 which I doubt, how would you plan on migrating your data to a new server if the old one is broken anyway?
-
media embeded in powerpoint and working on moodle
ChrisMiles replied to bushby's topic in AV and Multimedia Related
You cannot embed movie files into powerpoint presentations. The best you can do is convert the video to flash and embed that. However the best solution imo is to put the movies in a shared network location and link them in the presentation from there. -
SQL Help - Count entries per month but include months with 0 entries
ChrisMiles replied to FragglePete's topic in Coding
In SQL i'd do something like this DECLARE @YearMin INT DECLARE @YearMax INT DECLARE @monthMin INT DECLARE @monthMax INT DECLARE @CurrentYear INT DECLARE @CurrentMonth INT DECLATE @months TABLE(DateYear INT NOT NULL, DateMonth INT NOT NULL) SELECT @YearMin = ISNULL(MIN(YEAR(tblDetentions.DateSetFor)), YEAR(GETDATE())) FROM tblDetentions SELECT @YearMax = ISNULL(MAX(YEAR(tblDetentions.DateSetFor)), YEAR(GETDATE())) FROM tblDetentions SELECT @monthMin = ISNULL(MIN(MONTH(tblDetentions.DateSetFor)), MONTH(GETDATE())) FROM tblDetentions WHERE YEAR(tblDetentions.DateSetFor) = @YearMin SELECT @monthMax = ISNULL(MAX(MONTH(tblDetentions.DateSetFor)), MONTH(GETDATE())) FROM tblDetentions WHERE YEAR(tblDetentions.DateSetFor) = @YearMax SELECT @CurrentYear = @YearMin SELECT @CurrentMonth = @monthMin WHILE @CurrentYear <= @YearMax BEGIN WHILE (@CurrentYear < @YearMax AND @CurrentMonth <= 12) OR (@CurrentYear = @YearMax AND @CurrentMonth <= @monthMax) BEGIN INSERT INTO @months (DateYear, DateMonth) VALUES (@CurrentYear, @CurrentMonth) SELECT @CurrentMonth = @CurrentMonth + 1 END SELECT @CurrentYear = @CurrentYear + 1 END SELECT MONTH(tblMonths.DateMonth) AS MonthGiven, YEAR(tblMonths.DateYear) AS YearGiven, ISNULL(COUNT(tblDetentions.DateSetFor), 0) AS TotalDetentionsCount FROM @months tblMonths INNER JOIN tblDetentions ON MONTH(tblDetentions.DateSetFor) = tblMonths.DateMonth AND YEAR(tblDetentions.DateSetFor) = tblMonths.DateYear GROUP BY YEAR(tblMonths.DateYear), MONTH(tblMonths.DateMonth) ORDER BY YEAR(tblMonths.DateYear), MONTH(tblMonths.DateMonth) Not sure if it will work in access. Couldnt compile it either, but you get the gist Edit: stupid forum is messing up the variable names... Edit 2: Fixed some errors and attached code file code.txt -
I did it by mounting the secondary storage into the default images folder, maybe give that a try Section 3 in that guide refers to the Fog Web UI, one of the icons along the top is "Storage".
-
Sounds like your image was saved to a disk image and the drive in the computer isnt big enough for it. Just a guess.
-
Software that allows access to C Drive and Shares
ChrisMiles replied to burgemaster's topic in Windows
You wont be able to do anything about this I'm afraid. The group policies only apply to explorer, other applications can query for files and directories without any restrictions.
