Windows 10 doesn't seem to run anything in a powershell module unless you run 
it using a "Run a powershell command" step. I don't know if it's a security 
feature or a bug.

If you don't use anything that requires a new-object, rename-computer, or any 
other "built-in" module it will run. Try and use ADSI instead of 
Rename-Computer.

Thanks,
Jeff Jerousek

From: [email protected] [mailto:[email protected]] On 
Behalf Of John Aubrey
Sent: Wednesday, March 2, 2016 6:51 AM
To: [email protected]
Subject: [mssms] RE: PC Name Change

I've been trying for 2-3 days and can't get anything working.  I'm trying to 
use the rename-computer powershell cmtlet.  It looks like the rest of the 
script works (gets PC name, and then replaces first 2 digits).  It says the 
cmdlet isn't supported.  This is a Win10 PC and is booted into the "host" OS 
(not PE).  The cmdlet was added in powershell 2.0.  Windows 10 runs 5.0.   I 
have a task sequence with the exact same step I can run once I log on, and it 
works fine.  I'm running the powershell script as a command line and giving it 
a user account to run off.  I'm really grasping at straws at this point.  I 
tired doing the rename via WMI, but apparent those aren't available either.

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Jerousek, Jeff
Sent: Monday, February 29, 2016 1:53 PM
To: [email protected]<mailto:[email protected]>
Subject: [mssms] RE: PC Name Change

We do a few variations of this. The account will need to have local 
administrator rights as well as domain rights to rename the computer.

Thanks,
Jeff Jerousek

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of John Aubrey
Sent: Monday, February 29, 2016 12:04 PM
To: [email protected]<mailto:[email protected]>
Subject: [mssms] PC Name Change

Anyone ever change the name of a PC in a task sequence for an in-place upgrade. 
 Normally I would just change the variable before the OS installs, but since we 
aren't reimaging, just upgrading, that didn't work.  I have a working 
powershell script, but work since the PC is on the domain, and the SYSTEM 
account doesn't have rights to change names of domain PC's.  I tried making it 
a package and having it run under an account that does have permissions but 
still won't work.

Thanks,
John






Reply via email to