Can we use variables?



  • James D

    You could do something like the following for Variables.

    $Computer = Get-WmiObject -Class:Win32_ComputerSystemProduct | Select-Object -Property IdentifyingNumber
    $NewName = "Prefix$($Computer.IdentifyingNumber)"
    Computer -ComputerName "OldName" -NewName $NewName -DomainCredential Domain01\Admin01 -Force

    This would assign a name based the computers SN. It ultimately depends on how you are naming your computers. Yes it can be done, but the question is how complicated it will be. I believe you can also reference PDQ variables in Powershell scripts run from PDQ, but I have not done this myself.

    Since the script requires user interaction, it needs to be deployed as interactive or logged on user (I forget which).

    Comment actions Permalink
  • Jo Vanattenhoven

    OK, than you for the info. We'll play around already with this. 

    If someone else has suggestions or experience with it, please shoot.


    Comment actions Permalink

Please sign in to leave a comment.