Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Covert Ops

Member
  • Joined

  • Last visited

  • Country

    Canada

Everything posted by Covert Ops

  1. I am just trying to provide a template for Covert Ops, it would be up to him to edit it to what he wanted. This worked for me. I modified it to just output D- or M- Thank you all for the help!!
  2. Great! Thanks for the help guys. I think this will work well: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colChassis = objWMIService.ExecQuery _ ("Select * from Win32_SystemEnclosure") For Each objChassis in colChassis For Each strChassisType in objChassis.ChassisTypes Wscript.Echo strChassisType Next Next But I am not sure how to incorporate it into my previous script, and then have it enter a D- or M- at the beginning of the computer name
  3. Hello I am trying to rename a bunch of workstations based on their serial number, and then a "D-" at the beginning if it is a workstation, and a "M-" if it is a notebook/laptop For example a workstation would be renamed to D-SN12345 and a laptop would be renamed to M-SN12345 So far I have this: Set objNetwork = CreateObject("WScript.Network") strComputer = objNetwork.ComputerName Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" & _ strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & _ strComputer & "'") Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48) For Each objItem in colItems strMsg = objItem.Caption If strMsg = "Microsoft Windows XP Professional" Then winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//." 'WScript.Echo winmgmt1 Set SNSet = GetObject( winmgmt1 ).InstancesOf ("Win32_BIOS") for each SN in SNSet If SN.SerialNumber = strComputer Then MsgBox "Computer name already set! Name is: "& strComputer Wscript.Quit End If If SN.SerialNumber = "" Then MsgBox "Problem with computer naming!" Wscript.Quit End If ErrCode = objComputer.Rename(SN.SerialNumber, strPassword, strUser) If ErrCode = 0 Then MsgBox "Computer renamed successfully to: "& SN.SerialNumber End If Next End If Next This works well, but I am not sure how to go about determining if the computer is a workstation or a notebook, and then how to go about adding it to the beginning of the computer name I did not write the script above, and I have very limited scripting knowledge Any help would be GREATLY appreciated

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.