Archive - September 2013
 
"If you don't build your dream, someone else will hire you to help them build theirs." - Ambani 
 
 
  

Index
bar1
Move User to Group
Countdown Timer
Run As Someone Else
Logon Script Copy Files
PowerShell Count Files
VBScript Count Files
PowerShell Bulk Create Users from CSV  
Write Event Log Using PowerShell
Create Users in AD
Create a Restore Point
Repair BCD Repairs
Using Diskpart


bar1





Δ Monday, September 30th, 2013
bar1


Δ Move User to Group
 

This uses the dsget command to move a user from one group to another group.



Δ  [email me]

bar1





Δ Friday, September 27th, 2013
bar1


Δ Countdown Timer
     
This will create a countdown clock based upon a specified date. You could use this as an
expiration date, or to logically run a task at that time.





Δ  [email me]

bar1





Δ Wednesday, September 25th, 2013
bar1


Δ Run As Someone Else
    
The following script provides a function called Start-ProcessInteractive. You can specify a
target computer, a path to an executable on that computer and also some arguments. If
you do not specify a path and arguments, then the defaults will run a powershell command
and write a file into the target windows folder. That's a proof-of-concept, because if that
command works it illustrates that the PowerShell command was launched with full privileges.

The function schedules the task for the currently logged on user. If no currently logged on
user could be identified, then either no user was physically logged on, or the target machine
is running virtual machines in which case you can manually submit the user account you want
to schedule the command for.
 


Δ  [email me]

bar1






Δ Friday, September 20th, 2013
bar1


Δ Logon Script Copy Files
 
This runs at logon to copy files to client machine.



Δ  [email me]

bar1






Δ Wednesday, September 18th, 2013
bar1


Δ PowerShell Count Files
  
This script will count the numbers of files in a folder and output to file.



Δ  [email me]

bar1






Δ Monday, September 16th, 2013
bar1


Δ VBScript Count Files
  
This script will count the numbers of files in a folder and output to file.



Δ  [email me]

bar1






Δ Friday, September 13th, 2013
bar1


Δ PowerShell Bulk Create Users from CSV
  
This script uses the 'Active Directory module for Windows Powershell' but the key point
(that took me ages to work out, and seems mad) is you should not run it from a domain
controller! instead I ran it from a member server while logged in as a Domain Admin.

The CSV should have the following columns

FirstName
LastName
name
SamAccountName

When you run the script, it will create the users, using their login name as the Display name.



Δ  [email me]

bar1







Δ Thursday, September 12th, 2013
bar1


Δ Write Event Log Using PowerShell
  
This will allow you to write to the event log using PowerShell.



Δ  [email me]

bar1






Δ Tuesday, September 10th, 2013
bar1


Δ Create Users in AD
    
Using this PowerShell, and a CSV file, you can create Users is specified OU's in AD.

What is is your CSV

Travis, Garden, 2013, tgarden, Travis Garden, pca.hq/PCA OU/Domain Users/Students/Class 2013 Payton,
Gas,2015,pgas,Payton Gas,pca.hq/PCA OU/Domain Users/Students/Class 2015
Alaura,Gate,2014,agate,Alaura Gate,pca.hq/PCA OU/Domain Users/Students/Class 2014



Δ  [email me]

bar1






Δ Monday, September 9th, 2013
bar1


Δ Create a Restore Point
    
This VBScript creates a restore point.




Δ  [email me]

bar1






Δ Friday, September 6th, 2013
bar1


Δ Repair BCD Repairs
    
The reason that you are getting this error is because the Windows Boot Manager (Bootmgr)
entry is not present in the Boot Configuration Data (BCD) store or that the Boot\BCD file on
the active partition is damaged or missing. That is why you are now getting the "NoOSInstalled
under signature 07″ message after trying the Start-up Repair option as suggested by tf76. To
rectify your problem you can rebuild the BCD store using the Bootrec.exe tool in the Windows
Recovery Environment.




Δ  [email me]

bar1






Δ Thursday, September 5th, 2013
bar1


Δ Using Diskpart
 
To use the command line to bring a disk online, create a partition, and format it, run the
following commands:




Δ  [email me]

bar1


























  About

   I'm a Computer
   Systems Engineer

   Living and Loving Life

 

  Author