Powershell–Schedule a SCCM Advertisement using powershell

I need to change advertisement schedule every day.
Advertisement Start Time
Advertisement Expires
Mandatory Assignments
Example of what I need :
Today the Advertisement has the following settings
Advertisement Start Time – 4/20/2012  23:00.
Advertisement Expires – 4/21/2012 06:00
Mandatory Assignments – 4/20/2012 23:30
Tomorrow the Advertisement will have the following settings
Advertisement Start Time – 4/21/2012 23:00.
Advertisement Expires – 4/22/2012 06:00
Mandatory Assignments – 4/21/2012 23:30
I get the script but I could n't change Mandatory assignment. When I run the script Mandatory assignment take advert start time.
The output I get
Today the Advertisement has the following settings
Advertisement Start Time – 4/20/2012  23:00.
Advertisement Expires – 4/21/2012 06:00
Mandatory Assignments – 4/20/2012 23:00
Tomorrow the Advertisement will have the following settings
Advertisement Start Time – 4/21/2012 23:00.
Advertisement Expires – 4/22/2012 06:00
Mandatory Assignments – 4/21/2012 23:00
Can you please help me to modify the Mandatory assignments..
Below is my powershell script.
Param([String[]] $AdvertisementID)
$SCCM_SERVER = "[server name without the brackets]"
$SCCM_SITECODE = "[three letter site code without brackets]"
#$AdvertisementID = "[AdvertisementID without the brackets]"
#Foreach ($AdvertisementID in $AdvertisementIDs)
$AdvertisementSettings = ([WMIClass] "\\$SCCM_SERVER\root\SMS\site_$($SCCM_SITECODE):SMS_Advertisement").CreateInstance()
$AdvertisementSettings.AdvertisementID = $AdvertisementID
#Get lazy properties
$AdvertisementSettings.Get()
#Build the Scheduled Time
# $NewDate = (Get-Date).adddays(1)
$year = [string](Get-Date).Year
$month = [String](Get-Date).Month
if ($month.Length -eq 1) {$month = "0" + $month}
$day = [string](Get-Date).Day
if ($day.Length -eq 1) {$day = "0" + $day}
$ScheduledTime = $year + $month + $day + "230000.000000+***"
#Build the Expiration Time
$ExpireDate = (Get-Date).AddDays(1)
$day = [string]$ExpireDate.Day
if ($day.Length -eq 1) {$day = "0" + $day}
$ExpirationTime = $year + $month + $day + "060000.000000+***"
#Apply the settings to the advertisement
$AdvertisementSettings.PresentTime = $ScheduledTime
$AdvertisementSettings.ExpirationTime = $ExpirationTime
$AdvertisementSettings.ExpirationTimeEnabled = $true
$AdvertisementSettings.put()
$AssignedSchedule = ([WMIClass] "\\$SCCM_SERVER\root\SMS\site_$($SCCM_SITECODE):SMS_ST_NonRecurring").CreateInstance()
$AssignedSchedule.StartTime = $ScheduledTime
$AdvertisementSettings.AssignedSchedule = $AssignedSchedule
$AdvertisementSettings.AssignedScheduleEnabled = $true
$AdvertisementSettings.put()

I haven't got a chance to test this but from what I see...I see what might be causing the issue.
Can't say for sure until I test it but , you use put() to set the WMI instance twice in your last few lines.
So the later put() method invocation might be having problems as WMI Instance has changed already:
#Apply the settings to the advertisement
$AdvertisementSettings.PresentTime = $ScheduledTime
$AdvertisementSettings.ExpirationTime = $ExpirationTime
$AdvertisementSettings.ExpirationTimeEnabled = $true
#$AdvertisementSettings.put() Don't commit now
$AssignedSchedule = ([WMIClass] "\\$SCCM_SERVER\root\SMS\site_$($SCCM_SITECODE):SMS_ST_NonRecurring").CreateInstance()
$AssignedSchedule.StartTime = $ScheduledTime
$AdvertisementSettings.AssignedSchedule = $AssignedSchedule
$AdvertisementSettings.AssignedScheduleEnabled = $true
$AdvertisementSettings.put()
rest of the code looks good but I think this might be causing an issue. I will give it a shot in my lab later.
Do you get any errors .....I don't see any error handling in your code too. So let me go back and try this.
Hope this helps
Knowledge is Power{Shell}
DexterPOSH
My Blog

