scripting
need to script something ? do it here
124 topics in this forum
-
I pull this info out in order to have a complete register of all our computer systems in case of theft or insurance issues. DNSHostName=XXX10001 Manufacturer=LENOVO Version=ThinkCentre A57 Model=970273G SerialNumber=LMXXXXX UserName=Domain\Username FullName=Lastname, Firstname Middlename Caption=Microsoft Windows 7 Enterprise Version=6.1.7600 OSArchitecture=64-bit InstallDate=20100728133244.000000+120 IPAddress={"10.0.0.2","fe80::19da:933c:93c4:51a1"} MACAddress=00:11:22:33:44:AA Here's the script @echo off WMIC PATH Win32_ComputerSystem Get DNSHostName /Value | FIND "=" WMIC PATH Win32_BIOS Get Manufacturer /Value | FIND "=" WMIC PATH Win32…
-
- 2 replies
- 16k views
-
-
Hi WN I created a function to connect to the CMSite and load the cmdlet for ConfigurationManager. Could the function be improved in any way or is it as good it can be? is the logic best practice or? You can download it at : https://gallery.technet.microsoft.com/Connect-ConfigMgr64-db5e9d0a function Connect-ConfigMgr64 { $initParams = @{ } if ((Get-Module ConfigurationManager) -eq $null) { try { Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams -Scope Global } catch { $ModulePath = (Get-ItemProperty HKLM:\SOFTWARE\Wow6432Node\Microsoft\ConfigMgr10\Setup -Name "UI Installation Directory").'UI Installatio…
-
- 0 replies
- 5.5k views
- 1 follower
-
-
Hi, my intention is to copy 2 files into a folder, where only the admin own full permissions. Normal user have only read permissions. The destination directory is: C:\Program Files\Java\jdk1.8.0_45\jre\lib\security The new two files are: jocal_policy.jar and us_export_policy.jar i have to overwrite two files in destination folder, because they are to old. (or first, i delete the old two files and then copy the new two files) Here is my Batchfile, but i dont understand why nothing changes, if i send the batch file to a client: del "C:\Program Files\Java\jdk1.8.0_45\jre\lib\security\*.jar" copy %~dp0local_policy.jar "C:\Program Files\Java\jdk1.8.0_45\jr…
-
- 0 replies
- 3.6k views
-
-
Hi, I am trying to create a script that automatically populates a database with existing computers. It queries the local machine for UUID and computername then creates a new record for the machine in the database. This works perfectly at the moment. The problem is, once the record is created, the linked view "ComputerSettings" isn't updated. I am looking for a way to programatically update the ComputerSettings view using vbscript. Does anyone have any ideas? The database i am referring to is MDT
-
- 0 replies
- 3.3k views
- 1 follower
-
-
Hi All, Can someone help me with a script (Powershell or VB) to populate the currently logged in username from Computers ? What I have ? A spreadsheet with Computer names. Eg: COMP001 COMP002 . . . COMP00n What I am looking for ? A script that reads Computer names from the spreadsheet and finds the currently logged in users on these computer and export the details to another spreadsheet in a something similar format. COMP001 Adam COMP002 Brian I tried some scripts which I got from different forums out there but I am not getting what I am trying to achieve. Thanks, Joe
-
- 3 replies
- 5k views
-
-
Hi Guys, I got some code that i need to extend to include detection of vista windows 7 2008 etc and was wondering if anyone could give me some assistance. basically i need to add detection of windows vista and 7 and possibly w2k8+ ....any ideas...have nfi btw... looking at snippets atm trying to solve.... '========================================================================== 'Determine OS using WMI '========================================================================== Dim sWXPP, sW2KP, sW2KS, sW2KAS, sW2KDS, sW2K3S, sW2K3W, sW2K3E, sUnkOS, sWbemOpSys Dim oWbemServices Dim cOperatingSystems Dim oInstance sWXPP = "Microsoft Windows XP Professional" sW…
-
- 2 replies
- 14.7k views
-
-
Hello everbody, Does someone knows how to disable 802.1x on Windows 7? I found a VBScript in the link below but it doesn't work on Windows 7, because the EAPOL registry was discontinued on Windows vista http://www.tech-archive.net/Archive/Scripting/microsoft.public.scripting.vbscript/2005-04/msg00232.html Does anyone knows how to do it, using WMI, registry or batch? Any help would be really appreciated! Thanks in advance!
-
- 1 reply
- 5.7k views
-
-
Hi all, I am trying to export everything from the production SCCM environment, using PowerShell. Collections, Applications, Packages and Task Sequence export works just fine, but the Driver Packages is giving me some trouble. I am using the following cmdlet, expecting to get the driver package with all the driver files in it Export-CMDriverPackage -Name $my_name -ExportFilePath $my_export_path -WithContent $true –Verbose –ForceWildcardHandling Any idea?
-
- 7 replies
- 4.6k views
- 1 follower
-
-
Anyone by chance have ez-execute ? It's a front end gui for psexec. I'm running late on my SCCM pushes, and have to do some manually, so having trouble doing it all with psexec. It used to be here: http://www.penguinbyte.com/software/ezexecute But that link no longer works everything seems to point to the above link... http://www.savagenomads.net/2007/03/19/ez_execute_freeware_gui_for_psexec/
-
- 1 reply
- 16.4k views
-
-
We currently have a Powershell script that runs and grabs the security logs from our Domain controllers. We would like to either filter out results from the created .csv file or adjust the script to give us all the data for a certain event ID. The below is a copy of the current Powershell script we use to grab the logs. cls $computer = gc env:computername $mypath = "c:\" $dt=(get-date).AddDays(-1).tostring("MM-dd-yyyy") $obj = New-Object System.Globalization.CultureInfo -ArgumentList "en-US" $before = [DateTime]::Parse((get-date).tostring("MM-dd-yyyy"), $obj) $after = [DateTime]::Parse((get-date).AddDays(-1).tostring("MM-dd-yyyy"), $obj) get-eventlog -logname…
-
- 0 replies
- 3k views
-
-
Dr. Tobias Weltner, a PowerShell MVP has written an excellent eBook about PowerShell. Dr. Tobias Weltner has written many books for Microsoft Press on Windows and scripting techniques so he is a real professional and knows his stuff inside and out. Big surprise: the eBook is FREE! For every one who wants to know more about PowerShell, this is a great opportunity. Go get it NOW from here. via > http://thoughtsonopsmgr.blogspot.com/2010/09/free-ebook-mastering-powershell.html?utm_source=twitterfeed&utm_medium=twitter
-
- 2 replies
- 7.7k views
-
-
to do this you need to be using Windows Server 2003, Windows XP or Windows Vista (Windows 2000 doesn't support it) open a command prompt and paste this wmic.exe path win32_NetworkAdapterConfiguration get /format:htable > win32_NetworkAdapterConfiguration.html This will create a new file called win32_NetworkAdapterConfiguration.html which you can open in a Web browser (IE please, Firefox won't render this correctly) here's a sample of the file win32_NetworkAdapterConfiguration.html Under the IPAddress column, you'll see the IP address of the current Network adapter, you may see many listed (PPOE and more) here's the same query in text …
-
- 0 replies
- 26k views
-
-
you can edit a batch file (shutdown.bat) and paste the following into it shutdown.exe -s -f -t 5 -c "shutting down the computer now" save the file and you can 'call' it either using Windows Task Manager (start/control panael, scheduled tasks, add scheduled task) the -s in the code above tells shutdown.exe to shut the system down, if you want to reboot the machine change it to -r the -f switch forces running applications to close without warning and the -c displays a comment box to warn the user of the coming shutdown, in addition it adds this info the the eventviewer. the 5 after -t is the number of seconds before the machine is shutdown. cheer…
-
- 0 replies
- 8.6k views
-
-
After the earlier version of office is installed, it has a gray status that cannot be modified. I want to create a desktop shortcut to prevent users from modifying information like this. How should I create a desktop shortcut with PowerShell, and the target and starting position are in a gray status that cannot be modified?
-
- 0 replies
- 4.3k views
-
-
In a command-prompt windows just type: "WMIC ComputerSystem GET Model" I had to use this several times to know exactly which computer model I had
-
- 0 replies
- 3.6k views
-
