Jump to content

mcretari

Members
  • Content Count

    26
  • Joined

  • Last visited

  • Days Won

    1

mcretari last won the day on December 16 2017

mcretari had the most liked content!

Community Reputation

1 Neutral

My Information

  • Agent Count
    750 - 1000 Agents

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This script moves the computer (only Windows workstations) to the location matching the router’s public IP. It will not change client and if you want to have a Roaming location for certain clients, it will see if public IP matches any location for that client/s and if not, it will move it to “Roaming” location. Consider this script as a draft / work in progress. Of course this script can be improved a lot. Any suggestion / modification will be really appreciated. Thank you Move Computer to Location IP.xml.zip
  2. Could you please add as variable the Force option? Also it would be great to be able to write as variable the wanted location ID. Thanks
  3. Thanks for the information. One thing I had to also do is select Model in Field Mapping. Do you know if it's possible to sync the VMs inside a Host as Bundled Configurations on CW Manage? Thanks
  4. In case you have some emails like firstname.lastname@company.com this is the SQL query that maps that with the Contact Name: UPDATE computers, contacts SET computers.ContactID = contacts.ContactID WHERE computers.ContactID = 0 AND computers.ClientID = contacts.ClientID AND (SUBSTRING_INDEX(computers.LastUsername,'\\',-1) = SUBSTRING_INDEX(contacts.Email,'@',1) OR SUBSTRING_INDEX(computers.LastUsername,'\\',-1) = CONCAT(LOWER(LEFT(contacts.Firstname, 1)),LOWER(contacts.LastName))) AND computers.OS NOT LIKE '%Server%' AND contacts.Email <> ''
  5. Hello @Braingears Is it possible that hotfix applied for the new vulnerability discovered ( ) affected the installation process using your script? I now get Installer will execute twice (KI 12002617) This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package. Automate Installer Exit Code: 1619 Automate Installer Logs: C:\Windows\Temp\Automate_Agent_2020-06-15_07-55-30.log Thank you
  6. Thank you. Running the script on the PDC server worked. Here is my feedback: When script fails (like running it on a non PDC server) status should be Failed in LT so we know something went wrong. Maybe before running the script you can check if it's a PDC server and if not log where it should be run: if ((gwmi win32_computersystem).partofdomain -eq $true) { write-host -fore white "INFO : Your are a member of a domain" try{ $PDCHost = (Get-ADDomain -EA Stop).PDCEmulator }catch{ write-host -fore red "ERROR : This script is for PDC Server" exit} if ($PDCHost -eq "$env:computername.$env:userdnsdomain") { write-host -fore green "Your are on the PDC Server" .......(do what you need to do) }else{ write-host -fore red "ERROR : This script is for PDC Server. Please execute in this server: $PDCHost" exit } # If not a member of domain } else { write-host -fore white "INFO : Your are in a workgroup" ....exit script } Also, I checked the .bat file that is created and command does not have the Force parameter. Can we add that as a script parameter? (also -Verbose for loggin purposes) Thank you!!
  7. I just tested the script and unfortunately didn't work for me: Import-GPO : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) At C:\Windows\system32\config\systemprofile\AppData\Local\2b47f478a8a94a99bac4e 8b0220cc6e8.ps1:5 char:1 + Import-GPO -BackupGpoName $GPOName -Path $Path -TargetName $GPOName - ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-GPO], UnauthorizedAcce ssException + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Gro upPolicy.Commands.ImportGpoCommand The GPO CW Automate Agent Deployment was NOT imported successfully. At C:\Windows\system32\config\systemprofile\AppData\Local\2b47f478a8a94a99bac4e 8b0220cc6e8.ps1:6 char:65 + ... yContinue)) {Throw "The GPO $GPOName was NOT imported successfully."} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (The GPO CW Auto...d successfu lly.:String) [], RuntimeException + FullyQualifiedErrorId : The GPO CW Automate Agent Deployment was NOT imp orted successfully. Any ideas on what to try? Thanks
  8. I have exactly the same issue. @BlueToast Thank you for the tip, worked perfect!
  9. Hello Braingears Please take a look at this: https://devblogs.microsoft.com/scripting/use-culture-information-in-powershell-to-format-dates/ Let me know if that helps. Thank you
  10. @DarrenWhite99 could you please share your script? Thank you
  11. Hello I've tested this command with 2020.5 version and it works!. Thank you
  12. Ok, is there any way to use your PS script with an IF LT_Installed = True and LT_URL = MyServer then Do nothing? Thank you
  13. @DarrenWhite99 could you please share an screenshot of that monitor (onboarding accelerator)? Thank you
  14. Thank you @Braingears for the script Does this script checks if agent is already installed and pointing to our LT server?
  15. Thank you @Braingears I've tested the new version but is not working for one of the machines. First try (without -Verbose): Transcript started, output file is C:\Windows\Temp\Automate_Deploy.txt Removing Existing Automate Agent... The Automate Agent Uninstalled Successfully Automate is NOT Installed Installing Automate Agent to https://MY_SERVER_ADDRESS The Automate Agent FAILED to Install ComputerName : COMPUTER-NAME ServerAddress : Enter the server address here. ComputerID : ClientID : LocationID : 15 Version : InstFolder : True InstRegistry : True Installed : True Service : Running Online : Transcript stopped, output file is C:\Windows\Temp\Automate_Deploy.txt Second try, with -Verbose: Transcript started, output file is C:\Windows\Temp\Automate_Deploy.txt VERBOSE: Checking Operating System (WinXP and Older) for HTTP vs HTTPS VERBOSE: Checking if Automate Server URL is active. Server entered: MY_SERVER_ADDRESS VERBOSE: https://MY_SERVER_ADDRESS is Active VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: If ServerAddress matches, the Automate Agent is currently Online, and Not forced to Rip & Replace then Automate is already installed. VERBOSE: False VERBOSE: Removing Existing Automate Agent VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} Removing Existing Automate Agent... VERBOSE: Closing Open Applications and Stopping Services VERBOSE: The Automate Agent Uninstaller Executed Without Errors VERBOSE: Checking For Removal - Loop 5X VERBOSE: @{ComputerName=COMPUTER-NAME; InstFolder=False; InstRegistry=False; Installed=False; Service=; Online=False} VERBOSE: Automate Uninstaller Completed Successfully The Automate Agent Uninstalled Successfully VERBOSE: The Automate Agent Uninstalled Successfully VERBOSE: @{ComputerName=COMPUTER-NAME; InstFolder=False; InstRegistry=False; Installed=False; Service=; Online=False} Automate is NOT Installed VERBOSE: Installing Automate Agent on https://MY_SERVER_ADDRESS Installing Automate Agent to https://MY_SERVER_ADDRESS VERBOSE: MSIEXEC Log Files: C:\Windows\Temp\Automate_Agent_2020-05-15_12-47-52.log VERBOSE: The Automate Agent Installer Executed Without Errors VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} VERBOSE: @{ComputerName=COMPUTER-NAME; ServerAddress=Enter the server address here.; ComputerID=; ClientID=; LocationID=15; Version=; InstFolder=True; InstRegistry=True; Installed=True; Service=Running; Online=} The Automate Agent FAILED to Install ComputerName : COMPUTER-NAME ServerAddress : Enter the server address here. ComputerID : ClientID : LocationID : 15 Version : InstFolder : True InstRegistry : True Installed : True Service : Running Online : Transcript stopped, output file is C:\Windows\Temp\Automate_Deploy.txt Any idea on what can be the issue? Thanks
×
×
  • Create New...