Similar Messages

  • Download Reports from SCCM 2012 Using PowerShell

    Hi,
    I Wants to Download reports from SCCM 2012 using powershell but couldn't find a way.
    I used Invoke-Cmreport but it says no reporting Service point on site code XYZ and server ABC
    But Reporting Service is enabled and works fine as i can check/download report manually
    Thanks 

    Hi,
    You could have a look at the script in the blog below.
    How to Download All Your SSRS Report Definitions(RDL files) Using PowerShell.
    http://www.sqlmusings.com/2011/03/28/how-to-download-all-your-ssrs-report-definitions-rdl-files-using-powershell/
    Note: Microsoft provides third-party contact information
    to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Best Regards,
    Joyce

  • SCCM 2012 use PowerShell to create a GlobalCondition, limiting the Deployment Type of an Application to certain operating systems.

    Title says it all basically.
    In the GUI im able to create a Global Condition (condition type: Expression) where I can add a clause that Limits the deployment type of an application to certain operating Systems (useful for deploying 64-bit apps).
    Is there away to Trigger that Setting using PowerShell? So far I haven't found one.
    Thx in advance...

    I changed my script a little bit and can be found Here. 
    An example to use it is:
    #Get Application named "Test" from the Server "localhost"           
    $app = Get-SCCMApplication "Test" "localhost"
    #A rule will be created from the global condition rule "ForumTest" where the registry value equals to "1"
    $rule1 = Create-SCCMGlobalConditionsRule . "ForumTest" "IsEquals" 1 "Registry"
    #Add the rule to the requirement rule of the deployment type
    $app.DeploymentTypes[0].Requirements.Add($rule1)
    #And save the application
    Save-SCCMApplication $app
    PowerShell, System Center 2012, Windows 8 http://blog.lechar.nl
    Thanks Rob!
    Have unfortunately encountered some problems:
    Get-SCCMApplication does not exist. Changed it to Get-CMApplication
    Create-SCCMGlobalConditionsRule - Cant find any "Create..." cmdlets
    Save-SCCMApplication does not exist
    Get-CMApplication : A positional parameter cannot be found that accepts argument 'TestApp'.
    At H:\sctipt\SetRequirement.ps1:2 char:9
    +  $app = Get-CMApplication "TestApp" "siteServe ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Get-CMApplication], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.Cmdlets.AppMan.Commands.GetApplicationCommand
    Create-CMGlobalConditionsRule : The term 'Create-CMGlobalConditionsRule' 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.
    At H:\script\SetRequirement.ps1:5 char:11
    +  $rule1 = Create-CMGlobalConditionsRule . "GlobalRuleName" "IsEquals" 1 "Registry"
    +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Create-CMGlobalConditionsRule:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    Cannot index into a null array.
    At H:\script\SetRequirement.ps1:8 char:2
    +  $app.DeploymentTypes[0].Requirements.Add($rule1)
    +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : NullArray
    Save-CMApplication : The term 'Save-CMApplication' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the na
    me, or if a path was included, verify that the path is correct and try again.
    At H:\script\SetRequirement.ps1:12 char:1
    + Save-CMApplication $app
    + ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Save-CMApplication:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

  • Change "Update distribution points on a schedule" in SCCM 2007 via powershell script

    Hi
    I would like to change the Custom Schedule start time in the "Update distribution points on a schedule" on a package in SCCM 2007 with out logging into the SCCM console.
    I have following line code to query the package.
    Get-WmiObject
    -Namespace
    "Root\SMS\Site_$sitecode"
    -Query
    "SELECT * FROM SMS_PackageBaseclass WHERE PackageID='$PackageID'"
    -ComputerName $ServerName
    The problem is I only get the "SourceDate" and "LastRefreshedTime" from the query. I am not sure if I change the "LastRefreshTime" that it would change the start time in the Custom Schedule

    Hi Jason
    I progressed a little bit with you help. I now have the following bit of code.
    $Package = Get-WmiObject  -class SMS_Package -Namespace "Root\SMS\Site_$sitecode" -Filter "PackageID='$PackageID'" -ComputerName $ServerName
    $RefreshPkg = $Package.RefreshSchedule()
    $RefreshPkg.RefreshSchedule
    I get the following error:
    Method invocation failed because [System.Management.ManagementObject] doesn't contain a method named 'RefreshSchedule'.
    At line:7 char:1
    + $RefreshPkg = $Package.RefreshSchedule()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (RefreshSchedule:String) [], RuntimeException
        + FullyQualifiedErrorId : MethodNotFound

  • Powershell Sciprts in SCCM TS

    I am working with SCCM 2012 using PowerShell scripts in the task sequence.
    I want to be able to trigger a reboot and retry in the task sequence, and I think the code should pre pretty straight forward, but something is obviously wrong.
    $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
    for ($i = 0; $i -lt 10; $i++){
    write-output $i " - " $tsenv.value("SMSTSRebootRequested") | out-file -filepath "C:\TestVal.log" -append
    write-output " <<<<<<<<<<<<<>>>>>>>>>>>>>> " | out-file -filepath "C:\TestVal.log" -append
    $tsenv.value("SMSTSRebootRequested")=$true
    $tsenv.value("SMSTSRetryRequested")=$true
    When I run the code manualy (f8 then run the script) there are no errors, but when I run it as a task sequence I get a generic 2147500037 error number.
    In the task sequence this is a run command and its command is 'powershell.exe -executionpolicy bypass -file "TS_Var.ps1"'

    In my Task Sequence I use powershell for importing startlayout to Windows 8, so the step itself is run powershell step, not command line. I only have .ps script name typed and execution policy set to bypass in UI. The command in .ps file starts like
    POWERSHELL-NonInteractive-CommandImport-StartLayout...
    bla bla bla :)
    Hope this helps.

  • Use Powershell to replace text with image in Word document

    I have a powershell script that uses a Word document as a template to create signatures that I am pushing out to my organization.
    The document is populated with text formatted the way I want the signature to look, that I then do a FindText and ReplaceText on.  This works fine for replacing text with text, but I can't figure out how to properly replace some of the holder text with
    an image and a link.  I found a few posts about adding images to word documents, but none that seem to work properly in this scenario.
    Any insight would be greatly appreciated, thanks!

    Dear BOFH,
    You are correct that method I outlined is not for inserting an image into a signature block (which would be in Outlook, not Word).  The links you post do certainly deal with outlook signatures, well done... Except that the question was about how to
    use a Powershell script to replace text in a Word document with an image.  Sure it was framed in the context of creating signatures, but the poster expressed that they already had a method of generating and replacing text, and just needed to know, as
    I did, how to do the thing they actually asked.
    Please BOFH... Please forgive my audacity in hoping to find a reference (any reference) to how to replace Word text with images via Powershell in a thread titled "Use Powershell to replace text with image in Word document".
    This is certainly a scripting question, and even something as simple as "You will need to call the .NET methods for the Word find/replace functionality.  Please ask in the Word forums for the correct method to use. 
    If you need help on calling .NET methods look HTTP ://here"support you offered combined with the contempt you offer in response to my actual substantive help to the actual question asked.
    BOFH, you are not better than us, just more arrogant.
    Can you please start your own question as this one has been closed.  Please see scripting guidelines.
    We cannot guarantee you satisfaction as this is a user supported forum.  The is no SLA for community support.  Perhaps if you posted a better worded question as a new topic someone might be able to help you resolve your issue.
    The topic you are posting on is closed and answered.
    ¯\_(ツ)_/¯

  • Powershell 4.0 How to use Add-Printer to add printer for all users (machine)

    Is there a way I can use Powershell 4.0 Add-Printer cmdlet to add a printer for all users (machine)?  I tried from an admin account but it only adds a printer for the currently logged on user.
    thanks.

    Adding a printer for all users requires having access to their profiles (and registry hive for user) to save the mapped printer information. Your best bet is to either use Group Policy Preferences or write a user logon script that ones when they log in and
    maps the printer if not already mapped. 
    Group Policy Preferences Example
    I wrote an article a while back that shows how to use a GPO logon script to map a printer. It doesn't use V4, but the process would be the same as far as a GPO goes.
    http://learn-powershell.net/2012/11/15/use-powershell-logon-script-to-update-printer-mappings/
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Set Advertisement settings using powershell

    Hi,
    I need to change multiple advertisements with a powershell script. All advertisements have a mandatory assignment configured, and I need to check the "Ignore maintenance windows" and set the Rerun Behavior as "Always rerun". I created
    a powershell script that read the advertisements names from a file and change each one. The problem is: When I run the script, the mandatory assignment is removed from advertisement! Any ideas how to fix it?
    #Get Advertisement name from txt file
    $Source = Get-Content c:\temp\AdvertName.txt
    #Set counter to 0
    $Count = 0
    #For each advertisement in source file, change Properties as needed and increment counting
    Foreach ($AdvertName in $Source)
    #Connect to SCCM server using WMI and filter advertisement by name present in source file
    $Advert = Get-WmiObject -ComputerName SCCMSERVER -Namespace "root\sms\site_SCCM" -class SMS_Advertisement -Filter "AdvertisementName like '$AdvertName'"
    #Set AdvertFlag (OVERRIDE_SERVICE_WINDOWS+DONOT_FALLBACK+NO_DISPLAY+ONSLOWNET)
    $Advert.AdvertFlag = 101842944
    #Set RemoteClientFlag (DOWNLOAD_FROM_LOCAL_DISPPOINT+DOWNLOAD_FROM_REMOTE_DISPPOINT+RERUN_ALWAYS)
    $Advert.RemoteClientFlags = 2128
    #Apply Advertisment modification
    $Advert.put()
    #Increment counting by 1
    $Count ++
    #Write message to user with total  advertisements
    Write-Host "Processed Advertisements: $Count"

    You should use UPN not ALIAS
    Set-SPOSiteGroup -Site https://contoso.sharepoint.com -Identity "NewGroup" -Owner <UPN>
    Regards Chen V [MCTS SharePoint 2010]

  • Creating an Advertisement Through Powershell SCCM 2012

    Currently I'm trying to find the most efficient way to automate the package deployment process using powershell. The script I'm using at the moment is returning Message ID 100035(waiting for content) under the deployment status, and the CAS logs say
    <![LOG[Requesting content SKG00054.1, size(KB) 1344, under context System with priority Low]LOG]!><time="11:18:46.382+240"
    date="07-06-2012" component="ContentAccess" context="" type="1" thread="2780" file="contentaccessservice.cpp:855">
    <![LOG[Submitted CTM job {1CA3F8E4-13DA-1483-9F8E-12FUL5C4E3FE}
    to download Content SKG00054.1 under context System]LOG]!><time="11:18:46.413+240" date="07-06-2012" component="ContentAccess"
    context="" type="1" thread="2780" file="downloadmanager.cpp:554">
    <![LOG[Successfully created download  request {2CEK4BA5-FD7D-4529-A04D-95DXE98237566}
    for content SKG00054.1]LOG]!><time="11:18:46.413+240" date="07-06-2012" component="ContentAccess" context=""
    type="1" thread="2780" file="downloadcontentrequest.cpp:824">
    <![LOG[Location update from CTM for content SSKG00054.1 and request {2CEK4BA5-FD7D-4529-A04D-95DXE98237566}]LOG]!><time="11:18:47.069+240"
    date="07-06-2012" component="ContentAccess" context="" type="1" thread="2676" file="downloadcontentrequest.cpp:991">
    <![LOG[Download request only, ignoring location update]LOG]!><time="11:18:47.069+240"
    date="07-06-2012" component="ContentAccess" context="" type="1" thread="2676" file="downloadcontentrequest.cpp:1010">
    Execmgr logs:
    <![LOG[Execution Request for advert SKG200BB package SKG00054 program * state change from WaitingDependency to WaitingContent]LOG]!><time="11:18:46.601+240"
    date="07-06-2012" component="execmgr" context="" type="1" thread="2676" file="executionrequest.cpp:503">
    <![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="SKG00054",ProgramID="*",
    actionType 1l, value , user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="11:18:46.601+240"
    date="07-06-2012" component="execmgr" context="" type="1" thread="2676" file="event.cpp:410">
    <![LOG[Raising client SDK event for class CCM_Program, instance CCM_Program.PackageID="SKG00054",ProgramID="*",
    actionType 1l, value NULL, user NULL, session 4294967295l, level 0l, verbosity 30l]LOG]!><time="11:18:46.741+240"
    date="07-06-2012" component="execmgr" context="" type="1" thread="3452" file="event.cpp:410">
    I'm unsure why the advertisement isn't deploying properly, because the properties look identical to previous packages I've sent manually. One thing I may think be the issue is that I'm
    adding the package to a Distribution Point Group which I know may disrupt deployments if a package has already previously been assigned to it I believe.
    $sitename = "SKG"
    Function create-PKGDeployment
    $targetcoll = gwmi -ns "root\SMS\Site_$sitename" -class SMS_Collection | WHERE {$_.Name -eq 'Lab'}
    $collID = $targetcoll.CollectionID
    $collName = $targetcoll.Name
    $PKG = gwmi -ns "root\SMS\Site_$sitename" -class SMS_Package | WHERE {$_.name -eq 'Firefox'}
    $PKGID = $PKG.PackageID
    $PKGName = $PKG.Name
    $AdvName = $PKGName+"_"+$PKGID+"_"+$collName
    [ARRAY]$PackageID = $PKGID;
    Invoke-WmiMethod -Namespace "Root\SMS\Site_SKG" -Name AddPackages -Path "SMS_DistributionPointGroup.GroupID='{1PKU8557-9153-4C39-8DHK-DB0C53H801BA}'" `
    -ArgumentList ( ,$PackageID)
    $Format = get-date -format yyyyMMddHHmmss
    $Date = $Format + ".000000+***"
    $AdvArgs = @{
    AdvertisementName = "$AdvName";
    CollectionID = $collID;
    PackageID = $PKGID;
    SourceSite = $sitename;
    ActionInProgress = 2
    PresentTime = $Date
    ExpirationTime = $Date
    PresentTimeEnabled = $true
    ProgramName = "*";
    AdvertFlags = 33751072;
    RemoteClientFlags = 2128;
    TimeFLags = 8193
    Set-WmiInstance -Class SMS_Advertisement -arguments $AdvArgs -namespace "root\SMS\Site_$sitename" | Out-Null
    Create-PkgDeployment

    I created advertisement. I am trying to use powershell script o change advertisement start time and mandatory time and expiry time. I am using sccm2012 r2 cu2. I can able to change advertisement start time and expiry but not mandatory through powershell
    or vbscript. In our environment we have more than 50+ advertisement schedule by daily bases. Can you help me how to change mandatory assignemnent time using script or powershell
    Example: Advert start time:08/08/2014 11:00AM
    Expiry Time 08/09/2014 6:00AM
    Mandatory time: 08/08/2014 09:00PM. If you need any more info let me know

  • Creating a Scheduled Task using PowerShell v4

    So here is my question.  I'm trying/wanting to create a scheduled task using PowerShell v4 on Server 2012R2.  I want to task to run on the 1st day of every month.  The parameter for -Monthly -Day is not available.  I need to use PowerShell
    to create the Scheduled Task because the Task will be running with a group Managed Service Account credentials so the Scheduled Task can not be created via the Task Scheduler GUI.
    Thanks in Advance

    Here is a functioning task It can be easily edited in PowerShell or in notepad to alter the timing
    <?xml version="1.0" encoding="UTF-16"?>
    <Task version="1.1" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
    <RegistrationInfo>
    <Author>W8TEST\user01</Author>
    </RegistrationInfo>
    <Triggers>
    <CalendarTrigger>
    <StartBoundary>2014-06-04T21:31:32.0459499</StartBoundary>
    <Enabled>true</Enabled>
    <ScheduleByMonth>
    <DaysOfMonth>
    <Day>1</Day>
    <Day>12</Day>
    <Day>24</Day>
    </DaysOfMonth>
    <Months>
    <January />
    <February />
    <March />
    <April />
    <May />
    <June />
    <July />
    <August /
    <September />
    <October />
    <November />
    <December />
    </Months>
    </ScheduleByMonth>
    </CalendarTrigger>
    </Triggers>
    <Principals>
    <Principal id="Author">
    <RunLevel>LeastPrivilege</RunLevel>
    <UserId>W8TEST\jvierra</UserId>
    <LogonType>InteractiveToken</LogonType>
    </Principal>
    </Principals>
    <Settings>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <IdleSettings>
    <StopOnIdleEnd>true</StopOnIdleEnd>
    <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
    </Settings>
    <Actions Context="Author">
    <Exec>
    <Command>notepad.exe</Command>
    <Arguments>test.txt</Arguments>
    <WorkingDirectory>c:\temp</WorkingDirectory>
    </Exec>
    </Actions>
    </Task>
    I have edited and reloaded the XML many, many times.  It works very nicely.
    ¯\_(ツ)_/¯

  • Search and Replace text in file using PowerShell

    I want to schedule a script in PowerShell to search a directory for an XML file for a particular text string and replace it with a different text string and then save the file with the same name, the name of the file
    will change each time the script is run on a daily basis. There will only be one XML file in the location when the scheduled script is run.
    I have never used PowerShell but am familiar with batch file commands, can anyone please help!!
    KevinS

    Hi Kevin,
    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

  • SP 2013 - Use PowerShell to Deploy, Activate and Associate a SharePoint Designer Workflow

    Hello Community!
    I'm using SP 2013 Enterprise and I need to use PowerShell to deploy a reusable SharePoint Designer Workflow to the solution gallery, activate it, activate the workflow feature, and then associate the workflow to a list and or library.  Has anyone done
    this before and if so please provide guidance and code examples.
    Thanks!
    Tom
    Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
    Linked-In - SharePoint Gypsy

    Hi Tom,
    Below are the links might help, please check:
    Lists the Windows PowerShell cmdlets that you can use to manage workflows in a SharePoint 2013 farm.
    http://technet.microsoft.com/en-us/library/ee906558(v=office.15).aspx
    Series of articles written by Sahil Malik about SharePoint 2013 workflow
    http://www.codemag.com/Article/1301021
    http://www.codemag.com/Article/1304021
    SharePoint 2013: How to Schedule a PowerShell Script to Run Automatically
    http://www.proactivespeaks.com/2013/07/30/sharepoint-2013-how-to-schedule-a-powershell-script-to-run-automatically/
    Similar threads:
    http://stackoverflow.com/questions/15045189/how-to-start-workflow-2013-from-powershell
    http://sharepoint.stackexchange.com/questions/65555/deploying-workflow-wsp-as-sandbox-solution
    http://sharepoint.stackexchange.com/questions/89312/launch-sharepoint-2013-workflow-w-javascript
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Creating Windows Basic Task using powershell

    Hello Everyone,
    Please help me out in the below situation:
    I have to create a basic windows task using powershell to run a script on a specific date and time.
    Let me make it even clear :
    I have a csv say,
    D:\xyz.csv
    ServerName ,  Date  , Time
    Random1,   11/15/2014,01:00:00PM
    Random2,   12/01/2015,03:00:00PM
    ...and so on
    I also have a script at E:\TestingServer.ps1
    I need to create list of windows tasks to invoke TestingServer.ps1 with parameters as servername and Time of task as given date and time in csv.
    Task1- with input as ServerName at Date and time from CSV
    Task2-with input as ServerName at Date and time from CSV

    Well here is a good article showing howto do this:
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/09/18/create-a-powershell-scheduled-job.aspx
    ¯\_(ツ)_/¯

  • Is it possible to add a PC to a domain via a remote CLI using Powershell?

    If this is going into a domain, which it sounds to be the case, you'll be using a specified base image as per your company policy (image A goes to computer build A group). If you are using SCCM, FOG, etc... A better method would be to put in a task sequence to integrate the machine, at the end of the sequence of course. Don't want GPOs and firewall settings coming up before everything is complete. This would also allow you to automate the process, rather than push it manually.

    I saw an instructional video from "Eli the Computer Guy" about adding Windows 8.1 PC's to a Server 2012 Domain. He did it via the GUI which is what I am very comfortable with, but I would love to be able to do this via a remote command line using Powershell, is this possible? Let's say my Workgroup is ABC and the Domain I'd like to join the PC to is BCORPINC
    Thank you
    This topic first appeared in the Spiceworks Community

  • Changing Computer Descriptions Remotely using Powershell

    Hello,
    I am the Network Admin for a small college that has a little over 300 computers. I want to be able to use PowerShell to change the computer descriptions on those machines from my desk. I have PowerShell 3.0 installed on my system. I am new to PowerShell
    so I could use some step by step instructions on what to do.
    For instance:
    I have a computer in my network that has a Computer Name of "19XP9175" and a description of "Optiplex 320 - Doreen Lane".
    I would like to change the description to read "O320-Doreen lane"  from my system using PowerShell 3.0.
    Can you give me some pointers on how to do this?
    Thanks
    Daryl

    This may not help with Powershell side of things, but we had a similar issue where we needed to change 100's of remote computer descriptions, so we created this tool:
    <snip>
    It allows you to local or remote connect to a computer on a network (run it with admin rights!) and gather and change the description immediately without requirement for reboot etc. 
    Hope it helps.
    <snip>
    So why are you bumping an old, answered thread in a PowerShell forum then? I get that you want to advertise your product, but at least keep on topic.
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

Maybe you are looking for

  • A good friend from Japan asked me if I knew....

    ...what was happening to his iMac? He was a neighbor of mine in Hawaii, and I helped convince him to buy a Mac so I feel somewhat responsable for his hardware problems. I received this email from Japan recently, tell me does it sound like "Kernal Pan

  • Windows file sharing issues with Leopard

    One of my clients has a Mac Mini server running Leopard with all updates installed. He has 2 Windows PCs in his office (1 XP and 1 Vista) and 1 MacBook Air running Leopard. I created two folders in /Users/Shared and created a new full (standard) user

  • Stop it from using photo black ink for black text printing and where has the color ink gone?

    My HP Photosmart Prem C310 series all in one is using the Black Photo ink cartridge for text printing instead of the XL Black that I put in it for text printing. How can I get it to use the right cartridge for printing? Also, even though I have NOT p

  • HELP. Quicktime Movies from FCP with DVCPro = Black Boxes across image.

    When exporting my HD movie from Final Cut Pro (5) using either Quicktime Movie or Quicktime COnversion with the footage's native setting of DVCPro HD 720p the resulting movie has thick black rectangles on the left and right sides and one right in the

  • Oracle Access Manager, ADAM & UCM integration? Help please..

    I`m currently investigating the potential of using Oracle Access Manager (OAM) as a tool that allows connections to multiple Active Directory(AD) or ADAM servers providing a single point to author and manage users with a good easy to use GUI. The UCM