(Powershell script) Move Computer to Windows 8 OU based on prior OU set in OSD variable in OSD

We have Windows 7 and Windows 8 machines that get configured through SCCM 2012 OSD. In my task sequence I have the computer joined to an OU based on the drop down selection. However I cannot write something into the javascript to put a computer into the
sub ou labeled windows 8. I would like to write a powershell script that will put the computer into the sub OU based on what was selected earlier.
Example: Computer is joined to Sales OU in our organization. There is a sub OU called Windows 8 under the Sales. If Sales is selected then it should join that subOU Windows 8.  Has anyone accomplished this task before? How would I write this? I have enclosed
a photo of what my OSD looks like. Very simple. This hta exports the OSDDomainOU variable out and the apply network settings task sequence grabs it and joins it to the selected OU.

I would use a switch statement and it would be something like this
function Set-OSDVariable
Param (
[string]$OSDVariable,
[string]$OSDVarValue
$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment
$tsenv.Value($OSDVariable) = $OSDVarValue
function Get-OSDVariable
Param (
[string]$OSDGetVar
$tsenv = New-Object -ComObject Microsoft.SMS.TSEnvironment
$tstOSDVar = $tsenv.Value("$OSDGetVar")
return $tstOSDVar
$osddomainou = Get-OSDvariable -OSDGetVar "osddomainouname"
switch($osddomainou)
"external" { Set-OSDVariable -OSDVariable "osdomainnameou" -OSDVarValue "win8 external ou" }
The function included in the script above sets OSD Variables and I call it on the switch statement. Follow that format for the rest of the possible OU's. I've also included a function to get the variable too. 

Similar Messages

  • Powershell script not executing in Windows 8.1 TS

    I have this simple powershell script that will create a log file in a certain directory. I added a "Run Command Line" step in my task sequence to call my powershell script
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File .\POSTINSTALL.ps1
    When I did not specify any account in "Run this step as the following account" section, the log file was created in the directory. But when I specify an account in "Run this step as the following account", the log file was not created.
    The account that I have used have full admin rights on the directory as I have added the account in local admin group using another task sequence step. I have also modified the security rights of the folder to give all users and administrators to have full
    control of the folder, but the log file was not created. Any idea why the script only works with System account?
    Note that I have only experience this on a Windows 8.1 OS. The script works in Windows 7 whether I specify an account in "Run this step.." or not.

    If that is all you are doing, why not run it without content?
    powershell.exe -executionpolicy bypass -command "& {New-Item C:\Windows\PCLOGS\Logs\TS-Test.log -ItemType File}"
    We use Run Command Line steps in literally dozens of steps in our task sequences. I would remove the path and let the TS control which architecture of PowerShell to call, that may be your problem.
    Daniel Ratliff | http://www.PotentEngineer.com

  • Can't access other computer on Windows 8.1 based VPN

    Hi,
    I have a computer in my office, and my laptop at home.
    I want to be able to access resources at my office when I'm at home.
    Both computers are Windows 8.1 based, and in both I'm the Admin.
    I've successfully created a VPN connection. I've configured my office router to allow PPTP 1793 port connections.
    I've configured the Office computer as the VPN server, and successfully connected to it when I was at home.
    I was expecting to see the office computer as part of the network , but unfortunately I can't get to see that computer when I'm at home.
    I was searching the web for solution. I've found a possible solution, which didn't help me - to set Network to be Private, in Windows settings via registry or network policy, but that didn't help.
    How can I access my office computer, when I am at home?
    Thanks!
    Amir.

    You may also need to verify the network settings of your VPN connection. Check the IP address assigned to your VPN adapter and to the remote computer (VPN server). Verify that you can access the remote computer by IP address (\\x.x.x.x) in File Explorer.
    VPN connections often use a separate subnet and IP range and thus computers detected across this adapter are not seen by network discovery. You will need to enter the computer name (if DNS is working over the VPN link) or IP address to access the remote
    computer.
    Also consider that when a VPN connection is established the client is effectively joining the server network, not the other way around.
    Brandon
    Windows Outreach Team- IT Pro
    Windows for IT Pros on TechNet

  • How to sign a powershell script to be used for distribution

    Hi,
    I am new to powershell so if I'm missing out on any detail, please let me know.
    We have some powershell scripts we send over to the clients to execute. Their powershell enviroment has execution policy set to 'remote signed'
    Now I have read multiple blogs for how to sign the powershell script to be used at different execution levels, but my understanding is signing is for my environment only.
    http://www.hanselman.com/blog/SigningPowerShellScripts.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2010/06/17/hey-scripting-guy-how-can-i-sign-windows-powershell-scripts-with-an-enterprise-windows-pki-part-2-of-2.aspx
    I'm probably missing out on something obvious and I'll appreciate if someone can explain me how to sign my script so that client can use it in their environment with any execution level set.
    Thanks in advance!

    Here's a bit more information on the subject:
    http://technet.microsoft.com/en-us/library/hh847874.aspx
    http://msdn.microsoft.com/en-us/library/ms537361.aspx
    You can get code signing certificates from the major vendors.
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Powershell script to add multiple domains to a transport rule

    I have a transport rule in Exchange 2013 that I created in the EAC (mail flow>rules).  it is set so *Apply this rule if.. the sender's domain is..  and then I entered a few domains.
    I want to use a powershell script to enter multiple domains into the senderdomainis parameter using the set-transportrule.  I would like to do this from a csv input file.  The file has  header row of domains and then the domains are listed
    under it.  This is also used successfully in a script that does content and sender id filter additions.
    I tried the following:
    $allowed = import-csv c:\temp\allowed.csv
    $Rule=get-transportrule "safe domain List"
    $Senderdomains =$rule.senderdomainis
    foreach($row in $allowed)
    $Senderdomains +=$row.domain
    #Set-Transportrule "Safe Domain List" -senderdomainis $Senderdomains
    It just adds a long line of all the domains mashed together without separation.
    Any ideas would be helpful.
    Thanks.

    This isn't the most elegant solution, but I was able to accomplish it with this script:
    $allowed = import-csv c:\temp\allowed.csv
    $domains=Get-TransportRule "Safe Domain List" | select -ExpandProperty senderdomainis
    foreach ($a in $allowed)
    $domains += $a.domain
    $domainstoadd = $domains | select -Unique
    Set-TransportRule "Safe Domain List" -SenderDomainIs $domainstoadd
    It's key to note that the column in the CSV file has a heading of "Domain". Basically the script pulls the existing array into a variable so you can add values from the CSV to the array. This creates duplicates,
    so the "Select -Unique" is a quick and easy way to eliminate the duplicates.

  • Powershell script for Use this termset for site navigation in tem store management tool in central admin

    can anyone pls point out whats the power shell script for "use this  termset for site navigation" in the termstore management tool in my central  admin';s manage serv appln-->managed metadata serv appln ->term styore mgmnt tool
    i would like to check this "checked" through powershell script
    help is appreciated!

    Hi,
    To check if the term set has been set to be used for site navigation, we need to check the
    NavigationTermSet.IsNavigationTermSet property for the term set.
    Here is the code example for using PowerShell to get the setting:
    $site=Get-SPSite "your site collection URL";
    $session = Get-SPTaxonomySession -Site "your site collection URL ";
    $termStore = $session.TermStores["Managed Metadata Service"];
    $Group = $termStore.Groups[“Group Name”];
    $TermSet = $Group.TermSets[“Term Set Name”];
    $navTermSet = [Microsoft.SharePoint.Publishing.Navigation.NavigationTermSet]::GetAsResolvedByWeb($termset, $site.RootWeb, "GlobalNavigationTaxonomyProvider");
    write-host $navTermSet.IsNavigationTermSet
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Creating powershell scripts using SCCM 2012 device properties

    I am trying to create a PowerShell script that will create a MAB object based on SCCM device properties. This MAB object is needed to reimage over our network.
    My goal is to create a task sequence that will utilize these properties and create the MAB object in our AD. This will be the first step in my Task Sequence. This will have to use the SCCM device MAC Addresses property information to populate a
    sAMAccount property in my AD object.
    Any suggestions on how to start this process?

    I am still working on actually getting the full process completed here. I have a script that completes the necessary task of creating an MAB object in our Active Directory. This works from a command line opened on the client machine. When I deploy the script
    in a Task Sequence it does not complete. Here is what I am deploying in my task sequence.
    %winDir%\System32\windowsPowershell\v1.0\powershell.exe -noprofile -command Set-ExecutionPolicy Bypass LocalMachine -force
    %winDir%\System32\windowsPowershell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory -force;MABCreation.ps1 -force;Set-ExecutionPolicy RemoteSigned LocalMachine -force
    This errors at the import step everytime. I have created a batch file and used the command line option in the task sequence. I have also tried to Disable 64 bit file redirection option on and off. Any further suggestions?

  • Setting Oracle environment variable using batch (.bat) file in windows

    Hi,
    Oracle 9i db
    Windows OS
    I am in process to create the database (Considered that Oracle9i software is already installed) by running one batch file which consist of all the scripts for the database creation.
    But i also want to set the environment variables at MyComputer(right click)>properties>advance>environment, permenently by running the batch (.bat) file
    ORACLE_HOME
    ORACLE_BASE
    ORACLE_SID
    So, how can it be done ?
    With Regards

    Hi,
    *@echo off*
    set ORACLE_SID=iprsdb
    set ORACLE_BASE=C:\oracle
    set ORACLE_HOME=C:\oracle\ora92     
    call C:\install_bkp\test_env_var.bat
    echo Test Successfull.
    Above mentioned is the code written in the batch (.bat) file
    In that i have also called another .bat file which test the env. variable values which is as below:
    c:\>test_env.bat
    ===================
    Testing oracle sid
    ===================
    iprsdb
    =====================
    Testing oracle base
    ===================
    C:\oracle
    =====================
    Testing oracle home
    =====================
    C:\oracle\ora92
    Test Successfull.
    But when i checked at MyComputer(right click)>properties>advance>environment variables
    there, I saw none of the entries from the above, why so ?
    how to set env. variables permanently using the DOS commands. ?
    With Regards

  • Disable Static IP in Windows 8.1 and Windows 7 or Powershell Script to get network "connected to" value

    Hi,
    I´m in a situation where I need to disable static IP option on all Domain machines (workstations). I have found many different forum topics about that but nothing is suitable for me. Let me describe a situation:
    * In our environment every computer have specific IP configured in DHCP (specific MAC = specific IP). Machines Must be configured DHCP enabled!
    * In our environment all developers are local admins in their computers. This can´t be changed as we are IT corporation and this is our policy.
    * As every IP have specific rights in Firewall to access different places then some IT guys are quite smart to change their IP to static IP that have more access then they should have.
    This last thing is my main problem! We have working PKI and NPS in both WLAN and LAN so only domain and certified computers can have access to our local network. My mission is to prevent local admins to change IP addressess by themselves but I can´t find
    a good solution for doing that. I have tought about Powershell script that is published by SCCM or GPO to all workstations and script idea is to find network card that is "connected to" our "domain.com" network. If this is true then automatically
    DHCP will be enabled for that interface (Set-NetIPInterface -Dhcp Enabled). I know that here is an open window for some moment when script will be ran again or GPO policy will be refreshed but it´s better then nothing. In this script I have one problem - I
    can´t find a solution about how to find network interface that is connected to our "domain.com"? It seems that there is no easy way to do that. 
    Is there any other and better solution to accomplished this situation. Any good ideas will be appreciated.
    Best Regards,
    Taavi

    Hi,
    the real answer is the one you don't want to hear: don't make your users local admninistrators.
    Local administrators will always be able to get araound any security measurement you put in place. For gpo's for example, they can identify the involved registry key, configure it to their desired value and
    remove privileges for everyone but themselves to write the key. Upcoming 'gpupdate' will not be able to write the values...
    For your script, I would recommend to just configure all adapters to dhcp on the client computers. After all the location detection depends on the network Location Awareness service. If your users disable that one (an rermove the appropriate privileges from
    registry ;) ) your script would again be useless.
    That being said, as you post to the security forums my answer is focussed on the security off your solution. if you need assistance in creating this script, I would advice to post back in the Scripting guys forums (and leave out the why as you will otherwise
    agin be pointed on the flawed security ;) )
    I think get-connectionprofile might already be helpull on 8.1
    MCP/MCSA/MCTS/MCITP

  • Executing powershell script from remote computer using RSAT

    Hi.
    I want to execute powershell script on AD server from remote computer (in the same domain). I installed and tested RSAT - it is working fine. But i cant execute PS from c# code.
    ps.Commands.AddCommand("Import-Module").AddArgument("ActiveDirectory");
    ps.Invoke();
    ps.Commands.AddCommand("Get-ADOrganizationalUnit -Filter 'Name -like \"*\"'");
    var res = ps.Invoke();
     And i get exception:
    An unhandled exception of type 'System.Management.Automation.CommandNotFoundException' occurred in System.Management.Automation.dll
    Additional information: The term 'Get-SBNamespace' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    Hi
    CapitanPlanet
    For the
    CommandNotFoundException, it means the command cannot be found.
    On the other hand, your issue is about the PowerShell, if you still have the issue, I suggest that you should post it in the
    PowerShell forum for efficient response.
    Here are some useful information, please check
      Powershell
    commands from C# not working (System.Management.Automation.CommandNotFoundException)
    Powershell, Service Bus For Windows Server Programmatically: Command found, module could not be loaded
    https://msdn.microsoft.com/en-us/library/dn282152.aspx
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SharePoint PowerShell script to open Excel.Application on Windows server 2008 R2

    Hi
    I am building a PowerShell script to open an Excel file store on SharePoint document library.  Sound simple enough but I just couldn't get over an error and hopefully someone can help give an answer here.
    I have found many sample codes to use.  All of the sample codes show that a new object must be created for Excel application
    like ($Excel = New-Object -comobject Excel.Application) before that excel file can be read.
    When I run this comand on a SharePoint server (Windows 2008 R2) either inside the script or by itself I keep getting the following error:
     New-Object : Cannot load COM type Excel.Application.
    + $excel = New-Object <<<<  -Com Excel.Application
        + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
    For the test,  I ran this comand on a Windows 7 with MS Office applications installed,  then it ran fine.
    Is that because I don't have Office application (Excel) installed on the server to run this or some services need to be turned on?
    From the sample codes, look like I should be able to run it on the Server with SharePoint installed.
    Thanks for any advice or solution to resolve my issue.
    Swanl

    So I'm assuming this won't return anything either?
    Get-WMIObject Win32_ClassicCOMClassSetting | ? {$_.VersionIndependentProgId -like 'excel.application'}
    You need Office/Excel installed on the server because you're accessing those .DLLs for the automation functionality, but depending on what you're trying to do you may be able to use one of the office viewers:
    http://www.microsoft.com/en-us/download/details.aspx?id=10 although I'm not sure how much of the com (if any) is exposed in a viewer install.  if Office is not possible due to
    budget reasons, I believe there are several 3rd party providers who can produce a com object that will handle Excel formats.

  • Using WEBDAV in a Windows PowerShell script

    Hello,
    I am trying to write a Windows PowerShell script to copy a file from my SharePoint site to a DB repository folder using a WEBDAV link.  I am not getting it to work.
    When I copy from SharePoint to SharePoint it works.  I have used my credentials on the script which has the authorizations but it still isn't working.  The response error is a 500 Internal Server error.
    Any ideas?
    Has anyone done this before?
    Thanks,
    Matt

    This is not a solution but more an extra tool to help you find a solution....
    You could download and install the Portal Drive to see what actions/commands are used to communicate via webdav to the KM repository.
    Cheers,
    B

  • How to run Powershell script (function) through Windows Task Schduler ??

    Hello All,
    i have Powershell script which is created as a function. I have to give parameters to run the script. And it is working fine. Now i want to run this script through windows task scheduler but it is not working. I dont know how to call powershell function
    through task scheduler.
    From command line i run it like this:
    . c:\script\Get-ServiceStatusReport.ps1
    dir function:get-service*
    Get-ServiceStatusReport -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk
    In windows Task scheduler I am giving this: it runs but i dont receive any output :
    Program/Script:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Parameter:
    -file ". 'Get-ServiceStatusReport.ps1 -ComputerList C:\script\server.txt -includeService  "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail  mail01.xxx.gov.pk'"
    Please HELP !!!

    Thanks for the reply:
    The script is already saved as Get-ServiceStatusReport.ps1 .
    On powershell it does not run like .\Get-ServiceStatusReport.ps1 (parameter).
    But i have to call it as function:
    Like this:
    Get-ServiceStatusReport -ComputerList C:\script\server.txt -includeService "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail mail01.xxx.gov.pk
    As you said:
    I tried to run it like this:
    Program/Script:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
    Parameter:
    -file "c:\script\Get-ServiceStatusReport.ps1 -ComputerList C:\script\server.txt -includeService  "Exchange","W32Time" -To [email protected] -From [email protected] -SMTPMail  mail01.xxx.gov.pk'"
    But its not working , on scheduler its giving error: (0xFFFD0000)
    Please HELP !!!
    WHOLE SCRIPT:
    function Get-ServiceStatusReport
    param(
    [String]$ComputerList,[String[]]$includeService,[String]$To,[String]$From,[string]$SMTPMail
    $script:list = $ComputerList
    $ServiceFileName= "c:\ServiceFileName.htm"
    New-Item -ItemType file $ServiceFilename -Force
    # Function to write the HTML Header to the file
    Function writeHtmlHeader
    param($fileName)
    $date = ( get-date ).ToString('yyyy/MM/dd')
    Add-Content $fileName "<html>"
    Add-Content $fileName "<head>"
    Add-Content $fileName "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
    Add-Content $fileName '<title>Service Status Report </title>'
    add-content $fileName '<STYLE TYPE="text/css">'
    add-content $fileName "<!--"
    add-content $fileName "td {"
    add-content $fileName "font-family: Tahoma;"
    add-content $fileName "font-size: 11px;"
    add-content $fileName "border-top: 1px solid #999999;"
    add-content $fileName "border-right: 1px solid #999999;"
    add-content $fileName "border-bottom: 1px solid #999999;"
    add-content $fileName "border-left: 1px solid #999999;"
    add-content $fileName "padding-top: 0px;"
    add-content $fileName "padding-right: 0px;"
    add-content $fileName "padding-bottom: 0px;"
    add-content $fileName "padding-left: 0px;"
    add-content $fileName "}"
    add-content $fileName "body {"
    add-content $fileName "margin-left: 5px;"
    add-content $fileName "margin-top: 5px;"
    add-content $fileName "margin-right: 0px;"
    add-content $fileName "margin-bottom: 10px;"
    add-content $fileName ""
    add-content $fileName "table {"
    add-content $fileName "border: thin solid #000000;"
    add-content $fileName "}"
    add-content $fileName "-->"
    add-content $fileName "</style>"
    Add-Content $fileName "</head>"
    Add-Content $fileName "<body>"
    add-content $fileName "<table width='100%'>"
    add-content $fileName "<tr bgcolor='#CCCCCC'>"
    add-content $fileName "<td colspan='4' height='25' align='center'>"
    add-content $fileName "<font face='tahoma' color='#003399' size='4'><strong>Service Stauts Report - $date</strong></font>"
    add-content $fileName "</td>"
    add-content $fileName "</tr>"
    add-content $fileName "</table>"
    # Function to write the HTML Header to the file
    Function writeTableHeader
    param($fileName)
    Add-Content $fileName "<tr bgcolor=#CCCCCC>"
    Add-Content $fileName "<td width='10%' align='center'>ServerName</td>"
    Add-Content $fileName "<td width='50%' align='center'>Service Name</td>"
    Add-Content $fileName "<td width='10%' align='center'>status</td>"
    Add-Content $fileName "</tr>"
    Function writeHtmlFooter
    param($fileName)
    Add-Content $fileName "</body>"
    Add-Content $fileName "</html>"
    Function writeDiskInfo
    param($filename,$Servername,$name,$Status)
    if( $status -eq "Stopped")
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$servername</td>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$name</td>"
    Add-Content $fileName "<td bgcolor='#FF0000' align=left ><b>$Status</td>"
    Add-Content $fileName "</tr>"
    else
    Add-Content $fileName "<tr>"
    Add-Content $fileName "<td >$servername</td>"
    Add-Content $fileName "<td >$name</td>"
    Add-Content $fileName "<td >$Status</td>"
    Add-Content $fileName "</tr>"
    writeHtmlHeader $ServiceFileName
    Add-Content $ServiceFileName "<table width='100%'><tbody>"
    Add-Content $ServiceFileName "<tr bgcolor='#CCCCCC'>"
    Add-Content $ServiceFileName "<td width='100%' align='center' colSpan=3><font face='tahoma' color='#003399' size='2'><strong> Service Details</strong></font></td>"
    Add-Content $ServiceFileName "</tr>"
    writeTableHeader $ServiceFileName
    #Change value of the following parameter as needed
    $InlcudeArray=@()
    #List of programs to exclude
    #$InlcudeArray = $inlcudeService
    Foreach($ServerName in (Get-Content $script:list))
    $service = Get-Service -ComputerName $servername
    if ($Service -ne $NULL)
    foreach ($item in $service)
    #$item.DisplayName
    Foreach($include in $includeService)
    write-host $inlcude
    if(($item.serviceName).Contains($include) -eq $TRUE)
    Write-Host $item.MachineName $item.name $item.Status
    writeDiskInfo $ServiceFileName $item.MachineName $item.name $item.Status
    Add-Content $ServiceFileName "</table>"
    writeHtmlFooter $ServiceFileName
    function Validate-IsEmail ([string]$Email)
    return $Email -match "^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$"
    Function sendEmail
    param($from,$to,$subject,$smtphost,$htmlFileName)
    [string]$receipients="$to"
    $body = Get-Content $htmlFileName
    $body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
    $body.isBodyhtml = $true
    $smtpServer = $MailServer
    $smtp = new-object Net.Mail.SmtpClient($smtphost)
    $validfrom= Validate-IsEmail $from
    if($validfrom -eq $TRUE)
    $validTo= Validate-IsEmail $to
    if($validTo -eq $TRUE)
    $smtp.UseDefaultCredentials = $true;
    $smtp.Send($body)
    write-output "Email Sent!!"
    else
    write-output "Invalid entries, Try again!!"
    $date = ( get-date ).ToString('yyyy/MM/dd')
    sendEmail -from $From -to $to -subject "Service Status - $Date" -smtphost $SMTPMail -htmlfilename $ServiceFilename

  • Windows 8.1 - How to enable "Require additional authentication at startup" for bitlocker using powershell script?

    I need help to do this using powershell scripts on Windows 8.1?
    OS : Windows 8.1 Enterprise
    TPM Chip : None
    Enabling bitlocker on OS drive with a password at boot time is a 2 step process.
    1) Edit the Group Policy (gpedit.msc) - Administrative Templates -> Windows Components -> BitLocker Drive Encryption -> Operating System Drives ->
    Require additional authentication at startup -> Allow bitlocker without a compatible TPM
    ref : http://www.7tutorials.com/how-enable-bitlocker-without-tpm-chip-windows-7-windows-8
    2) Enable Bitlocker on c driver using manage bitlocker snapin
    I need help to do this using powershell scripts?
    I researched on the forums but ran into an issue.
    I found that Group policy commandlets can be used to do step 1.  
    I am getting the error : "ins have been registered for Windows PowerShell version 4" when I try to do the following in windows 8.1
    Add-PSSnapin GroupPolicy
    Import-Module GroupPolicy -Verbose

    Hi TinkerBotFoo,
    I’m writing to just check in to see if the suggestions were helpful. If you need further help,
    please feel free to reply this post directly so we will be notified to follow it up.
    If you have any feedback on our support, please click here.
    Best Regards
    Anna
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Make progressbar appear on buttonclick in Windows Forms Powershell script?

    Hello.
    I am not very good at Powershell, so please bear with me if I ask questions which are easy to Powershell experts.
    I have a Powershell script with 4 buttons, which each calls different .bat files I've written, to automatically backup my pictures and music and such, to my external harddrive and all that works perfectly.
    Is there a way to make a marquee progressbar appear inside the window when a button is clicked? (strictly for good looks)
    I have a code for a progressbar which works fine by itself, but can I make it appear when I click each button? Here is the code for the progressbar:
    $progStrip = New-Object System.Windows.Forms.ProgressBar
    $progStrip.Top = 70
    $progStrip.Left = 10
    $progStrip.Width = 515
    $progStrip.Value = 0
    $progStrip.Style="Marquee"
    $progStrip.MarqueeAnimationSpeed = 50
    $form.Controls.Add($progStrip)**
    And here is my Powershell script with the button, that I want to trigger a progress bar, Marquee style for simplicity. Thank you very much in advance
    Add-Type -AssemblyName System.Windows.Forms
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $form = New-Object System.Windows.Forms.Form
    $form.Size = New-Object System.Drawing.Size(550,210)
    $form.Text = "System Backup"
    $form.FormBorderStyle = "FixedDialog"
    $form.StartPosition = "CenterScreen"
    $form.KeyPreview = $True
    $form.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$form.Close()}})
    $icon = [system.drawing.icon]::ExtractAssociatedIcon('D:\Documents\Andet\Icons\icon1 (3).ico')
    $form.Icon = $icon
    $statStrip = New-Object System.Windows.Forms.StatusStrip
    $statStrip.Items.Add("Backup via Powershell") | Out-Null
    $form.Controls.Add($statStrip)
    $1Button = New-Object System.Windows.Forms.Button
    $1Button.Location = New-Object System.Drawing.Size(10,100)
    $1Button.Size = New-Object System.Drawing.Size(125,40)
    $1Button.Text = "Saved games backup"
    $1Button.Add_Click({Start-Process "C:\Backup\Backup1.bat"})
    $form.Controls.Add($1Button)
    $2Button = New-Object System.Windows.Forms.Button
    $2Button.Location = New-Object System.Drawing.Size(140,100)
    $2Button.Size = New-Object System.Drawing.Size(125,40)
    $2Button.Text = "Fuld backup til ekstern harddisk"
    $2Button.Add_Click({Start-Process "C:\Backup\Backup2.bat"})
    $form.Controls.Add($2Button)
    $3Button = New-Object System.Windows.Forms.Button
    $3Button.Location = New-Object System.Drawing.Size(270,100)
    $3Button.Size = New-Object System.Drawing.Size(125,40)
    $3Button.Text = "Slet og omdøb filer/mapper"
    $3Button.Add_Click({Start-Process "C:\Backup\Delete.bat"})
    $form.Controls.Add($3Button)
    $4Button = New-Object System.Windows.Forms.Button
    $4Button.Location = New-Object System.Drawing.Size(400,100)
    $4Button.Size = New-Object System.Drawing.Size(125,40)
    $4Button.Text = "Afslut"
    $4Button.Add_Click({$form.Close()})
    $form.Controls.Add($4Button)
    $objLabel = New-Object System.Windows.Forms.Label
    $objLabel.Location = New-Object System.Drawing.Size(185,15)
    $objLabel.Size = New-Object System.Drawing.Size(200,50)
    $objLabel.Font = New-Object System.Drawing.Font("Arial",15)
    $objLabel.Text = "Vælg backup type:"
    $form.Controls.Add($objLabel)
    $form.Topmost = $True
    $form.ShowDialog()

    Thank you very much for your detailed reply.
    Can you please show me a quick example, of how I can run multiple xcopy after one another, like "xcopy c:\test1 c:\test2" and then "xcopy c:\test3 c:\test4" when I click button 1, how would I write this bit then:
    Thank you in advance.
    $1Button = New-Object System.Windows.Forms.Button
    $1Button.Location = New-Object System.Drawing.Size(10,100)
    $1Button.Size = New-Object System.Drawing.Size(125,40)
    $1Button.Text = "Saved games backup"
    $1Button.Add_Click({Start-Process "C:\Backup\Backup1.bat"})
    $form.Controls.Add($1Button)

Maybe you are looking for

  • No organizer sync after DM 6 update (no error message)

    Hi there, After updating to DM 6 and, at the same time, updating the device software to v5.0.0.1036, I am not able to perform or configure organizer synchronisation any longer. When pressing the "Sync" button, it just says "Select your organizer data

  • Missing Logical Component in Solar01-Transaction Tab

    We have setup several logical components and assigned it to our project template.  We then executed transaction SOLAR01; navigate to the "Business Blueprint Structure", "Master Data" and then the "Transactions" tab; we could only select One Logical C

  • ASN Contact Info

    Dear All, Few days back I got Bronze ASN membership. Since I am new for Debug Version of applications so I am facing a lot of problem in using it. Please let me know how to caontact them. I am having only on support case and I want to use this in ver

  • Strange url in exchange portlet.

    I add exchange portlet into my portal page. It's fine. But when I try to view inbox contents by clicking the content link, I see attached url(javascript:submitURL2227("right url")) and failed to view them. Of course, when I access right url,I success

  • Suspicious Safari/PDF behavior

    Hello all. I'm doing some research on international export controls and part of it has included information on the Wassenaar Arrangement (an international treaty organization). After requesting a specific pdf from the site, I got the message "Safari